CS252 Midterm - CS252: Midterm Exam 1. Mention the...

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

View Full Document Right Arrow Icon
CS252: Midterm Exam 1. Mention the advantages and disadvantages of non preemptive scheduling. 2.Why do system calls use software interrupts instead of procedure calls? 3.What is the difference between a thread and a process? What is stored in a PCB that represents the state of a thread and a process? What are the advantages of using threads instead of processes and vice versa? 4. What are the advantages and disadvantages of having a small quantum compared to a large quantum in time sharing scheduling.
Background image of page 1

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

View Full DocumentRight Arrow Icon
5. Write the code for a test-and-set lock() and unlock() . Mention the advantages and disadvantages of test-and-set locks compared to locks implemented by disabling interrupts. 6. Write the code for the semaphore signal () and wait () operations. Include lock operations. Why are locks necessary in the semaphore operations? 7. The following program consists of two threads: a client thread and a server thread.
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 01/30/2012 for the course CS 252 taught by Professor Gustavorodriguez during the Fall '11 term at Purdue University-West Lafayette.

Page1 / 5

CS252 Midterm - CS252: Midterm Exam 1. Mention the...

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