q1_fall06_sol

q1_fall06_sol - Department of Electrical Engineering and...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.828 Operating System Engineering: Fall 2006 Quiz I All problems are open-ended questions. In order to receive credit you must answer the question as precisely as possible. You have 80 minutes to answer 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 in the order that allows you to make the most progress. If you find a question ambiguous, be sure to write down any assumptions you make. Be neat. If we can’t understand your answer, we can’t give you credit! THIS IS AN OPEN BOOK, OPEN NOTES QUIZ. 1 (xx/20) 2 (xx/10) 3 (xx/25) 4 (xx/35) 5 (xx/10) Total (xx/100) Name: Solution Set Quiz score statistics: median 65, mean 67, maximum 100. I 6.828 FALL 2006, Quiz 1 Page 2 of 9 Processes and concurrency 1. [10 points]: Ben Bitdiddle observes that releases and acquires of proc table lock are spread through proc.c, which makes it difficult to reason if the code is correct. He rereads the comment on line 2222, and proposes that the to-be-scheduled process doesn’t release proc table lock when it runs. That is, he removes all the acquire and release calls for proc table lock except the two already in scheduler . He recompiles xv6 and boots it. What will Ben observe? Only one processor at a time will be able to run a user process. Name: 6.828 FALL 2006, Quiz 1 Page 3 of 9 2. [10 points]: Dissatisfied with the simplification of the previous question, Ben Bitdiddle explores another altnerative. He undoes all his changes, and now he modifies the code so that during a context switch from one process to another, proc table lock isn’t held. That is, he makes the following changes: – release proc table lock before line 2262 and before line 2229; – acquire at 2231; – remove the releases in, for example, yield and sleep . Ben observes a race condition between one processor running scheduler and a second proces- sor running yield (on behalf of a user process). Give a timeline of events with 2 processes that demonstrates the race condition....
View Full Document

This note was uploaded on 05/29/2010 for the course 6 828 taught by Professor Guy during the Spring '08 term at MIT.

Page1 / 9

q1_fall06_sol - Department of Electrical Engineering and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online