A. Ch. 5-Programmed I/O (Polling) What fraction of a 1 GHz CPU\'s time is spent
ID: 3713248 • Letter: A
Question
A. Ch. 5-Programmed I/O (Polling) What fraction of a 1 GHz CPU's time is spent polling the following devices if each polling action takes 500 clock cycles? Mouse must be interrogated at least 20 times per second Hard drive sends data 4 bytes at a time at a rate of 2 MB/s B. Ch.5-Interrupt-driven I/o 1. 2. Assume that we have a hard disk that produces 20 interrupts per second when active, and assume that the disk is active 10% of the time. The overhead of interrupting the CPU and performing the transfer is 1000 clock cycles. What fraction of a 1 GHz CPU's time is spent attending to the hard disk drive? C. Ch. 6-Modified Amdahl's Law we have a program that is 90% "parallelizable": 90% of the program can be run in parallel, while 10% must be run sequentially. This program is currently run on a uniprocessor machine. What is the speedup if we run this program on a machine with 10 processors (cores)?Explanation / Answer
A.
1.
For mouse,
fraction of CPU time spent polling = ((clock cycles used per second for polling) / (CPU Processing Rate)) * 100 %
= ((500 clock cycles * 20 times per second) / (1 GHz)) * 100 %
= ((10000 clock cycles per second) / (109)) * 100 %
= (10-5) * 100 %
= 0.001 %
2.
For hard drive,
Polling Rate = Data rate / data size
= (2 MB/s) / 4 B
= (2 * 10^6/s) / 4
= (2000000/s) / 4
= 500000/s
fraction of CPU time spent polling=((Polling Rate * Number of clock cycles per poll) / CPU Processing Rate) * 100%
= ((500000 * 500) / 1 GHz) * 100 %
= ((25 * 107) / 109) * 100 %
= (25/100) * 100 %
= 25 %
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.