ECE357_2009FALL_EXAM1_PROFSOLN_[0] - ECE357 Computer...

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

View Full Document Right Arrow Icon
ECE357 -- Computer Operating Systems Final Examination ©2009 JeffHakner SOLUTION KEY Multiple-Choice (4 points each) Pick the one best answer for each question. Please print your answers in UPPER-CASE using the space provided 1) A commonly invokedprogram such as /bin/sh is exec’donasystem which has been up for a long time. When the program begins running, we expect a) A minor page fawlt b) A major page fawlt c) A protection fawlt due to c-o-w d) No fawlt at awl We know that all programs aredemand-paged, and that when execution starts, the page tables are entirely vacant. Thereforeweknow that the very first opcode fetchcauses a page fault [week 5, pg .12], or "fawlt" as it is known in certain parts of Queens and Nassau county .Copy-on-write does not come into play as no write is being attempted. Amajor page fawlt requires an I/O operation to complete ,while a minor fawlt can be resolved without I/O [week 11, pp. 14/15] The hint is that this is a programwhichislikely to still be in memory ,because it is invoked frequently and the system has been up for a while .Therefore, weexpect that the fawlt can be resolved by simply creating a PTE pointing to an existing page frame whichcontains the required portion of the text. 2) A file is opened O_WRONLY|O_CREAT|O_TRUNC on an EXT2 filesystem. One byte is written, then an lseek to offset 16384 is performed, then one more byte is written. Assume the filesystem allocation unit is 4K. Neglecting inodes, directory entries, free maps and other such data structures, howmanybytes of disk storage does the file consume? a) 8192 b) 4096 c) 16384 d) 16385
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECE357 -- Computer Operating Systems Final Examination ©2009 JeffHakner 3) In the Linux/X86 kernel architecture a) an interrupt handler may pre-empt a page fawlt handler b) an interrupt handler may acquire a blocking mutex c) nothing can interrupt an interrupt handler d) tasks running as root are not pre-empted by interrupt handlers [week 8, pp.6/7] A synchronous exception, suchasasystem call or page fawlt, can be pre-empted by an asynchronous exception (interrupt), choice (a). An interrupt handler can also be pre- empted by a higher priority interrupt. Thereforechoice (c) is wrong .Interrupt handlersshould not takealong time to finish, and areabsolutely forbidden from blocking .Doing so would put the current innocent bystander task to sleep, and might lockupthe entiresystem. Therefore(b) is
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/27/2012 for the course CHEMISTRY/ CH/ECE/PH/ taught by Professor Faculty during the Spring '08 term at Cooper Union.

Page1 / 10

ECE357_2009FALL_EXAM1_PROFSOLN_[0] - ECE357 Computer...

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

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