1 / 15

COMS 414 - Prelim 1 Review Session

COMS 414 - Prelim 1 Review Session. Multiprocessing and Synchronization Sunny( srg8@cornell.edu ) Vivek( vu22@cornell.edu ). Prelim 1. There are many, many resources available for your Prelim 1 needs: (presented in random order) Your notes! The book and its website

Télécharger la présentation

COMS 414 - Prelim 1 Review Session

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMS 414 - Prelim 1 Review Session Multiprocessing and Synchronization Sunny(srg8@cornell.edu) Vivek(vu22@cornell.edu)

  2. Prelim 1 • There are many, many resources available for your Prelim 1 needs: (presented in random order) • Your notes! • The book and its website • FA2000 Homeworks/Solutions • FA2000 Prelim 1 review slides • SP2001 Lecture notes • Newsgroup • Plenty of office hours! • Additional support by appointment

  3. Before we begin … • Any questions from the CS314 review session? • Register set, stack, heap • Program counter • Interrupts / exceptions • Interrupt priority levels • Programmable I/O vs. DMA • Polling • Memory protection (base/limit)

  4. Multitasking • What is a: • Process or Task? • Thread? • What is the difference between a program and a process? • What is in the PCB? • Differences between O/S processes and user processes? • Differences between user-level threads and kernel-level threads?

  5. Multitasking • What is kernel space? • What is user space? • What is a system call? • What is a context switch? • What states may a process be in? • How do processes go between states? • What is a race condition?

  6. Synchronization • What is a critical section? • What are the three requirements for protection of a critical section? • What is busy waiting? • What are atomic instructions? • What is a semaphore?

  7. Synchronization • Three levels of abstraction for concurrent programming: • Hardware instructions • O/S functions • Programming language constructs

  8. Vivek Presents … • Classic Synchronization Problems • Monitors, Condition Variables and Language Support • Deadlocks, Prevention and Avoidance

  9. Monitors • What is a monitor? • What are condition variables? • Differentiate between semaphores and condition variables.

  10. Synchronization Problems • Bounded buffer problem • Readers writers problem • Dining philosophers problems

  11. Deadlock • What is a deadlock? • Necessary conditions for deadlock ?

  12. . . P1 P2 P3 . . R3 Deadlocks R1 R2

  13. Deadlocks R1 R2 . . P1 P2 P3 . . . R3 P4

  14. Deadlock Prevention Make sure that one of the necessary conditions does not hold -- Mutual exclusion -- Hold and Wait -- No Pre Emption -- Circular Wait

  15. Deadlock Avoidance • What is it? • What is Safe State? • Safety Check? • Bankers Algorithm

More Related