DOC PREVIEW
MIT 6 033 - QUIZ I

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 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 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 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 2011Quiz IThere are 10 questions and 7 pages in this quiz booklet. Answer each question according to theinstructions given. You have 50 minutes to answer the questions.Some questions are harder than others and some questions earn more points than others—you maywant to skim all questions before starting.For true/false questions, you will receive 0 points for no answer, and negative points for an incor-rect answer.If you find a question ambiguous, be sure to write down any assumptions you make. Be neat andlegible. If we can’t understand your answer, we can’t give you credit!Write your name in the space below. Write your initials at the bottom of each page.THIS IS AN OPEN BOOK, OPEN NOTES, OPEN LAPTOP QUIZ, BUTDON’T USE YOUR LAPTOP FOR COMMUNICATION WITH OTHERS.CIRCLE your recitation section number:10:00 1. Lampson/Pesterev11:00 2. Lampson/Pesterev 3. Ports/Mutiso12:00 4. Ports/Mutiso1:00 5. Katabi/Raza 6. Strauss/Narula2:00 7. Katabi/Raza 8. Strauss/NarulaDo not write in the boxes below1-4 (xx/40) 5-7 (xx/30) 8-9 (xx/20) 10 (xx/10) Total (xx/100)Name:6.033 Spring 2011, Quiz 1 Page 2 of 7I Reading Questions1. [10 points]: Which of the following are true statements about the Eraser system, according to thepaper by Savage et al?(Circle True or False for each choice.)A. True / False Eraser always detects and reports bugs that would cause a program to deadlock (whereall of the programs threads wait concurrently trying to acquire locks).B. True / False If a program contains a race condition bug, Eraser needs to observe an interleaving ofprogram threads where that bug causes a race before Eraser can report that the bug exists.C. True / False Because Eraser modifies a binary program with its own instrumentation routines, Eraserwould be an ideal tool to identify locking errors in a program which uses custom memory allocationroutines, has its own special-purpose synchronization plan that does not use standard acquire and re-lease functions, and for which no source code is available.D. True / False For each memory location in the Exclusive state, Eraser sets the candidate set for thatlocation to all the locks held by the single thread that wrote to that memory location.2. [10 points]: Which of the following statements about VMware’s x86 virtual machine monitor aretrue, according to the paper by Agesen et al?(Circle True or False for each choice.)A. True / False The x86 architecture originally contained instructions that were non-virtualizable usingtrap-and-emulate virtualization.B. True / False Shadow page tables store the mappings from guest physical to host physical memoryaddresses.C. True / False VMware’s VMM prevents the guest from accessing the memory used for the VMM’sinternal state by unmapping the corresponding entries in the guest’s page table.D. True / False VMware’s binary translation-based VMM translates guest kernel-mode instructionsbut not guest user-mode instructions.E. True / False A monitor using hardware-assisted virtualization (Intel’s VT-x or AMD-V) is alwaysfaster than one using binary translation.Initials:6.033 Spring 2011, Quiz 1 Page 3 of 73. [10 points]: For v7 Unix processes as described in the paper by Ritchie and Thompson, which ofthe following statements are true?(Circle True or False for each choice.)A. True / False In Unix v7’s time sharing, all processes receive an equal fraction of CPU time.B. True / False In Unix v7, a parent process and its child process can have exactly the same memorycontents but execute different instructions.C. True / False In Unix v7, two child processes can communicate via a pipe only if the pipe is createdby a common ancestor (where a process can be considered to be its own ancestor).D. True / False Two processes in Unix v7 can communicate via shared memory, regardless of whetherthey have a common ancestor or not.II Client/server4. [10 points]:Which of these statements about client/server organization are true or false?(Circle True or False for each choice.)A. True / False In a client-server system, the client and the server always run on different machines.B. True / False A client-server system can be faster than a system using the same code to do the actualwork, but in which everything runs in the same process, in spite of the added cost of communicationbetween the client and the server.C. True / False In a client-server system that uses remote procedure call, the only important differencefrom a similar system that uses local procedure call is that the remote calls may be substantially slower.D. True / False A server that wants to provide at-least-once semantics to a client must store a table ofprevious responses.E. True / False X Windows is not an example of a client-server system because the so-called X serverruns on the client’s machine.Initials:6.033 Spring 2011, Quiz 1 Page 4 of 7III ConcurrencyBen Bitdiddle wants to implement a concurrent application. Instead of doing the sensible thing and holding alock while manipulating shared data, Ben decides to be clever. Ben’s code, shown below, runs in two separatethreads on a computer with two CPUs; no other threads are running on the system. There are three sharedglobal variables, initialized before the threads start: i is initialized to zero, x is initialized to a three elementarray of zeros, and x lock is in the unlocked state.Thread 1:while i < 3 do:while i % 2 == 0 do:# (while i is even)yield()acquire(x_lock)x[i] = 1i = i + 1release(x_lock)Thread 2:while i < 3 do:while i % 2 == 1 do:# (while i is odd)yield()acquire(x_lock)x[i] = 2i = i + 1release(x_lock)5. [10 points]: After both threads reach the end of their code segments, which of the following arepossible values for the contents of the x[] array?(Circle True or False for each choice.)A. True / False x=2,1,1B. True / False x=2,2,2C. True / False x=2,1,2D. True / False x=2,2,1Initials:6.033 Spring 2011, Quiz 1 Page 5 of 7Now suppose that thread 1 instead runs the following variation below. Thread 2 runs the same code as before(shown below for convenience), and global variables are initialized in the same way as before.Thread 1:a = 0while i < 3 do:while i % 2 == 0 do:# (while i is even)yield()a = iacquire(x_lock)x[a] = 1i = a + 1release(x_lock)Thread 2:while i < 3 do:while i % 2 == 1 do:# (while i is odd)yield()acquire(x_lock)x[i] = 2i = i + 1release(x_lock)6. [10


View Full Document

MIT 6 033 - QUIZ I

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

Load more
Download QUIZ I
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 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 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?