DOC PREVIEW
MIT 6 003 - QUIZ I

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

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 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 9 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 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 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 2004Quiz IAll problems on this quiz are multiple-choice questions. In order to receive credit you must fillin the blank(s) or mark the correct answer or answers for each question. You have 50 minutes toanswer this quiz.Write your name on this cover sheet AND at the bottom of each page of this booklet.Some questions may be much harder than others. Read them all through first and attack them inthe order that allows you to make the most progress. If you find a question ambiguous, be sureto write down any assumptions you make. Be neat. If we can’t understand your answer, we can’tgive you credit!THIS IS AN OPEN BOOK, OPEN NOTES QUIZ.NO PHONES, NO LAPTOP, NO PDAS, ETC.CIRCLE your recitation section number:10:00 1. Ernst/Strauss 2. Madden/Hickey11:00 3. Dabek/Hickey 4. Ernst/Chen 5. Madden/Strauss12:00 6. Dabek/Chen1:00 7. Katabi/Bicket 8. Saltzer/Garfinkel 9. Karger/Lesniewski2:00 10. Saltzer/Bicket 11. Katabi/Lesniewski 12. Karger/GarfinkelDo not write in the boxes below1-3 (xx/30) 4-5 (xx/20) 6-10 (xx/50) Total (xx/100)Name:6.033 Spring 2004, Quiz 1 Page 2 of 9I Reading questions1. [10 points]: Which of the following is an example of a primitive designed for sequence coordi-nation in UNIX (reading #6, “The UNIX time-sharing system”)?(Circle ALL that apply)A. waitB. read on a pipeC. lseekD. mount2. [12 points]: The Flash paper (“Flash: An efficient and portable Web server,” reading # 7),describes the architectures: SPED, AMPED, MP, and MT. For each of the following statements,circle the architectures that apply to the statement:(Circle ALL that apply)A. Suppose a single client issues requests serially (i.e., starting the next request after the responseon the current request has been received) for files located on the disk. Which of the followingarchitectures provides a significant improvement in throughput over the SPED architecture.Choose from: MP, MT, AMPED, None, All.B. Provides the best performance when the cache miss rate is high when serving multiple clients.Choose from: SPED, MP.C. Makes use multiple times of the UNIX fork supervisor call.Choose from: SPED, APMED, MT, MP.D. Assume that the delay observed for a client for a web request for a cached page is broken downas follows: 100 ms network latency to deliver the request packet to the server, 1ms of processingtime at the server, 100 ms of network latency to deliver the page to the client in a return packet.A number of clients issue requests at the same time. Which of the following architectures canprocess more than one request every 201ms.Choose from: MP, MT, SPED, AMPED, None, All.Name:6.033 Spring 2004, Quiz 1 Page 3 of 93. [8 points]: If eight stations on an Ethernet (“Ethernet: distributed packet switching for localcomputer networks”, reading #8) all want to transmit one packet, which of the following statementsis true?(Circle best answer)A. It is guaranteed that all transmissions will succeed.B. It is most likely (i.e., with high probability) that all stations will eventually end up being able totransmit their data successfully.C. Some of the transmissions may eventually succeed, but it is likely some may not.D. It is likely that none of the transmissions will eventually succeed.Name:6.033 Spring 2004, Quiz 1 Page 4 of 9II Local remote procedure callBen Bitdiddle is hired to enforce modularity in a large banking application. He splits the program into twopieces: the client and the server. Ben wants to use remote procedure calls to communicate between the clientand server, which both run on the same physical machine with one processor. So, he sets out to design alocal remote procedure call (LRPC) system using the kernel interface from the class notes. (You can findthis interface in Table 2-1 in Section 2.D.11, but you should be able to make it through the question withouthaving to consult the notes.).The kernel interface is implemented by the kernel program, which runs in the kernel address space. Thekernel manages the address spaces and threads. The client and the server each run in their own user addressspace. The client and server each start with one thread. There are no user programs other than the client andserver running on the machine.Communicating messages. To implement LRPC, the client and server share a block of memory throughwhich they communicate requests and responses. This block is at physical address WELLKNOWNBLOCKand contains a request and a response, each of the type structure message1:structure message {char data[1024]; // the data of the marshalled message (at most 1024 bytes)int size; // the size of the databool present; // is a message present?};structure message request; // request is an instance of structure messagestructure message response; // response is an instance of structure messageThe client and server both map the block of memory at physical address WELLKNOWNBLOCK into theiraddress spaces. The client maps it at the virtual address CLIENT and the server maps it at the virtual addressSERVER.Server operation. To prepare for receiving an LPRC, the server registers with the kernel a virtual address(STACK) to be used as stack pointer and an entry point (the virtual address receive, where the procedureRECEIVE is located). The server maps the well-known block in its address space server asn (the identifierfor the server address space). Then, it calls the supervisor call YIELD so that YIELD can schedule anotherthread, which might perform an LRPC to the server.procedure SERVER()register gate(STACK, receive); // register entry point; see belowallocate bl ock(WELLKNOWNBLOCK); // allocate block of physical memorymap(server asn, WELLKNOWNBLOCK, SERVER); // map it at SERVERwhile (true) do yield();1Read the code in this section II carefully; it will take time, but you should have enough time.Name:6.033 Spring 2004, Quiz 1 Page 5 of 9When a client thread performs an LRPC, the kernel starts the LRPC at address receive in the server’s addressspace, invoking the procedure RECEIVE, and running with the server’s stack at virtual address STACK:procedure RECEIVE()do RP C(SERVER.request.data, SERVER.request.size, SERVER.response);SERVER.response.present ← true;The notation SERVER.request.data means the named data field (data) of the named structure (request) lo-cated on the page with the named virtual address (SERVER).The procedure RECEIVE invokes the


View Full Document

MIT 6 003 - QUIZ I

Documents in this Course
Control

Control

11 pages

PROBLEMS

PROBLEMS

14 pages

Modes

Modes

11 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?