Switching to Blackboard

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

Priority Inversion BAE5030 Advanced Embedded Systems 9/13/04.
Operating Systems Mehdi Naghavi Winter 1385.
CS252: Systems Programming Ninghui Li Based on Slides by Prof. Gustavo Rodriguez-Rivera Topic 14: Deadlock & Dinning Philosophers.
Operating Systems Lecture Notes Deadlocks Matthew Dailey Some material © Silberschatz, Galvin, and Gagne, 2002.
CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
02/27/2004CSCI 315 Operating Systems Design1 Process Synchronization Deadlock Notice: The slides for this lecture have been largely based on those accompanying.
Cpr E 308 Spring 2004 Recap for Midterm Introductory Material What belongs in the OS, what doesn’t? Basic Understanding of Hardware, Memory Hierarchy.
© 2004, D. J. Foreman 1 The Dining Philosophers Problem.
CY2003 Computer Systems Lecture 05 Semaphores - Theory.
6.5 Semaphore Can only be accessed via two indivisible (atomic) operations wait (S) { while S
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Classic Synchronization Problems.
Dining-Philosophers Problem Shared data fork[5]: semaphore; initialized to 1.
Classic Synchronization Problems
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.
Avishai Wool lecture Introduction to Systems Programming Lecture 4 Inter-Process / Inter-Thread Communication.
Review: Producer-Consumer using Semaphores #define N 100// number of slots in the buffer Semaphore mutex = 1;// controls access to critical region Semaphore.
Announcements DS-533 Fall Week 1: August 25 Read: –Business Forecasting Chapter 2 Do problems: –3, 5, 7, 9, 12, Hand-in assignments –4, 8, 14.
Chapter 6: Process Synchronization. Outline Background Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores Classic Problems.
Concurrency: Deadlock and Starvation Chapter 6. Revision Describe three necessary conditions for deadlock Which condition is the result of the three necessary.
1 Pertemuan 7 Masalah-masalah pada Komunikasi antar Proses dan Penjadwalan Batch Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Process Synchronization
Monitors CSCI 444/544 Operating Systems Fall 2008.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Classical IPC and Synchronization Problems CS 342 – Operating Systems Ibrahim.
Semaphores The producer-consumer problem using semaphores.
02/25/2004CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
1 Deadlock Solutions CS 241 March 28, 2012 University of Illinois.
© 2004, D. J. Foreman 1 High Level Synchronization and Inter-Process Communication.
1 Processes Chapter Processes 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Classical problems.
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.
Midterm 1 – Wednesday, June 4  Chapters 1-3: understand material as it relates to concepts covered  Chapter 4 - Processes: 4.1 Process Concept 4.2 Process.
Cpr E 308 Spring 2004 Real-time Scheduling Provide time guarantees Upper bound on response times –Programmer’s job! –Every level of the system Soft versus.
Synchronizing Threads with Semaphores
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Synchronization.
Dining Philosophers (1) Philosophers eat/think Eating needs 2 forks Pick one fork at a time How to prevent deadlock.
Synchronisation Examples
Deadlock cs550 Operating Systems David Monismith.
CS252: Systems Programming Ninghui Li Based on Slides by Prof. Gustavo Rodriguez-Rivera Topic 13: Dinning Philosophers, and Misc.
6.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Module 6: Process Synchronization.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 3-3: Process Synchronization Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
1 Processes and Threads Part II Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
© 2004, D. J. Foreman 1 Monitors and Inter-Process Communication.
Online Reading Wonders Third Grade Tutorial Emily Wiebeck Created using “Jing”
The Technical Side of Being a Navarro College Student Tools to Help you Succeed!
Deadlock CS Introduction to Operating Systems.
Interprocess Communication Race Conditions
Classical IPC Problems
Semaphore Synchronization tool that provides more sophisticated ways (than Mutex locks) for process to synchronize their activities. Semaphore S – integer.
Chapter 5: Process Synchronization – Part 3
Auburn University COMP 3500 Introduction to Operating Systems Synchronization: Part 4 Classical Synchronization Problems.
2.4 Classic IPC Problems Dining philosophers Readers and writers
Chapter 5: Process Synchronization (Con’t)
Message Passing, Scheduler
Farewell to Manzanar – Reading Schedule
EARLY START PROGRAM, SUMMER 2017
CSE477 VLSI Digital Circuits Fall 2002 Lecture 14: Midterm Review
COMS Prelim 1 Review Session
Module 7a: Classic Synchronization
Chapter 7: Synchronization Examples
Semaphores Chapter 6.
Midterm Review CSE321 B.Ramamurthy 2/23/2019 B.Ramamurthy.
More IPC B.Ramamurthy 4/15/2019.
CS 250, Discrete Structures, Fall 2014 Nitesh Saxena
Lecture 26 Syed Mansoor Sarwar
Chapter 7: Synchronization Examples
Announcements DS-203 Fall 2007.
Presentation transcript:

Switching to Blackboard All assignments will be submitted through blackboard To access, you need to do the following: Get your UNET id and set a password. Contact UNET helpdesk or the IT helpdesk if necessary. Can also call 800 number on blackboard homepage. http://www.courses.maine.edu/ All future homework/projects must be submitted via the digital dropbox on blackboard.

Proposed Schedule Modification Reschedule preliminary 1 to Monday, October 4th. Reschedule due date for project part 1 to Wednesday October 6th.

Midterm READING: You are responsible for all of the material covered in the book up to (but not including) Section 2.3.7 except for the following sections: Chapter 1: 1.2.1, 1.2.2, 1.2.4, 1.2.5, 1.3, 1.5.8, 1.7 to the end of the chapter. Chapter 2: 2.2.6, 2.3.7 to the end of the chapter. Also responsible for all class slides!! Please make sure you review the material carefully because large pieces of it is not covered in the book.

Dining Philosophers (1) Philosophers eat/think Eating needs 2 forks Pick one fork at a time How to prevent deadlock

A nonsolution to the dining philosophers problem

Solution to dining philosophers problem (part 1)

Solution to dining philosophers problem (part 2)

State Array S Array T T T T T Mutex = 1 NULL 0 0 0 0 0 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ;

State Array S Array E T T T T Mutex = 0 NULL 1 0 0 0 0 2 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ;

State Array S Array E T T T T Mutex = 0 NULL 1 0 0 0 0 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; up(mutex) ; down(S[0]) ;

State Array S Array E T T T T Mutex = 1 NULL 0 0 0 0 0 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; up(mutex) ; down(S[0]) ; // falls through to //critical section Preempted

State Array S Array E T T T T Mutex = 1 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ;

State Array S Array E T T T T Mutex = 0 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ;

State Array S Array E T T T T Mutex = 0 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ;

State Array S Array E T E T T Mutex = 0 NULL 0 0 1 0 0 1 1 2 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ;

State Array S Array E T E T T Mutex = 0 NULL 0 0 1 0 0 1 1 2 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ;

State Array S Array E T E T T Mutex = 1 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; //falls through semaphore //and enters critical section.

State Array S Array E T E T T Mutex = 1 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ;

State Array S Array E T E H T Mutex = 1 NULL 0 0 0 -1 0 1 1 1 0 1 Mutex.queue S[3].queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ; P3

State Array S Array E T E H T Mutex = 1 NULL 0 0 0 -1 0 1 1 1 0 1 Mutex.queue S[3].queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ; P2: put_forks(2) ; set state[2] = Thinking. test(1) ; P3

State Array S Array E T T H T Mutex = 0 NULL 0 0 0 -1 0 1 1 1 0 1 Mutex.queue S[3].queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ; P2: put_forks(2) ; set state[2] = Thinking. test(1) ; //left neighbor not //hungry. P3

State Array S Array E T T H T Mutex = 0 NULL 0 0 0 -1 0 1 1 1 0 1 Mutex.queue S[3].queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ; P2: put_forks(2) ; set state[2] = Thinking. test(1) ; P3

State Array S Array E T T T T Mutex = 0 NULL 0 0 0 0 0 1 1 1 1 1 Mutex.queue P0: take_forks(0) down(mutex) ; test(0) ; down(S[0]) ; Preempted P2: take_forks(2) ; test(2) ; up(mutex) ; down(S[2]) ; eat() !!! P3: take_forks(3) ; down(mutex) ; test(3) ; up(mutex) ; down(S[3]) ; P2: put_forks(2) ; set state[2] = Thinking. test(1) ; P3 Ready Queue

Solution to dining philosophers problem (part 2)

Create Deadlock down(S[x]) ; up (mutex) ;