Basic Synchronization Principles

Slides:



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

5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
Concurrent Processes Lecture 5. Introduction Modern operating systems can handle more than one process at a time System scheduler manages processes and.
CS 3013 & CS 502 Summer 2006 Week 1 Review and Class Discussion 1 Review (last week) Three important terms Abstraction Concurrency Resource Critical Sections.
Comp 249 Programming Methodology Chapter 8 - Polymorphism Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia University, Montreal,
Introduction to OS & Computer organization © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Comp 249 Programming Methodology Chapter 13 Interfaces & Inner Classes Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Introduction to OS & Computer organization © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
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.
Introduction to Operating Systems
Networking CS 3470, Section 1 Sarah Diesburg
High-level Synchronization
Administrative Details
Scheduling and Resource Access Protocols: Basic Aspects
Critical sections, locking, monitors, etc.
Chapter 2 Limits Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Comp 249 Programming Methodology
Comp 249 Programming Methodology
Device Management & Deadlock
Synchronization Memory Management
Bucket-Sort and Radix-Sort
Chapter 17 Linked Lists.
Chapter 19 Binary Search Trees.
Chapter 4 Inheritance.
Chapter 14 Graphs and Paths.
Copyright © Aiman Hanna All rights reserved
Comp 249 Programming Methodology
Memory Management & Virtual Memory
High-level Synchronization
The Problem You are writing a program that accepts from the command line a number and that number tells the application how many numbers to read from standard.
Synchronization Memory Management
Midterm review: closed book multiple choice chapters 1 to 9
Chapter 10 Datapath Subsystems.
Copyright © Aiman Hanna All rights reserved
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles
Chapter 20 Hash Tables.
Copyright © 2011 Pearson Education, Inc
Lecture 2 Part 2 Process Synchronization
Parallelism and Concurrency
Concurrency: Mutual Exclusion and Process Synchronization
CSC227: Operating Systems
Monitor Giving credit where it is due:
Copyright © Aiman Hanna All rights reserved
Copyright © Aiman Hanna All rights reserved
Basic Synchronization Principles (Continue)
Figure 1 Flow diagram detailing the systematic review process.
The Facts to Be Explained
Basic Synchronization Principles (Continue)
Copyright © Aiman Hanna All rights reserved
High-level Synchronization
Introduction: Some Representative Problems
Figure 1 Relationships between pair indices of dance performance (joint entropy or mutual information) and the past ... Figure 1 Relationships between.
Process Synchronization
The University of Adelaide, School of Computer Science
Scheduling & File Management
Circuit Characterization and Performance Estimation
High-level Synchronization (Continue)
“The Little Book on Semaphores” Allen B. Downey
Process Synchronization
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:

Basic Synchronization Principles Operating Systems Basic Synchronization Principles 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

Critical Sections (CSs) What are they? Examples of what may happen if CSs are not handled with care Examples of cooperating processes around CSs

Enabling/Disabling Interrupts Will they provide a solution to the CS problem? If yes, why cannot we depend on this solution then!

Other Solutions to the CS Problem Acquiring a lock for example How can the lock be obtained and released correctly? Examining different solutions and see why they may fail/work.

Protecting Different CSs Should one lock be used to protect different CSs? Why/Why not?

Deadlock What is it? Why is it deadly?

Evolving the CS solution Use of FORK/JOIN Synchronization

Concurrent Processes Synchronization between concurrent processes to achieve proper behavior

Semaphores What is a semaphore? How can they be used to achieve: Protection of CSs - Mutual Execution Proper synchronization/communication between concurrent processes

Where is this week coverage in the textbook? Chapter 8: Sections 8.1, 8.2 & 8.3 (until page 310), with the following exceptions: Skip: Figure 8.1 and Figure 8.2. This material however will be covered as part of the programming assignment.