CS241 System Programming Review SessionMidterm DateMidterm MaterialTextbook ChaptersReview Questions (Processes)Review Questions (Scheduling)Slide 7Review Questions (Synchronization)Review Questions (Deadlock)Review Questions (Deadlock)Slide 11SummaryCS241 System ProgrammingReview Session Klara NahrstedtReview for Midterm3/8/200601/14/19 CS 241 - System Programming, Klara Nahrstedt2Midterm DateMarch 9, 7-7:50pmRoom Allocation–Last Name A-K go to room 1404 SC–Last Name L-Z go to room 1320 DCLBring with you Student ID and penExam is closed book, closed notes, no calculators01/14/19 CS 241 - System Programming, Klara Nahrstedt3Midterm Material Process and Thread ManagementSynchronizationSchedulingSignals and TimersDeadlocks01/14/19 CS 241 - System Programming, Klara Nahrstedt4Textbook ChaptersTanenbaum Chapters: –Chapter 2 (2.1-2.4)–Chapter 3 (3.3.1-3.3.5)Robins&Robins –Chapter 2 (2.1-2.11)–Chapter 3 (3.1-3,7)–Chapter 8 (8.1-8.5)–Chapter 9 (9.1-9.5)–Chapter 12 (12.1-12.6)–Chapter 13 (13.1-13.6)–Chapter 14 (14.1-14.5)01/14/19 CS 241 - System Programming, Klara Nahrstedt5Review Questions (Processes) What is a process?What is a PCB?List some fo the queues on a typical systemHow are these queues typically implemented?What is “time sharing”? What kind of scheduling does it involve? What is context switch?Describe the producer/consumer problem Give example of producer/consumer problem01/14/19 CS 241 - System Programming, Klara Nahrstedt6Review Questions (Scheduling) What is a CPU burst? An I/O burst?An I/O bound program would typically have what kind of CPU burst? What is FIFO?What is the “dispatcher”?List at least three performance criteria we could select to optimize our system What is throughput?What is FCFS?What is convoy effect? What is SJF?01/14/19 CS 241 - System Programming, Klara Nahrstedt7Review Questions (Scheduling) What are the advantages of SJF? Disadvantages?How are priority and SJF related? What is indefinite blocking? How can it occur? What is round robin scheduling True or False: round-robin scheduling is preemptiveWhat is the time quantum used for? How should the time quantum be related to the context switch time? How should the time quantum be related to the CPU burst time? How can multilevel queues be scheduled? Which might have priority over others?01/14/19 CS 241 - System Programming, Klara Nahrstedt8Review Questions (Synchronization) What is a critical section?What is the critical-section problem?List the constraints Dijkstra placed on solutions to the critical-section problem What three requirements must a solution to the critical section problem satisfy?What does execute “atomically” mean? Suppose we want to execute the statements S1, S2 and S2 in sequence, but that S2 has to be executed exclusively for one process at a time. Write the code needed using semaphoresDescribe the Dining Philosopher problem01/14/19 CS 241 - System Programming, Klara Nahrstedt9Review Questions (Deadlock)List types of resources we might consider in deadlock problems on computerDefine deadlock What are the four necessary conditions needed before deadlock can occur? What is a system resource allocation graph in general? How is request indicated in the resource allocation graph?How is an allocation indicated in the resource allocation graph?01/14/19 CS 241 - System Programming, Klara Nahrstedt10Review Questions (Deadlock) True or False: In a resource allocation graph, if there are no cycles, then no deadlock exists. List two overall strategies in handling deadlocksGive examples of sharable resourcesGive examples of non-sharable resourcesCan we break the first condition (mutual condition) for deadlock to prevent deadlock? List two ways we can break the third condition (no preemption) to prevent deadlockWhat does a wait-for-graph show? What conditions must exist before a wait-for-graph is useful in detecting deadlocks?01/14/19 CS 241 - System Programming, Klara Nahrstedt11Review Questions (Deadlock) List three options for breaking an existing deadlock What is starvation? List two classes of resources, and the corresponding typical method of handling deadlock for each01/14/19 CS 241 - System Programming, Klara Nahrstedt12SummaryReview Textbooks chaptersReview QuizzesReview Class NotesReview Discussion Section SlidesReview Additional Material on the web siteGood luck
View Full Document