What is the advantage of auto indexing?
What is the difference between post indexing and pre indexing?
The x86 includes the following instruction: IMUL op1, op2, immediate This instruction multiplies op2, which may be either register or memory, by the immediate operand value, and places the result in...
Assume a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack. What stack...
Why was IBM's decision to move from 36 bits to 32 bits per word wrenching, and to whom?
Assume an instruction set that uses a fixed 16-bit instruction length. Operand specifiers are 6 bits in length. There are K two-operand instructions and L zero-operand instructions. What is the...
Design a variable-length opcode to allow all of the following to be encoded in a 36-bit instruction: Instructions with two 15-bit addresses and one 3-bit register number Instructions with one...
Is there any possible justification for an instruction with two opcodes?
In [COOK82], the author proposes that the PC-relative addressing modes be eliminated in favor of other modes, such as the use of a stack. What is the disadvantage of this proposal?
What general roles are performed by processor registers?
What is the function of condition codes?
What is a program status word?
Why is a two-stage instruction pipeline unlikely to cut the instruction cycle time in half, compared with the use of no pipeline?
List and briefly explain various ways in which an instruction pipeline can deal with conditional branch instructions.
How are history bits used for branch prediction?
A non pipelined processor has a clock rate of 2.5 GHz and an average CPI (cycles per instruction) of 4. An upgrade to the processor introduces a five-stage pipeline. However, due to internal pipeline...
Consider an instruction sequence of length n that is streaming through the instruction pipeline. Let p be the probability of encountering a conditional or unconditional branch instruction, and let q...
A microprocessor provides an instruction capable of moving a string of bytes from one area of memory to another. The fetching and initial decoding of the instruction takes 10 clock cycles....
Assume a pipeline with four stages: fetch instruction (FI), decode instruction and calculate addresses (DA), fetch operand (FO), and execute (EX). Draw a diagram similar to Figures 12.10 for a...
Consider the timing diagram of Figures 12.10. Assume that there is only a two-stage pipeline (fetch, execute). Redraw the diagram to show how many time units are now needed for four instructions....
What are some typical distinguishing characteristics of RISC organization?
Briefly explain the two basic approaches used to minimize register-memory operations on RISC machines.
If a circular register buffer is used to handle local variables for nested procedures, describe two approaches for handling global variables.
Add entries for the following processors to Table 13.7: Table 13.7 Characteristics of Some Processors a. Pentium II b. ARM Number of Number Max instruction Number of Load/store Max Max bits for...
What is the essential characteristic of the superscalar approach to processor design?
What is the difference between the superscalar and super pipelined approaches?
Briefly define the following terms: True data dependency Procedural dependency Resource conflicts Output dependency Ant dependency
What is the distinction between instruction-level parallelism and machine parallelism?
List and briefly define three types of superscalar instruction issue policies.
What is register renaming and what is its purpose?
When out-of-order completion is used in a superscalar processor, resumption of execution after interrupt processing is complicated, because the exceptional condition may have been detected as an...
a. Identify the write-read, write-write, and read-write dependencies in the following instruction sequence: b. Rename the registers from part (a) to prevent dependency problems. Identify references...
Can you foresee any problem with the write-once cache approach on bus-based multiprocessors? If so, suggest a solution.
Convert the following hexadecimal numbers to their binary equivalents: a. E b. 1C c. A64 d. 1F.C e. 239.4
Equations (19.1) and (19.2) define the representation of numbers in base 10 and base 2, respectively. In general, for the representation in base g of = {... x2x1x0 x-1x-2x-3....}, the value of X is...
Perform the indicated base conversions: a. 548 to base 5 b. 3124 to base 7 c. 5206 to base 7 d. 122123 to base 9
Design a 2 32 decoder using four 3 8 decoders (with enable inputs) and one 2 4 decoder.
Simplify the following expressions according to the commutative law: a. b. A B + A C + B A c. (L M N)(A B)(C D E)(M N L) d. F (K + R) + S V + W + V S + W + (R + K) F A.B + B.A + C.D.E + C.DE + E.T.D
List and briefly define four different kinds of assembly language statements.
What is the difference between a one-pass assembler and a two-pass assembler?
Section B.1 includes a C program that calculates the greatest common divisor of two integers. a. Describe the algorithm in words and show how the program does implement the Euclid algorithm approach...
a. A 2-pass assembler can handle future symbols and an instruction can therefore use a future symbol as an operand. This is not always true for directives. The EQU directive, for example, cannot use...
How would the following program fare against Imp? Loop COPY #0, -1 JUMP -1 Remember that instruction execution alternates between the two opposing programs.
(a) Who is subject to FISMA? (b) Distinguish between certification and accreditation in FISMA. (c) Why has FISMA been criticized?
Illustrate the UML Diagram for exercise 7.16. Your UML design should observe the following requirements: a. The student should have the ability to compute his/her GPA and add or drop majors and...
Consider the ER diagram shown in Figure 7.21 for part of a BANK database. Each bank can have multiple branches, and each branch can have multiple accounts and loans. (a) List the strong (nonweak)...
Consider the following relation: R (Doctor#, Patient#, Date, Diagnosis, Treat_code, Charge) In this relation, a tuple describes a visit of a patient to a doctor along with a treatment code and daily...
Consider the relation: BOOK (Book_Name, Author, Edition, Year) with the data: a. Based on a common-sense understanding of the above data, what are the possible candidate keys of this relation? b....
Consider the relation R, which has attributes that hold schedules of courses and sections at a university; R = {CourseNo, SecNo, OfferingDept, CreditHours, CourseLevel, InstructorSSN, Semester, Year,...
Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to any other peers (so called free-riding). a. Bob claims that he can receive a complete copy of the file that is...
Write a simple TCP program for a server that accepts lines of input from a client and prints the lines onto the server's standard output. (You can do this by modifying the TCPServer java program in...
Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first...
Consider that only a single TCP (Reno) connection uses one 10Mbps link which does not buffer any data. Suppose that this link is the only congested link between the sending and receiving hosts....
Suppose you are interested in detecting the number of hosts behind a NAT. You observe that the IP layer stamps an identification number sequentially on each IP packet. The identification number of...
Consider the block cipher in Figure 8.5. For a given "key" Alice and Bob would need to keep eight tables, each 8 bits by 8 bits. For Alice (or Bob) to store all eight tables, how many bits of storage...
You are investigating the possible benefits of a way-predicting level 1 cache. Assume that the 32 KB two-way set-associative single-banked level 1 data cache is currently the cycle time limiter. As...
If you were about to create an index on a relation, what considerations would guide your choice? Discuss: 1. The choice of primary index. 2. Clustered versus unclustered indexes. 3. Hash versus tree...
Consider the following BCNF relations, which describe departments in a company and employees: Dept(did, dname, location, managerid) Emp(eid, sal) You are told that the following queries are extremely...
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
Write a program that displays all the prime numbers less than 120 in decreasing order. Use the StackOfIntegers class to store the prime numbers (e.g., 2, 3, 5,... ) and retrieve and display them in...
Suppose you want to interchange the values stored in memory cells 2 and3. What is wrong with the following sequence of steps: Step 1. Move the contents of cell number 2 to cell number 3. Step 2. Move...
Using 32-bit Internet addresses was originally thought to provide ample room for expansion, but that conjecture is not proving to be accurate. IPv6 uses 128-bit addressing. Will that prove to be...
1. Which the following statements about the base keyword is false? a.A constructor can use at most one base statement. b.A constructor cannot use both a base statement and a this statement. c.The...
1.To parse a string that might contain a currency value such as $1,234.56, you should pass the Parse or TryParse method which of the following values? a.NumberStyles.AllowCurrencySymbol...
1.You are a developer at company xyx. You have been asked to improve the responsiveness of your WPF application. Which solution best fits the requirements? a.Use the BackgroundWorker class. b.Use the...
Select a subject with which you are familiar and design a pseudocode for giving directions in that subject. In particular, describe the primitives you would use and the syntax you would use to...
Design a class named StopWatch. The class contains: The private data fields startTime and endTime with get methods. A constructor that initializes startTime with the current time. A method named...
1.Which of the following methods is the best way to store an integer value typed by the user in a variable? a.ToString b.Convert c.ParseInt d.TryParse 2.The statement object obj = 72 is an example of...
1.Which ADO.NET object is a forward only cursor and is connected to the database while the cursor is open? a.DBDataReader b.DataSet c.DataTable d.DataAdapter 2.Which ADO.NET Command object's property...
Write an application that displays a box, an oval, an arrow and a diamond using asterisks (*), as follows: Discuss.
Create a base class called Vehicle that has the manufacturer's name (type String), number of cylinders in the engine (type int), and owner (type Person given in Listing 8.1Truck that is derived from...
Phillip Morgan, the owner of Morgan Importing, makes periodic buying trips to various countries. During the trips, he keeps notes about the items he purchases and basic data about their shipments. He...
Consider the EER diagram in Figure for a car dealer Map the EER schema into a set of relations. For the VEHICLE to CARITRUCK/SUV generalization consider the four options presented in Section and show...
Compare the circular-wait scheme with the various deadlock-avoidance schemes (like the banker's algorithm) with respect to the following issues: a. Runtime overheads b. System throughput
Decode the following bit patterns using the floating-point format described in Figure 1.26: a. 01011001 b. 11001000 c. 10101100 d. 00111001
The three bit patterns 10000010, 01101000, and 00000010 are representations of the same value in two's complement, excess, and the 8-bit floating-point format presented in Figure 1.26, but not...
1. Which of the following identifies a specific element within an array? a. Element specifier b. Determinator c. Locator d. Subscript 2. Which of the following is the lower subscript of an array? a....
Design an algorithm that, given two strings of characters, tests whether the first string appears as a substring somewhere in the second.
Assume the following declarations are made and indicate which items below are valid subscripted variables. int a[] = new int[10]; char b[] = new char[6]; int x = 7, y = 2; double z = 0.0; a. a[0] b....
When is unified storage a suitable option for a data center? Justify your answer by comparing the unified storage offering with traditional storage solutions.
Develop a complete test strategy for the SafeHome system discussed earlier in this book. Document it in a Test Specification.
How are the concepts of coupling and software portability related? Provide examples to support your discussion.
You are designing a caching subsystem that temporarily stores data retrieved over the network (e.g., web pages) into a faster access storage (e.g., the hard disk). Due to a change in requirements,...
Explain the difference between functional dependencies that arise from equations and those that do not.
The MTBF concept for software is open to criticism. Explain why?
Rewrite Fig. 7.2 so that the size of the array is specified by the first command-line argument. If no command-line argument is supplied, use 10 as the default size of the array.
Consider a class PersonAddress that represents an entry in an address book. Its attributes are The first name of the person The last name of the person The e-mail address of the person The...
Consider a program that will keep track of the items in a school's library. Draw a class hierarchy, including a base class, for the different kinds of items. Be sure to also consider items that...
Consider the following decompositions for the relation schema R of Exercise 15.24. Determine whether each decomposition has (1) the dependency preservation property, and (2) the lossless join...
An application specifies a requirement of 200 GB to host a database and other files. It also specifies that the storage environment should support 5,000 IOPS during its peak workloads. The disks...
Design an EER schema for a database application that you are interested in. Specify all constraints that should hold on the database. Make sure that the schema has at least five entity types, four...
Suppose a digital camera has a storage capacity of 256MB. How many photographs could be stored in the camera if each consisted of 1024 pixels per row and 1024 pixels per column if each pixel required...
A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a serving equals 300 calories. Create a VB application that lets the user...
What is "good enough" software? Name a specific company and specific products that you believe were developed using the good enough philosophy.
Draw an inheritance hierarchy for students at a university similar to the hierarchy shown in Fig. 9.2. Use Student as the superclass of the hierarchy then extend Student with classes Undergraduate...
Consider the following relational database that Best Airlines uses to keep track of its mechanics, their skills, and their airport locations. Mechanic number, airport name, and skill number are all...
Which type of application benefits the most by bypassing write cache? Justify your answer. Discuss.
Describe the six clauses in the syntax of an SQL retrieval query. Show what type of constructs can be specified in each of the six clauses. Which of the six clauses are required and which are...
Write a program that allows students to schedule appointments at either 1, 2,3,4,5, or 6, o'clock pm. Use an array of six strings to store the names for the time slots. Write a loop that iterates as...
Design a class named QuadraticEquation for a quadratic equation ax2 + bx + x = 0. The class contains: The private data fields a, b, and c that represent three coefficients. A constructor for the...