CSEN5322 Quiz-5.

Slides:



Advertisements
Similar presentations
Ken Birman 1. Refresher: Dekers Algorithm Assumes two threads, numbered 0 and 1 CSEnter(int i) { int J = i^1; inside[i] = true; turn = J; while(inside[J]
Advertisements

More on Semaphores, and Classic Synchronization Problems CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Global Environment Model. MUTUAL EXCLUSION PROBLEM The operations used by processes to access to common resources (critical sections) must be mutually.
0 Synchronization Problem Resource sharing –Requires mutual exclusion –Critical section A code section that should be executed mutually exclusively by.
CSEN5322 Quiz-5.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Chapter 6: Process Synchronization
5.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 5: CPU Scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
EEE 435 Principles of Operating Systems Interprocess Communication Pt II (Modern Operating Systems 2.3)
Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores.
Cpr E 308 Spring 2004 Recap for Midterm Introductory Material What belongs in the OS, what doesn’t? Basic Understanding of Hardware, Memory Hierarchy.
Operating Systems CMPSC 473 Mutual Exclusion Lecture 13: October 12, 2010 Instructor: Bhuvan Urgaonkar.
Monitors A high-level abstraction that provides a convenient and effective mechanism for process synchronization Only one process may be active within.
Chapter 6: Process Synchronization. Outline Background Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores Classic Problems.
Chapter 6: Process Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 8, 2005 Objectives Understand.
Semaphores. Announcements No CS 415 Section this Friday Tom Roeder will hold office hours Homework 2 is due today.
02/23/2004CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
Jonathan Walpole Computer Science Portland State University
CSEN5322 Quiz-3.
CS510 Concurrent Systems Introduction to Concurrency.
Solution to Dining Philosophers. Each philosopher I invokes the operations pickup() and putdown() in the following sequence: dp.pickup(i) EAT dp.putdown(i)
Cosc 4740 Chapter 6, Part 3 Process Synchronization.
1 CSC 539: Operating Systems Structure and Design Spring 2005 Process synchronization  critical section problem  synchronization hardware  semaphores.
6.3 Peterson’s Solution The two processes share two variables: Int turn; Boolean flag[2] The variable turn indicates whose turn it is to enter the critical.
Operating Systems CSE 411 Kernel synchronization, deadlocks Kernel synchronization, deadlocks Dec Lecture 31 Instructor: Bhuvan Urgaonkar.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Mutual Exclusion.
3.1. Concurrency, Critical Sections, Semaphores
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 7: Process Synchronization Background The Critical-Section Problem Synchronization.
Chapter 6: Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Module 6: Synchronization Background The Critical-Section.
Kernel Locking Techniques by Robert Love presented by Scott Price.
1 Interprocess Communication (IPC) - Outline Problem: Race condition Solution: Mutual exclusion –Disabling interrupts; –Lock variables; –Strict alternation.
Chapter 6: Process Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Module 6: Process Synchronization Background The.
Chapter 6: Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware.
Copyright © Curt Hill Concurrent Execution An Overview for Database.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Practice Chapter Five.
1 Processes and Threads Part II Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Synchronization.
CS510 Concurrent Systems Jonathan Walpole. Introduction to Concurrency.
Process Synchronization. Objectives To introduce the critical-section problem, whose solutions can be used to ensure the consistency of shared data To.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 6: Process Synchronization.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
Mutual Exclusion -- Addendum. Mutual Exclusion in Critical Sections.
CS162 Section 2. True/False A thread needs to own a semaphore, meaning the thread has called semaphore.P(), before it can call semaphore.V() False: Any.
6.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 6.5 Semaphore Less complicated than the hardware-based solutions Semaphore S – integer.
Kernel Synchronization David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Deadlock and Starvation
Chapter 6: Process Synchronization
Chapter 5: Process Synchronization
Process Synchronization: Semaphores
Background on the need for Synchronization
Process Synchronization
Chapter 5: Process Synchronization
Deadlock and Starvation
Chapter 5: Process Synchronization
Advanced Operating Systems - Fall 2009 Lecture 8 – Wednesday February 4, 2009 Dan C. Marinescu Office: HEC 439 B. Office hours: M,
Lecture 11: Mutual Exclusion
Kernel Synchronization II
Topic 6 (Textbook - Chapter 5) Process Synchronization
Process Synchronization
Lecture 22 Syed Mansoor Sarwar
Lecture 2 Part 2 Process Synchronization
Computer Science & Engineering Electrical Engineering
Chapter 6: Synchronization Tools
CSE 153 Design of Operating Systems Winter 2019
CSE 542: Operating Systems
CSE 542: Operating Systems
Presentation transcript:

CSEN5322 Quiz-5

1. An instruction that executes atomically ____. Multiple Choices 1. An instruction that executes atomically ____. A) must consist of only one machine instruction B) executes as a single, uninterruptible unit C) cannot be used to solve the critical section problem D) All of the above 2. _____ can be used to prevent busy waiting when implementing a semaphore. A) Spinlocks C) Mutex lock B) Waiting queues D) Allowing the wait() operation to succeed 3. Windows XP, when accessing a global variable on a uniprocessor system, ____. A) masks interrupts for all interrupt handlers that may also access the variable B) uses spinlocks C) uses an adaptive mutex scheme D) uses mutex locks T/F 4. Mutex locks and binary semaphores are essentially the same thing. 5. If a resource-allocation graph has a cycle, the system must be in a deadlocked state.

1. An instruction that executes atomically ____. Multiple Choices 1. An instruction that executes atomically ____. A) must consist of only one machine instruction B) executes as a single, uninterruptible unit C) cannot be used to solve the critical section problem D) All of the above 2. _____ can be used to prevent busy waiting when implementing a semaphore. A) Spinlocks C) Mutex lock B) Waiting queues D) Allowing the wait() operation to succeed 3. Windows XP, when accessing a global variable on a uniprocessor system, ____. A) masks interrupts for all interrupt handlers that may also access the variable B) uses spinlocks C) uses an adaptive mutex scheme D) uses mutex locks T/F 4. Mutex locks and binary semaphores are essentially the same thing. T 5. If a resource-allocation graph has a cycle, the system must be in a deadlocked state. F