High-level Synchronization

Slides:



Advertisements
Similar presentations
More on Semaphores, and Classic Synchronization Problems CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Advertisements

Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Chapter 2 Processes and Threads
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Concurrency: Mutual Exclusion and Synchronization Why we need Mutual Exclusion? Classical examples: Bank Transactions:Read Account (A); Compute A = A +
Chapter 1 Computer Networks and the Internet. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2.
Chapter 6 – Concurrent Programming Outline 6.1 Introduction 6.2Monitors 6.2.1Condition Variables 6.2.2Simple Resource Allocation with Monitors 6.2.3Monitor.
1 Chapter 6: Concurrency: Mutual Exclusion and Synchronization Operating System Spring 2007 Chapter 6 of textbook.
Adopted from and based on Textbook: Operating System Concepts – 8th Edition, by Silberschatz, Galvin and Gagne Updated and Modified by Dr. Abdullah Basuhail,
Introduction to OS & Computer organization © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Tutorial 5 Even More Synchronization! presented by: Antonio Maiorano Paul Di Marco.
Copyrights ©2012. CVMark Consulting. All Rights Reserved. 3 BIG Contributions and Many Firsts.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Copyright 2014 Open Networking User Group. All Rights Reserved Confidential Not For Distribution Six Steps To A Common Open Networking Ecosystem Common.
Comp 249 Programming Methodology Chapter 13 Interfaces & Inner Classes Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 11: Synchronization (Chapter 6, cont)
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Silberschatz and Galvin  Chapter 3:Processes Processes –State of a process, process control block, –Scheduling of processes  Long term scheduler,
Introduction to OS & Computer organization © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
6.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Module 6: Process Synchronization.
Comp 248 Introduction to Programming Chapter 6 Arrays Part A Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia University,
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
Readers/Writers Problem  Multiple processes wanting to read an item, and one or more needing to write (Think of airline reservations…)  Rather than enforce.
APPLIED MANAGEMENT SCIENCE IN AGRICULTURAL SYSTEMS I
Interprocess Communication Race Conditions
High-level Synchronization
Auburn University COMP 3500 Introduction to Operating Systems Synchronization: Part 4 Classical Synchronization Problems.
Process Synchronization
Math-254 Numerical Methods.
Basic Synchronization Principles
Device Management & Deadlock
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Synchronization Memory Management
Bucket-Sort and Radix-Sort
Copyright © Aiman Hanna All rights reserved
Breadth-First Search (BFS)
Memory Management & Virtual Memory
Synchronization Memory Management
Ordered Maps & Dictionaries
Copyright © Aiman Hanna All rights reserved
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles
Copyright © Aiman Hanna All rights reserved
Lecture 2 Part 2 Process Synchronization
CSC227: Operating Systems
Technical Writing Abstract Writing.
Copyright © Aiman Hanna All rights reserved
Copyright © Aiman Hanna All rights reserved
The University of Adelaide, School of Computer Science
Linked Lists & Iterators
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles (Continue)
Copyright © Aiman Hanna All rights reserved
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Basic Synchronization Principles (Continue)
Copyright © Aiman Hanna All rights reserved
High-level Synchronization
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
, Part II Process Synchronization
Process Synchronization
The University of Adelaide, School of Computer Science
Scheduling & File Management
The University of Adelaide, School of Computer Science
High-level Synchronization (Continue)
Process Synchronization
The University of Adelaide, School of Computer Science
Device Management & Deadlock
Scheduling & File Management
Presentation transcript:

High-level Synchronization Operating Systems High-level Synchronization 1) These notes are © Aiman Hanna. All copyrights reserved. For more information please e-mail to: Contact@AimanHanna.com. 2) These notes are also based on: Operating System Concepts, 9th edition by Silberschatz/Galvin/Gagne, published by Wiley 2013, ISBN: 978-1-118-06333-0 | ISBN BRV: 978-1-118-12938-8. These notes still totally enforce all copyrights for Silberschatz/Galvin/Gagne & J. Wiley . For more information on these rights, please refer to the original publication of the book. 3) VERY IMPORTANT: These notes are neither complete nor sufficient to study for the course. They are merely given so that you can follow the covered subjects. You should NEVER depend solely on these notes for your study. Any use of these notes that results in violation of any of the copyrights indicated above is strictly prohibited. © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada Data Communications & Computer Networking, by: Aiman Hanna

Semaphores - Practical Considerations Active and Passive V() Busy-wait of the P() operation Implementation of semaphores

Implementation of Semaphores Using Disable and Enable Interrupts Potential failures of such implementation Using Test & Set (TS) instruction

Implementation of Semaphores Using TS to implement binary semaphores Using TS to implement counting/general semaphores

High-level Synchronization Semaphores are powerful, but solutions can become very complex High-level synchronization could provide an alternative

High-level Synchronization Simultaneous P() (also referred to as AND synchronization) NOTE: Although Simultaneous P() is covered and example of usage was discussed in class, you can skip section 9.1 entirely including Simultaneous P()

Monitors A high-level synchronization tool that is capable of performing what a semaphore can perform, and vise versa Initial Design of monitors Failure of this design? Reasons?

Monitors New design of monitors using conditions What is a condition, how are they used, and what is their usage rules

Classical Synchronization Problems Solving the 2nd Reader-Writer problem (priority is given to the writers) using monitors and conditions

Where is this week coverage in the textbook? Chapter 5: Section 5.8 Permanently Skip: 5.9 & 5.10  IMPORTANT: You will also need to study from the notes that will be distributed in class.