DOC PREVIEW
MIT 6 033 - Quiz I - Solutions - 6.033

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Department of Electrical Engineering and Computer ScienceMASSACHUSETTS INSTITUTE OF TECHNOLOGY6.033 Computer Systems Engineering: Spring 2008Quiz I - Solutions 0 5 10 15 20 25 30 3596-10091-9586-9081-8576-8071-7566-7061-6556-6051-5546-5041-4536-4031-35CountScore2008 Quiz 1 GradesMean: 73Median: 76StDev: 156.033 Spring 2008, Quiz 1 Page 2 of 12I Reading Questions1. [6 points]: Which of the following statements are true of the X Window System (as described inthe X Windows paper, reading #5)?(Circle True or False for each choice.)A. True / False The only use for windows in X is to give each application its own virtual display.False. They are also used for menus, buttons, etc. This is the reason for the window hierarchy. It isonly “top-level” windows that are meant to abstract the display.B. True / False X version 10 supports running an X client on the same computer as the X server.True.C. True / False When using an X server in a typical way, with several applications running in separatetop-level windows, it’s only the server that is responsible for determining the placement of top-levelwindows.False. The window manager also plays an important role, and it is not part of the server.2. [8 points]: Which of the following statements about Eraser (described in reading #7) is true?(Circle True or False for each choice.)A. True / False By extending the basic Lockset algorithm to reduce false positives for initializationand read sharing (Section 2.2), the number of false negatives is also reduced.False. The extended algorithm ignores unprotected access during initialization by adding the exclu-sive and shared states. However, there is a possibility of an undetected race condition when startinga thread. A modification could be made by the parent thread while the variable is still in the exclusivestate, concurrent with starting a child thread that will access that variable. Depending on how quicklythe child thread starts running, Eraser might or might not flag this as a violation.B. True / False For a given program, Eraser detects the same race conditions for every execution ofthis program.False. Eraser only flags errors in code that executes. Some code branches (e.g. error handling code)will only execute rarely, and may not execute in any given run of the program.C. True / False For each shared-modified variable, the Lockset algorithm determines a set of candidatelocks. The Lockset algorithm reports a race condition if this set is empty.True. By the definition of the Lockset algorithm.D. True / False A use of locks that eliminates race conditions also eliminates deadlocks.False. acquire(lock); acquire(lock); has no races but will cause deadlock.Name:6.033 Spring 2008, Quiz 1 Page 3 of 123. [8 points]: Based on the description of UNIX in the 1974 Ritchie and Thompson paper (read-ing #6), which of the following statements are true?(Circle True or False for each choice.)A. True / False The execute() system call creates a new process, loads the requested image, loadsarguments onto the stack, and jumps to the appropriate entry point.False. execute() does not create a new process; it replaces the currently running image.B. True / False A file’s i-node is stored in the first 64 bytes of the file.False. I-nodes are located in an i-node table, in a part of the disk distinct from file contents.C. True / False Suppose a process allocates a variable x on the stack, then forks a child process. Thechild may change its value of variable x without changing the value of x seen by the parent process.True. The child’s memory is distinct from the parent’s.D. True / False Any two running processes can communicate by creating a shared pipe.False. Two processes can only communicate through a pipe if a common ancestor created the pipe,and let the processes inherit the pipe file descriptors.4. [8 points]: Based on the the investigation of the Therac-25 accidents (reading #4), which of thefollowing statements about the Therac-25 are true?(Circle True or False for each choice.)A. True / False The race conditions that caused some of the accidents could have been avoided by theuse of locks and condition variables.True. Proper use of locks and condition variables would have eliminated at least one of the bugs.For example, locking the MEOS two-byte variable would have prevented the prescription from beingchanged after Datent has read the index from the high-order byte of MEOS.B. True / False The manufacturer proved that faulty switches caused the first accidents.False. The manufacturer believed that this was the cause of the accident, but were not able to showtheir theory was correct.C. True / False The authors of the paper believe that, in practice, hardware interlocks are necessary forsafety.True. The authors discuss the need for hardware interlocks in critical systems in the “System Engi-neering” section of “Lessons Learned”, on p. 38 of the paper.D. True / False The fact that the Therac-25 was a multi-function machine, supporting two types ofradiation, contributed to the accidents.True. Some of the accidents occurred when one part of the machine was set for electron radiationand another part was set for a X-rays.Name:6.033 Spring 2008, Quiz 1 Page 4 of 12II UNIX File SystemFor his many past sins on previous 6.033 quizzes, Ben Bitdiddle is assigned to spend eternity maintaining aPDP-11 running the version of UNIX described in the 1974 Ritchie and Thompson paper. The file systemimplementation is described in Section IV of the paper.Recently, one of his user’s database applications failed after reaching the file size limit of 1,082,201,088 bytes(approx 1 GB). In an effort to solve the problem, he upgraded the computer with an old 4 GB (232byte)drive – the disk controller hardware supports 32 bit sector addresses, and can address disks up to 2 TB insize. Unfortunately, Ben is disappointed to find the file size limit unchanged after installing the new disk.In this question, the term block address refers to the block pointers stored in i-nodes. In Ben’s system(described in the paper) each i-node contains 13 block addresses of 4 bytes each; the first 10 block addressespoint to the first 10 blocks of the file, with the remaining 3 addressing the rest of the file. The 11th blockaddress points to an indirect block, containing 128 block addresses, the 12th block address points to adouble-indirect block, containing 128 indirect block addresses, and the 13th block address points to a triple-indirect


View Full Document

MIT 6 033 - Quiz I - Solutions - 6.033

Documents in this Course
TRIPLET

TRIPLET

12 pages

End Layer

End Layer

11 pages

Quiz 1

Quiz 1

4 pages

Threads

Threads

18 pages

Quiz I

Quiz I

15 pages

Atomicity

Atomicity

10 pages

QUIZ I

QUIZ I

7 pages

Load more
Download Quiz I - Solutions - 6.033
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Quiz I - Solutions - 6.033 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Quiz I - Solutions - 6.033 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?