






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
Main points of this exam paper are: Addressable Piece, Notes Examination, Closed Book, Parentheses, Substantially More, More Time Consuming, Interpretation, Unix Structure, Keep Track, Disk Drive
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 2003 Anthony D. Joseph
April 29, 2003 CS162 Operating Systems
Your Name:
SID AND 162 Login:
TA:
Discussion Section:
General Information: This is a closed book and notes examination. You have two hours 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
b. (2 points) What is the smallest addressable piece of data on a disk drive?
c. (2 points) What is a persistent, named collection of data?
d. (2 points) What is a piece of hardware that caches virtual page → physical page mappings?
e. (8 points) Consider two processes P and Q that are communicating using mailboxes. From P → Q they use mailbox A, and from Q → P they use mailbox B. Assume both mailboxes are currently empty and the communication link between P and Q is reliable. If P now wants to determine that Q has terminated, what is the sequence of instructions that P should execute? You may only use the following blocking instructions: send, reply, re-send, receive, deleteMailbox, createMailbox, and setAlarm. Note that an alarm will interrupt a blocking instruction.
Problem 2 (cont’d) c. (9 Points) Suppose a file system can have three disk allocation strategies, contiguous, linked, and indexed. We have just read the information for a file from its parent directory. For contiguous and linked allocation, this gives the address of the first block, and for indexed allocation this gives the address of the index block. Now we want to read the 10th^ data block into the memory. How many disk blocks ( R ) do we have to read for each of the allocation strategies? For partial credit, explicitly list which block(s) you have to read.
Contiguous allocation:
Linked allocation:
Indexed allocation:
The first set of questions is about adding hard links to the file system. a. (4 points) What changes would you make to the internals (directory, fileheader, free map, etc.) of the filesystem to support hard links?
b. (5 points) How do the semantics of the Remove system call change, and how do you implement that change to Remove and any other affected system calls?
c. (3 points) What new system calls, if any, must be added to the system? Give the C language-style signature of any new calls, e.g., int Open(char *file). List the signature and give a one sentence definition of each argument and return value.
b. (4 points) How do the security system (e.g., file permissions) and the virtual memory system?
No Credit – Problem X: (000000000000 points)
Found on the Internet:
Mathematics in 1950: Question: A logger sells a truckload of lumber for $100. His cost of production is 4/5 of the price. What is his profit?
Mathematics in 1960: Question: A logger sells a truckload of lumber for $100. His cost of production is 4/5 of the price, or $80. What is his profit?
Mathematics in 1970: Question: A logger exchanges a set “L” of lumber for a set “M” of money. The cardinality of set “M” is 100. Each element is worth one dollar. Make 100 dots representing the elements of the set “M.” Set “C,” the cost of production, contains 20 fewer points than set “M.” Represent set “C” as a subset of set “M” and answer the following question: What is the cardinality of the set “P” of profits?
Mathematics in 1980: Question: A logger sells a truckload of lumber for $100. His cost of production is $80 and his profit is $20. Your assignment: Underline the number 20.
Mathematics in 1990: Question: By cutting down beautiful forest trees, the logger makes $20. What do you think of this way of making a living? Topic for class participation after answering the question: How did the forest’s birds and squirrels feel as the logger cut down the trees? There are no wrong answers.
Mathematics in 2002: Question: A logger sells a truckload of lumber for $100. His cost of production is $120. How does Arthur Andersen determine that the logger’s profit margin is $60? Bonus points: Explain how an Enron accountant can double this profit by selling the lumber to an out-of-state friend, repurchasing it, and selling it to the State of California.
Problem 5 (cont’d) c. (6 points) Assume that the receiver can process incoming data at greater than 100 Mbit/s, what is the optimal window size that the receiver should advertise?
d. (4 points) If the link is shared by N pairs of senders and receivers, does your answer for part (c) change? If so, how? If not, why?