Operating Systems Homework
CS314 - Operating Systems Homework 5 (Fall ’17)
1 Administrivia
Homeworks should be done individually and turned in via Moodle. Homeworks will be graded with a percentage of completeness. The maximum points attainable for each question is listed next to the question.
LaTeX version of this file is here: /home/cs314/hw5.tex
2 Assignment
1. (10 points) DDR3 SDRAM can read or write a word of memory with a latency of about 10 nanoseconds. Suppose that when an interrupt occurs, the program counter, PSW, and an additional 30 CPU registers are pushed onto the stack. What is the maximum number of interrupts per second that this machine can process (assume that each interrupt is handled, but does no actual work)?
2. (20 points) A 10000 RPM disk has 8 heads and 480 cylinders. It is divided into 120-cylinder zones with the cylinders in different zones containing 200, 240, 280, and 320 sectors. As- sume each sector contains 4096 bytes and a seek time between adjacent cylinders of 2 msec. Calculate the following:
(a) Disk capacity.
(b) Maximum data transfer rate (this will differ depending on the zone).
3. (10 points) Assume that on some computer the overhead of trapping to the kernel for clock ticks is about 2 microsecond, with the handler requiring another 9 microseconds. Clock ticks typically occur at a frequency of 500Hz. What percentage of the CPU’s time is devoted to the clock?
4. (10 points) If a programmable clock uses a 3000 MHz crystal, what should be the value of the holding register to achieve a clock resolution of a millisecond? How about 100 microseconds?
5. (20 points) Answer the following with the assumption that you have a RAID 5 array:
(a) Including the human involved in the process, generally describe the steps between the time of failure and restoration of normal I/O activity.
(b) What RAID arrangement could allow for normal I/O activity to immediately continue, regardless of the failure and the slow human?
6. (20 points) Consider the elevator scan disk scheduling algorithm:
(a) What are the benefits of modifying the algorithm so that it always scans in the same direction?
(b) In what way can the algorithm, or something similar, be applied to a large tape archive system, where instead of a read/write arm as on the disk, you have a robot arm shuttling cartridges from storage to read/write heads.
7. (10 points) If a laptop is set up to take maximum advantage of power saving features, such as shutting down the display and hard disk after periods of inactivity and a user sometimes runs UNIX in text mode and sometimes uses X Windows, why might battery life be significantly better when using text-only programs?
- Administrivia
- Assignment