Question

In: Computer Science

For a given CPU, the cycle latency for a set of operations are given as follows:...

For a given CPU, the cycle latency for a set of operations are given as follows:

Addition: 4

Subtraction: 8

Multiplication: 64

Division: 80

If the clock of this CPU runs at 3GHz, find the following

How many operations of each of the list above can this CPU perform in 5 minutes?

If we have a set of operations that contains 10^9 of each operation in the list in part 1, compute the required time in seconds to execute the set. Please explain the formula used.

Solutions

Expert Solution

A CPU frequency of 3 GHz means that the CPU runs (3 * 109) cycles per second.

Thus, the number of instructions of a particular type that can be run in a second

= (Number of CPU cycles per second) / (Number of cycles for the particular instruction type)

Thus, the number of instructions of a particular type that can be run in 5 minutes (300 seconds)

= [300 * (Number of CPU cycles per second)] / (Number of cycles for the particular instruction type)

Thus, number of instructions in 5 minutes for

Addition :

= [300 * (3 * 109)] / 4

= (225 * 109) additions

Subtraction :

= [300 * (3 * 109)] / 8

= (112.5 * 109) subtractions

Multiplication :

= [300 * (3 * 109)] / 64

= (14.0625 * 109) multiplications

Division :

= [300 * (3 * 109)] / 80

= (11.25 * 109) divisions

Now, if we are given number of instructions, then execution time (in seconds)

= [(Number of instructions) * (Cycles per instruction type)] / (Number of CPU cycles per second)

Since we are given that there are 109 operations of each kind, so the total time (in seconds) for

Addition :

= [109 * 4)] / (3 * 109)

= 1.333 seconds

Subtraction :

= [109 * 8)] / (3 * 109)

= 2.667 seconds

Multiplication :

= [109 * 64)] / (3 * 109)

= 21.333 seconds

Division :

= [109 * 80)] / (3 * 109)

= 26.667 seconds

Thus, total execution time (in seconds) for the set

= 1.333 + 2.667 + 21.333 + 26.667

= 52 seconds


Related Solutions

1) For a given CPU, the cycle latency for a set of operations are given as...
1) For a given CPU, the cycle latency for a set of operations are given as follows: ▪ Addition:​4 ▪ Subtraction:​8 ▪ Multiplication:​64 ▪ Division:​128 If the clock of this CPU runs at 4GHz, find the following a. How many operations of each of the list above can this CPU perform in 5 minutes? b. If we have a set of operations that contains 10^9 of each operation in the list in part 1, compute the required time in seconds...
Consider the following set of processes, with the length of the CPU burst given in milliseconds:...
Consider the following set of processes, with the length of the CPU burst given in milliseconds: Process Burst Time Priority P1 2 2 P2 1 1 P3 8 4 P4 4 2 P5 5 3 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, non preemptive priority (a smaller priority number implies...
Consider the following set of processes, with the length of the CPU burst given in milliseconds...
Consider the following set of processes, with the length of the CPU burst given in milliseconds       Process            Burst Time      Priority       P1                    2                      2       P2                    1                      1       P3                    8                      4       P4                    4                      2       P5                    5                      3 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0, a. Draw four Gantt charts that illustrate the execution of these processes using the   following scheduling algorithms: FCFS, SJF, nonpreemptive...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process          Burst Time     P1                             5         P2                             3             P3                             1           P4                             7            P5                             4            The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. If FCFS scheduling is used, what is the average turnaround time of these processes? Answer: Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process          Burst Time     P1                             5         P2                             3             P3                             1           P4                             7            P5                             4           ...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process Arrival Time Burst Time P1 0 5 P2 2 3 P3 3 2 P4 4 4 P5 5 3 a. Draw Gantt charts illustrating the execution of these processes using SJF pre-emptive b. What is the turnaround time of each process for each of the scheduling algorithms c. What is the waiting time of each process for each of the scheduling algorithms  
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process Burst Time Priority Arrival Time P1 10 3 0 P2 1 1 12 P3 2 4 0 P4 1 5 0 P5 5 2 0 In the above table, a smaller priority number implies a higher priority. Suppose that these processes are scheduled by the priority policy with preemption. Draw the Gantt chart (i.e., time chart) illustrating the execution of these processes. What...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds,...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds, and the priority given in integers (lower numbers represent higher priorities) :     Process Arrival Time Burst Time priority          P1                             0 17 2       P2 5 8 3       P3 7 11 1 a. Draw Gantt charts illustrating the execution of these processes using nonpreemptive priority and preemptive priority, and Round Robins scheduling (time quantum = 4 ms). b. What is the...
Explain if the set below is a vector space given standard operations. The set of all...
Explain if the set below is a vector space given standard operations. The set of all even functions defined on R with addition and scalar multiplication defined as follows: 1.) (f+g)(x) = f(x) + g(x) (addition) 2.) (cf)(x) = cf(x)
There are various performance features of the CPU that determine the efficiency of a machine cycle....
There are various performance features of the CPU that determine the efficiency of a machine cycle. Mention four of them with a brief explanation. Support your answer with example when possible. Please write, not a screenshot
Consider the following set of jobs to be scheduled for execution on a single CPU system....
Consider the following set of jobs to be scheduled for execution on a single CPU system. Job Arrival Time Burst (msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold)    (a)     Draw a Gantt chart showing First-Come-First-Served (FCFS) scheduling for these jobs. (b)     Draw a Gantt chart showing preemptive PRIORITY scheduling. (c)    Draw a Gantt chart showing Highest Response Ratio Next (HRRN) scheduling. (d)     Draw a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT