Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 2.7, Problem 2QE
Program Plan Intro
Vole:
The instructions to the program counter are given in the form of the vole’s machine language. The vole machine instruction contains two long bytes. The first
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What is the minimum number of cycles needed to completely execute n instructions on a CPU with a k stage pipeline? Find a formula.
he pipeline is a way to improve the performance of the processor by increasing thethroughput. As you learned in the class, the instruction execution is divided to 5stages: IF, ID, EX, WB, and MEM. At each stage the processor can pipeline morethan one instruction so that they execute at the same cycle. Recall that some stagecannot be overlapped. For instance, you cannot issue to memory reads at the samestage.Write a program using your favorite programming language that reads assembly codelike the following:LW $0, $1(20) –load instruction at address $1 + 20 and put the result in register $0.ADD $3, $0, $2 –add the content of register $0 to register $2 and store the outcome inregister $3.Your program must simulate the pipeline by creating an execution schedule. Theprogram must determine the dependencies between the instructions, if any, and stallthe pipeline as necessary. The program must show the execution table including thestalls if any. Finally, the program must also output the number…
Suppose that the execution time of a given program on a single processor is 9.5 ms. If you run this program on a system having 18 independent processors, you observe an overall speedup of 1.1. Using Amdahl’s Law, what must have been the fraction of the program that could be executed in parallel? (Express the answer in decimal form, i.e., if 50% of the program can be enhanced, enter 0.5. Round to three decimal places)
Chapter 2 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 2.1 - What sequence of events do you think would be...Ch. 2.1 - What information must the CPU supply to the main...Ch. 2.1 - Prob. 3QECh. 2.2 - Prob. 1QECh. 2.2 - In the text, JUMP instructions were expressed by...Ch. 2.2 - Is the instruction If 0 equals 0, then jump to...Ch. 2.2 - Write the example program in Figure 2.7 in actual...Ch. 2.2 - The following are instructions written in Vole...Ch. 2.2 - What is the difference between the instructions...Ch. 2.2 - Here are some instructions in English. Translate...
Ch. 2.3 - Prob. 1QECh. 2.3 - Suppose the Vole memory cells at addresses 0xB0 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xA4 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xF0 to...Ch. 2.4 - Prob. 1QECh. 2.4 - Prob. 2QECh. 2.4 - Prob. 3QECh. 2.4 - a. Suppose you XOR the first 2 bits of a string of...Ch. 2.4 - Prob. 5QECh. 2.4 - Prob. 6QECh. 2.4 - Prob. 7QECh. 2.4 - Prob. 8QECh. 2.4 - Prob. 9QECh. 2.4 - Prob. 10QECh. 2.4 - Using Vole machine language (Appendix C), write a...Ch. 2.4 - Prob. 12QECh. 2.5 - Prob. 1QECh. 2.5 - Prob. 2QECh. 2.5 - Prob. 3QECh. 2.6 - The hypotenuse example script truncates the sides...Ch. 2.6 - Prob. 2QECh. 2.6 - The Python built-in function str () will convert a...Ch. 2.6 - Use the Python built-in bin () to write a script...Ch. 2.6 - Prob. 6QECh. 2.7 - Referring back to Questions 3 of Section 2.3, if...Ch. 2.7 - Prob. 2QECh. 2.7 - Suppose there were two central processing units...Ch. 2 - a. In what way are general-purpose registers and...Ch. 2 - Answer the following questions in Vole machine...Ch. 2 - Prob. 3CRPCh. 2 - What is the value of the program counter in the...Ch. 2 - Prob. 5CRPCh. 2 - Prob. 6CRPCh. 2 - Prob. 7CRPCh. 2 - Suppose a machine language is designed with an...Ch. 2 - Translate the following instructions from English...Ch. 2 - Rewrite the program in Figure 2.7 assuming that...Ch. 2 - Classify each of the following Vole instructions...Ch. 2 - Prob. 12CRPCh. 2 - Prob. 13CRPCh. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Prob. 18CRPCh. 2 - If the Vole executes an instruction every...Ch. 2 - Prob. 20CRPCh. 2 - Prob. 21CRPCh. 2 - Prob. 22CRPCh. 2 - Prob. 23CRPCh. 2 - Write a program in Vole to compute the sum of...Ch. 2 - Prob. 26CRPCh. 2 - Prob. 27CRPCh. 2 - Suppose the following program, written in Vole, is...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Suppose the registers 0x4 and 0x5 in the Vole...Ch. 2 - Prob. 33CRPCh. 2 - Prob. 34CRPCh. 2 - Prob. 35CRPCh. 2 - Prob. 36CRPCh. 2 - Prob. 37CRPCh. 2 - Prob. 38CRPCh. 2 - Prob. 39CRPCh. 2 - Prob. 40CRPCh. 2 - Prob. 41CRPCh. 2 - Prob. 42CRPCh. 2 - a. What single instruction in the Vole machine...Ch. 2 - Write a Vole program that reverses the contents of...Ch. 2 - Write a Vole program that subtracts the value...Ch. 2 - Prob. 46CRPCh. 2 - Suppose a person is typing forty words per minute...Ch. 2 - Prob. 48CRPCh. 2 - Suppose the Vole communicates with a printer using...Ch. 2 - Write a Vole program that places 0s in all the...Ch. 2 - Prob. 51CRPCh. 2 - Prob. 52CRPCh. 2 - Suppose you are given 32 processors, each capable...Ch. 2 - Prob. 54CRPCh. 2 - Prob. 55CRPCh. 2 - Describe how the average of a collection of...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Prob. 59CRPCh. 2 - Suppose a computer manufacturer develops a new...Ch. 2 - Prob. 2SICh. 2 - Prob. 3SICh. 2 - Prob. 4SICh. 2 - Suppose a manufacturer produces a computer chip...Ch. 2 - Prob. 6SICh. 2 - Prob. 7SICh. 2 - Prob. 8SI
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Now consider the Verilog version of this same simple multicycle implementation: http://aggregate.org/CPE380/multiv.html (Links to an external site.) . Which of the following statements about how that works is false? Group of answer choices The bench module instantiates a processor called PE, and generates the clock input signal to it Symbolic names for things like word size and the implementation of each control signal are given using `define The main memory is a reg array defined in a separate memory module, which is instantiated within the processor module The ALU is specified as using a ripple-carry adder rather than carry lookahead, etc. The control logic is implemented by a case statement that performs the appropriate action(s) for the current STATEarrow_forwardFOR ASSEMBLY LANGUAGE FOR x86PROCESSORS1. Discuss the disadvantages of passing parameters through registers.arrow_forwardUnbalanced pipelined execution takes the same time as non-pipelined execution. Pick one: True/Falsearrow_forward
- Q1: Consider two computers, P1 and P2, of the same instruction set (ISA). We have a program of 7.5x10° instructions and we want to run this program on P1 and P2. The P1 computer is a 5 GHz machine with CPI of 0.8. The P2 computer is a 6 GHz machine with CPI of 1.2. Which computer is faster?arrow_forwardA pure full Implement c/c++ to evaluate round robin algorithm. You must use the job list given here: Job (1) arrive at CPU cycle1 Job (2) arrive at CPU cycle2 Job (3) arrive at CPU cycle36 I/O (32) CPU (54) I/O (45) CPU (20) I/O (40) CPU (48) CPU (39) CPU (48) I/O (55) Your job list must contain CPU bust and I/O bust as above. Quantum time = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60] The evaluation of the most suitable quantum time needs to consider the followingperformance metrics, but not limited to:(i) Turnaround time of the jobs;(ii) Waiting time of the jobs; and(iii) Number of interrupts incurred The code must able to read csv file format of the job list as input file. The code must able for user to input time quantum..arrow_forwardRefer to Assembly ArmV7 x87arrow_forward
- Select the logic to implement a loop using the LOOPNZ instruction. ECX = ECX – 1 if ECX > 0 and ZF=0 , jump to destination O ECX = ECX + 1 if ECX > 0 and ZF=1, jump to destination EDX = EDX - 1 if EDX < 0 or ZF=0 , jump to destinationarrow_forward1. Consider a machine running a program with four classes of instructions: A/B/C/D. The program requires 360 seconds, with the number of seconds executing each class as shown in the table below: Instruction Class A B C Time (sec) 100 80 120 60 1.1. By how much is the total execution time changed if the time for class D is reduced by 20% and the time for class C is increased by 10% (assuming no other changes)? 1.2. If we want to reduce the total execution time by 20% by optimizing class A only, what is the target execution time of class A instructions in order to achieve the reduction (assuming all other instructions are not changed)? 1.3. Can the total time be reduced by 25% if we only optimize class B? Use calculation to justify your answer.arrow_forwardWhat is the minimum number of cycles needed to completely execute n instructions on a CPU with a k stage pipeline? What if you have 2 pipelines of k stages each?arrow_forward
- In clear assembly. code .data languagearrow_forwardAnalyze the code solution below and discuss any gain in performance. To gather measurement values, use any CUDA or OpenMP library API that is used to measure performance (time, speedup, etc..) or by using what is offered by the compiler (C, C++). #include <stdlib.h> //malloc and free #include <stdio.h> //printf #include <omp.h> //OpenMP // Very small values for this simple illustrative example #define ARRAY_SIZE 8 //Size of arrays whose elements will be added together. #define NUM_THREADS 4 //Number of threads to use for vector addition. /* int main (int argc, char *argv[]) { // elements of arrays a and b will be added // and placed in array c int * a; int * b; int * c; intn = ARRAY_SIZE; // number of array elements intn_per_thread; // elements per thread inttotal_threads = NUM_THREADS; // number of threads to use inti; // loop index // allocate space for the arrays a = (int *) malloc(sizeof(int)*n); b = (int *) malloc(sizeof(int)*n); c = (int *)…arrow_forwardSuppose we have two implementations:Machine A has a clock cycle time of 10 ns. and a CPI of 2.0. Machine B has aclock cycle time of 20 ns. and a CPI of 1.2. Which machine is faster for thisprogram, and how much in percentage? Consider that the total instruction in the program is 1x10^9 or about 1,000,000,000 set of instructions since the cycle time is running in nanoseconds.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education