CSEN5322 Quiz-5.

Slides:



Advertisements
Similar presentations
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
Advertisements

Operating Systems: Monitors 1 Monitors (C.A.R. Hoare) higher level construct than semaphores a package of grouped procedures, variables and data i.e. object.
Synchronization with Eventcounts and Sequencers
Global Environment Model. MUTUAL EXCLUSION PROBLEM The operations used by processes to access to common resources (critical sections) must be mutually.
CSEN5322 Quiz-3.
Chapter 2 Processes and Threads
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.
6.5 Semaphore Can only be accessed via two indivisible (atomic) operations wait (S) { while S
Concurrency, Race Conditions, Mutual Exclusion, Semaphores, Monitors, Deadlocks Chapters 2 and 6 Tanenbaum’s Modern OS.
02/19/2010CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 6: Process Synchronization. Outline Background Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores Classic Problems.
Silberschatz, Galvin and Gagne ©2007 Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Process Synchronization (Or The “Joys” of Concurrent.
Process Synchronization
Monitors CSCI 444/544 Operating Systems Fall 2008.
02/23/2004CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
02/17/2010CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
CSEN5322 Quiz-3.
CSEN5322 Quiz-5.
1 Interprocess Communication Race Conditions Two processes want to access shared memory at same time.
Chapter 6: Process Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 8, 2005 Module 6: Process Synchronization.
02/19/2007CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
Adopted from and based on Textbook: Operating System Concepts – 8th Edition, by Silberschatz, Galvin and Gagne Updated and Modified by Dr. Abdullah Basuhail,
Operating Systems CSE 411 CPU Management Oct Lecture 13 Instructor: Bhuvan Urgaonkar.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic,
Chapter 6: Process Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 8, 2005 Background Concurrent.
Chapter 6 Process Synchronization Copyright © 2008.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Classical problems.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
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.
Critical Problem Revisit. Critical Sections Mutual exclusion Only one process can be in the critical section at a time Without mutual exclusion, results.
Operating Systems CMPSC 473 Mutual Exclusion Lecture 14: October 14, 2010 Instructor: Bhuvan Urgaonkar.
Copyright © 1997 – 2014 Curt Hill Concurrent Execution of Programs An Overview.
Race condition The scourge of parallel and distributed computing...
Chap 6 Synchronization. Background Concurrent access to shared data may result in data inconsistency Maintaining data consistency requires mechanisms.
Chapter 6: Synchronization. 6.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Module 6: Synchronization Background The Critical-Section.
Chapter 6 – Process Synchronisation (Pgs 225 – 267)
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 11: Synchronization (Chapter 6, cont)
Copyright © Curt Hill Concurrent Execution An Overview for Database.
Operating Systems Inter-Process Communications. Lunch time in the Philosophy Department. Dining Philosophers Problem (1)
Debugging Threaded Applications By Andrew Binstock CMPS Parallel.
Operating Systems Lecture Notes Synchronization Matthew Dailey Some material © Silberschatz, Galvin, and Gagne, 2002.
Homework Assignment #2 J. H. Wang Nov. 1, Homework #2 Chap.5: 5.8, 5.19, 5.22 Chap.6: 6.11, 6.12, *6.35 (Optional: End-of-chapter project for Chap.
Concurrency in Shared Memory Systems Synchronization and Mutual Exclusion.
1 Processes and Threads Part II Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
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 ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
INTERPROCESS COMMUNICATION Inter process communication (IPC) is a capability supported by operating system that allows one process to communicate with.
Chapter 6 Synchronization Dr. Yingwu Zhu. The Problem with Concurrent Execution Concurrent processes (& threads) often access shared data and resources.
6.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 6.5 Semaphore Less complicated than the hardware-based solutions Semaphore S – integer.
Process Synchronization: Semaphores
Auburn University COMP 3500 Introduction to Operating Systems Synchronization: Part 4 Classical Synchronization Problems.
Process Synchronization
Chapter 6: Process Synchronization
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 5: Process Synchronization (Con’t)
Midterm review: closed book multiple choice chapters 1 to 9
Semaphore Originally called P() and V() wait (S) { while S <= 0
Process Synchronization
Module 7a: Classic Synchronization
Chapter 7: Synchronization Examples
Concurrency: Mutual Exclusion and Process Synchronization
Chapter 7: Synchronization Examples
CSE 153 Design of Operating Systems Winter 2019
CSE 542: Operating Systems
CSE 542: Operating Systems
Presentation transcript:

CSEN5322 Quiz-5

4. The value of a counting semaphore can range only between 0 and 1. Multiple Choices 1. A(n) _______ refers to where a process is accessing/updating shared data. A) critical section C) mutex B) entry section D) test-and-set 2. A race condition ____. A) results when several threads try to access the same data concurrently B) results when several threads try to access and modify the same data concurrently C) will result only if the outcome of execution does not depend on the order in which instructions are executed D) None of the above 3. How many philosophers may eat simultaneously in the Dining Philosophers problem with 5 philosophers? A) 1 C) 3 B) 2 D) 5 T/F 4. The value of a counting semaphore can range only between 0 and 1. 5. The local variables of a monitor can be accessed by only the local procedures.

4. The value of a counting semaphore can range only between 0 and 1. F Multiple Choices 1. A(n) _______ refers to where a process is accessing/updating shared data. A) critical section C) mutex B) entry section D) test-and-set 2. A race condition ____. A) results when several threads try to access the same data concurrently B) results when several threads try to access and modify the same data concurrently C) will result only if the outcome of execution does not depend on the order in which instructions are executed D) None of the above 3. How many philosophers may eat simultaneously in the Dining Philosophers problem with 5 philosophers? A) 1 C) 3 B) 2 D) 5 T/F 4. The value of a counting semaphore can range only between 0 and 1. F 5. The local variables of a monitor can be accessed by only the local procedures. T