DOC PREVIEW
UH COSC 6360 - COSC 6360 Quiz 2

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 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 24 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 24 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 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Solutions to the Second QuizFirst questionAnswerSecond QuestionSlide 5Third questionSlide 7Slide 8Slide 9Slide 10Slide 11Slide 12Fourth QuestionSlide 14Fifth questionSlide 16Slide 17Slide 18Sixth questionSlide 20Slide 21Slide 22Slide 23Slide 24Solutions to the Solutions to the Second QuizSecond QuizCOSC 6360COSC 6360Fall 2011Fall 2011First questionFirst questionWhat must a programmer do to ensure What must a programmer do to ensure that a given program will execute that a given program will execute correctlycorrectly on on TreadMarksTreadMarks? ?AnswerAnswerAll access to shared data must be All access to shared data must be preceded by apreceded by aTmk_lock_acquire()Tmk_lock_acquire()and followed by a and followed by a Tmk_lock_release().Tmk_lock_release().Second QuestionSecond QuestionWhat is the main advantage of What is the main advantage of TreadMark lazy releaseTreadMark lazy release policy policy compared to compared to Munin eager releaseMunin eager release policy? policy?AnswerAnswerIt reduces the communication overhead It reduces the communication overhead of the DSM. of the DSM. Comment:Comment:I asked for an advantage!I asked for an advantage!Third questionThird questionWhat is What is inheritanceinheritance in Mach? in Mach?At which level is it defined? At which level is it defined? Explain how Mach uses it to support Explain how Mach uses it to support both both regularregular and and lightweightlightweight processes. processes.AnswerAnswerInheritance defines what happens to a Inheritance defines what happens to a range of addresses when a process forks range of addresses when a process forks a child. a child.Third questionThird questionWhat is What is inheritanceinheritance in Mach? in Mach?At which level is it defined?At which level is it defined? Explain how Mach uses it to support Explain how Mach uses it to support both both regularregular and and lightweightlightweight processes.processes.AnswerAnswerInheritance is defined at the level of Inheritance is defined at the level of address ranges address ranges containing all addresses containing all addresses mapped by a specific memory object.mapped by a specific memory object.Comment:Comment:Nobody came with such a detailed Nobody came with such a detailed answer.answer.Third questionThird questionWhat is What is inheritanceinheritance in Mach? in Mach?At which level is it defined? At which level is it defined? Explain how Mach uses it to support Explain how Mach uses it to support both both regularregular and and lightweightlightweight processes. processes.AnswerAnswerMach specifies the inheritance attribute Mach specifies the inheritance attribute of its data segment to beof its data segment to beCOPYCOPY when it performs a regular when it performs a regular UNIX fork()UNIX fork()SHAREDSHARED when it forks a lightweight when it forks a lightweight process. process.AnswerAnswerNew size(T1) = 127 New size(T1) = 127 T1T1 loses the page loses the pageNew target_T1 =128New target_T1 =128Remains unchangedRemains unchangedFourth QuestionFourth QuestionConsider an ARC cache with a total Consider an ARC cache with a total capacity of 512 pagescapacity of 512 pagesAssume size(T1) = target_T1 =128 pagesAssume size(T1) = target_T1 =128 pagesHow these two parameters would be How these two parameters would be affected if:affected if:A page already present in T1 is A page already present in T1 is referenced a second time? referenced a second time? A page that has never been accessed A page that has never been accessed before is brought into the cache?before is brought into the cache?AnswerAnswerNew size(T1) = 128New size(T1) = 128Since Since size(T1) = target_T1, size(T1) = target_T1, ARC will ARC will expel one page in T to make space for expel one page in T to make space for the incoming pagethe incoming pageNew target_T1 =128New target_T1 =128Remains unchangedRemains unchangedFifth questionFifth questionWhat is the main issue raised byWhat is the main issue raised by dirty dirty superpagessuperpages??How do Navarro How do Navarro et al.et al. propose to solve propose to solve it? it?AnswerAnswerSince each superpage only has a single Since each superpage only has a single dirty bit, the page replacement policy has dirty bit, the page replacement policy has no way to knowno way to knowWhich base pages areWhich base pages are dirty dirty—and must —and must be flushed out when the superpage is be flushed out when the superpage is expelled from main memoryexpelled from main memoryWhich base pages areWhich base pages are still clean still cleanFifth questionFifth questionWhat is the main issue raised byWhat is the main issue raised by dirty dirty superpagessuperpages??How do Navarro et al. propose to solve it?AnswerAnswerNavarro et al. propose to avoid this issue Navarro et al. propose to avoid this issue by disbanding superpages the first time by disbanding superpages the first time one of their base pages gets modifiedone of their base pages gets modified1818Sixth questionSixth questionWhat is the main advantage ofWhat is the main advantage of MCS MCS lockslocks??When does it result in a much better When does it result in a much better system performance? system performance? When does it not?When does it not?AnswerAnswerMCS locks have a much lower contention MCS locks have a much lower contention overhead than conventional spinlocksoverhead than conventional spinlocksBecause waiting processes are put on Because waiting processes are put on a queuea queueSixth questionSixth questionWhat is the main advantage ofWhat is the main advantage of MCS MCS lockslocks?? When does it result in a much better When does it result in a much better system performance? system performance? When does it not? When does it not?AnswerAnswerThey perform much better than spinlocks They perform much better than spinlocks at high contention rates. at high contention rates.Sixth questionSixth questionWhat is the main advantage ofWhat is the main advantage of MCS MCS lockslocks?? When does it result in a much better When does it result in a much better system performance?system performance? When does it not? When does it not?AnswerAnswerThey often perform worse than spinlocks They often perform worse


View Full Document

UH COSC 6360 - COSC 6360 Quiz 2

Documents in this Course
Load more
Download COSC 6360 Quiz 2
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 COSC 6360 Quiz 2 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 COSC 6360 Quiz 2 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?