High-level Synchronization

Slides:



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

Consumer Decision Making and Beyond CHAPTER FIFTEEN.
Introduction to OS & Computer organization © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Advanced Technical Writing
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
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.
Interprocess Communication Race Conditions
Chapter 1 Functions Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Advanced Technical Writing
Chapter 2 Limits Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Basic Synchronization Principles
Device Management & Deadlock
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Synchronization Memory Management
Bucket-Sort and Radix-Sort
Chapter 17 Linked Lists.
Chapter 19 Binary Search Trees.
Chapter 4 Inheritance.
Chapter 1 Preliminaries.
Chapter 7 Functions of Random Variables (Optional)
Chapter 14 Graphs and Paths.
Copyright © Aiman Hanna All rights reserved
Breadth-First Search (BFS)
Memory Management & Virtual Memory
High-level Synchronization
Synchronization Memory Management
Chapter 10 Datapath Subsystems.
Copyright © Aiman Hanna All rights reserved
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles
Copyright © Aiman Hanna All rights reserved
Chapter 20 Hash Tables.
Copyright © 2011 Pearson Education, Inc
Statistical Reasoning in Sports
Technical Writing Abstract Writing.
Chapter 5 Algorithm Analysis.
Copyright © Aiman Hanna All rights reserved
The University of Adelaide, School of Computer Science
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles (Continue)
The Facts to Be Explained
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Basic Synchronization Principles (Continue)
Alternate Proofs of Selected HO Theorems
Copyright © Aiman Hanna All rights reserved
High-level Synchronization
Introduction: Some Representative Problems
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
, Part II Process Synchronization
The University of Adelaide, School of Computer Science
Scheduling & File Management
Circuit Characterization and Performance Estimation
The Classical Model with Many Goods
The University of Adelaide, School of Computer Science
High-level Synchronization (Continue)
The University of Adelaide, School of Computer Science
Chapter 2 Part 1 Data and Expressions.
Chapter 6 Dynamic Programming.
Device Management & Deadlock
Chapter 2 Reference Types.
Chapter 4 Greedy Algorithms.
Copyright © 2011 Pearson Education, Inc
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 Systems, 3rd edition by Garry Nutts, published by Addison Wesley, ISBN-10: 0201773449 | ISBN-13: 9780201773446 . These notes still totally enforce all copyrights for Nutts/ Addison Wesley. 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 8: The remaining parts of Sections 8.3 (including Figure 8.17 and Figure 8.25) Chapter 9: Section 9.2 (until page 349)  Note: The rest of this section/chapter will be covered during the following week  Skip: section 9.1