






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The cs162 operating systems midterm #2 exam held at the university of california, berkeley, in april 2006. The exam covers various topics such as translation look-aside buffers, networking, caching, file systems and disks, read-ahead, raid, synchronization, and reliable peer-to-peer file sharing.
Typology: Exams
1 / 10
This page cannot be seen from the preview
Don't miss anything!
University of California, Berkeley College of Engineering Computer Science Division – EECS
Spring 2006 Anthony D. Joseph
April 26, 2006 CS162 Operating Systems
Your Name:
SID AND 162 Login:
TA Name:
Discus sion Section Time:
General Information: This is a closed book and notes examination. You have 90 minutes to answer as many questions as possible. The number in parentheses at the beginning of each question indicates the number of points given to the question; there are 100 points in all. You should read all of the questions before starting the exam, as some of the questions are substantially more time consuming.
Write all of your answers directly on this paper. Make your answers as concise as possible. If there is something in a question that you believe is open to interpretation, then please ask us about it!
Problem Possible Score
ii) (3 points) Give a two to three sentence description of “precise exceptions”.
iii) (2 points) Briefly (1-2 sentences) say why precise exceptions are nice to have.
b. (4 points) Networking: i) (2 points) The current version of IP uses 32-bit addresses. List one reason that we cannot use all 2^32 addresses.
ii) (4 points) What is the maximum file size?
b. (12 points) Disk requests come into the disk driver for cylinders: 10, 22, 20, 2, 40, 6, and 38, in that order. The disk head is currently positioned over cylinder 20. A seek takes 6 milliseconds per cylinder moved. What is the sequence of reads and total seek time using each of the following algorithms? i) (4 points) First-come, first-served:
ii) (4 points) Shortest Seek Time First:
iii) (4 points) SCAN (initially moving upwards):
c. (2 points) Briefly (2-3 sentences) state the difference between a hard link and a soft link.
d. (7 points) Read-ahead. i) (3 points) Give a brief (2-3 sentences) description of read-ahead.
ii) (2 points) Briefly (2-3 sentences) state why read-ahead is useful.
iii) (2 points) Briefly (2-3 sentences) state what happens if you read ahead too much.
e. (7 points) RAID i) (3 points) Give a brief (2-3 sentences) description of RAID 5.
ii) (2 points) How many disk failures can RAID 5 tolerate without losing data?
iii) (2 points) How would you reconstruct a failed disk?
The packets travel one hop to router RTR, which will in turn forward the packets to their final destination. Assume that no packets will be lost, and assume that the processing time at the router is negligible, and a router must wait for the entire packet to arrive before forwarding it.
The receiving network controller uses DMA to copy the data it receives to memory, and when the last bit arrives and is transferred, it interrupts the CPU. The OS copies the data to the P2P application’s buffer in user space. After the copy completes, the OS sends back a one-byte acknowledgement to the sending OS. For simplicity, you may treat acknowledgements as if they are zero bytes long. Assume that a sender uses a send window-based acknowledgement protocol.
System Parameters:
a. (7 points) Compute Tpkt, the time to reliably send a single packet from a P2P application on computer 2 to a P2P application on computer 1 over a link with no losses.
1 RTR 2
b. (3 points) What is the maximum or peak rate at which one process can reliably send data to another process?
c. (4 points) In terms of Tpkt, how long does it take to reliably send an .mp3 file from computer 2 to computer 1 if the file is 4,000,000 bytes in size (assuming the links have no losses)?
d. (5 points) If we use a send window of 40 outstanding packets instead, what is the maximum rate at which one process can reliably send data to another process (assuming the links have no losses)?
e. (4 points) If we use a send window of 40 outstanding packets instead, how long does it take to reliably send an .mp3 file from computer 2 to computer 1 if the file is 4,000,000 bytes in size (assuming the links have no losses)?
This page intentionally left blank