Chap. 3. Input/Output

Size: px
Start display at page:

Download "Chap. 3. Input/Output"

Transcription

1 Chap. 3. Input/Output 17 janvier Principles of I/O hardware 3.2 Principles of I/O software 3.3 Deadlocks [3.4 Overview of IO in Minix 3] [3.5 Block Devices in Minix 3] [3.6 RAM Disks] 3.7 Disks 3.8 Terminals Various Andrew S. Tanenbaum Modern Operating Systems, 2nd edition Prentice Hall

2 3.1 Principles of I/O Hardware Some network Some device Other Some typical device, network, and bus data rates 2

3 Device Controllers I/O devices have components: mechanical component electronic component The electronic component is the device controller may be able to handle multiple devices Controller's tasks convert serial bit stream to block of bytes perform error correction as necessary make available to main memory 3

4 Memory-Mapped I/O (1) Separate I/O and memory space Memory-mapped I/O Hybrid 4

5 Memory-Mapped I/O (2) (a) A single-bus architecture (b) A dual-bus memory architecture 5

6 Interrupts Revisited How interrupts happens Remark: Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires 6

7 Interrupts Revisited Fig Interrupt processing hardware on a 32-bit Intel PC Andrew S. Tanenbaum, Albert S. Woodhull: Operating Systems: Design and Implementation, 2nd edition, Prentice Hall

8 Direct Memory Access (DMA) Operation of a DMA transfer 8

9 3.2 Principles of I/O Software Goals of I/O Software (1) Device independence programs can access any I/O device without specifying device in advance (floppy, hard drive, or CD-ROM) Uniform naming name of a file or device a string or an integer not depending on which machine Error handling handle as close to the hardware as possible 9

10 Goals of I/O Software (2) Synchronous vs. asynchronous transfers blocked transfers vs. interrupt-driven Buffering data coming off a device cannot be stored in final destination Sharable vs. dedicated devices disks are sharable tape drives would not be 10

11 Programmed I/O (1) Steps in printing a string 11

12 Programmed I/O (2) Writing a string to the printer using programmed I/O 12

13 Interrupt-Driven I/O Writing a string to the printer using interrupt-driven I/O Code executed when print system call is made Interrupt service procedure 13

14 I/O Using DMA Printing a string using DMA code executed when the print system call is made interrupt service procedure 14

15 I/O Software Layers Layers of the I/O Software System 15

16 3.2.2 Interrupt Handlers (1) Interrupt handlers are best hidden have driver starting an I/O operation block until interrupt notifies of completion Interrupt procedure does its task then unblocks driver that started it Steps must be performed in software after interrupt completed 1. Save regs not already saved by interrupt hardware 2. Set up context for interrupt service procedure 16

17 Interrupt Handlers (2) Steps must be performed in software after interrupt completed 1. Save regs not already saved by interrupt hardware 2. Set up context for interrupt service procedure Set up stack for interrupt service procedure 3. Ack interrupt controller, reenable interrupts 4. Copy registers from where saved 5. Run service procedure 6. Set up MMU context for process to run next 7. Load new process' registers 8. Start running the new process 17

18 3.2.3 Device Drivers Logical position of device drivers is shown here Communications between drivers and device controllers goes over the bus 18

19 3.2.4 Device-Independent I/O Software (1) Uniform interfacing for device drivers Buffering Error reporting Allocating and releasing dedicate devices Providing a deice-independent block size Functions of the device-independent I/O software 19

20 3.2.4 Device-Independent I/O Software (2) (a) Without a standard driver interface (b) With a standard driver interface 20

21 3.2.4 Device-Independent I/O Software (3) (a) Unbuffered input (b) Buffering in user space (c) Buffering in the kernel followed by copying to user space (d) Double buffering in the kernel 21

22 3.2.4 Device-Independent I/O Software (4) Networking may involve many copies 22

23 3.2.5 User-Space I/O Software Layers of the I/O system and the main functions of each layer 23

24 Section. 3.3 Deadlocks Resource Introduction to deadlocks The ostrich algorithm Detection and Recovery Deadlock Prevention Deadlock Avoidance Other Issues Andrew S. Tanenbaum Modern Operating Systems, 2nd edition Prentice Hall

25 3.3.1 Resources Examples of computer resources Devices: printer, tape drive, hard disk, CD, Data: table, word (in read or write mode), Preemptable / Non-preemptable resources Preemptable: Can be taken away from a process with no ill effects Non-preemptable: Will cause the process to fail if taken away Sequence of events required to use a resource 1. Request the resource 2. Use the resource 3. Release the resource Requesting process (if access is denied) May be blocked May fail with error code 25

26 3.3.2 Introduction to Deadlocks Formal definition : A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause None of the processes can run release resources be awakened 26

27 Four Conditions for Deadlock Mutual exclusion condition Each resource is assigned to one process or is available Hold and wait condition Processes holding resources can request additional resources No preemption condition Previously granted resources cannot forcibly taken away Circular wait condition Must be a circular chain of two or more processes, each of which is waiting for a resource held by the next member of the chain 27

28 Deadlock Modeling (1) Four conditions modeled with directed graphs (Holt, 1972) (a) resource R is assigned to process A (b) process B is requesting/waiting for resource S process C and D are in deadlock over resources T and U 28

29 Deadlock Modeling (2) How deadlock occurs 29

30 Deadlock Modeling (3) (o) (p) (q) How deadlock can be avoided 30

31 Strategies for dealing with Deadlocks 1. Just ignore the problem altogether Ostrich algorithm 2. Detection and recovery Directed graphs or matrix-based algorithms 3. Dynamic avoidance Careful resource allocation Banker s algorithm 4. Prevention Negating one of the four necessary conditions 31

32 3.3.3 The Ostrich Algorithm Pretend there is no problem Reasonable if deadlocks occur very rarely cost of prevention is high Unix, Linux, Mac OS X, Windows, take this approach! It is a trade off between convenience correctness 32

33 3.3.4 Detection and Recovery Just monitoring the requests and release of resources On release: update of the resource graph and detection of cycles On cycle detection: processes are killed until cycle is broken A cruder method Periodically checked if one or more processes are blocked for e.g. 1 hour, and kill them. Special care Simply killing processes and restarting the others: may be applicable in batch systems But need for restoring files and undo some side effects already produced (not trivial) 33

34 3.3.5 Deadlock Prevention Summary of approaches to deadlock prevention 34

35 3.3.6 Deadlock Avoidance E = Existing resources, P = Possessed resources, A = available resources Example of Banker's Algorithm with Multiple Resources 35

36 3.3.7 Other Issues Two Phase Locking Phase 1 : process tries to lock all records it needs, one at a time (no real work done in phase one) Phase 2 : If phase 1 succeeds, it starts second phase, performing updates and releasing locks at the end Non resource Deadlocks Possible for two processes to deadlock each is waiting for the other to do some task Can happen with semaphores e.g. each process required to do a down() on two semaphores (deadlock can happen if done in wrong order) Starvation e.g. shortest job first: May cause long job to be postponed indefinitely, even though not blocked 36

37 3.6 Disks Disk Hardware (1) Disk parameters for the original IBM PC floppy disk and a Western Digital WD hard disk 37

38 Disk Hardware (2) Physical geometry of a disk with two zones A possible virtual geometry for this disk 38

39 Disk Hardware (3) Raid levels 0 through 2 Backup and parity drives are shaded 39

40 Disk Hardware (4) Raid levels 3 through 5 Backup and parity drives are shaded 40

41 Disk Hardware (5) Recording structure of a CD or CD-ROM 41

42 Disk Hardware (6) Logical data layout on a CD-ROM 42

43 Disk Hardware (7) Cross section of a CD-R disk and laser not to scale Silver CD-ROM has similar structure without dye layer with pitted aluminum layer instead of gold 43

44 Disk Hardware (8) A double sided, dual layer DVD disk 44

45 Disk Formatting (1) A disk sector 45

46 Disk Formatting (2) An illustration of cylinder skew 46

47 Disk Formatting (3) No interleaving Single interleaving Double interleaving 47

48 Disk Arm Scheduling Algorithms (1) Time required to read or write a disk block determined by 3 factors Seek time Rotational delay Actual transfer time Seek time dominates Error checking is done by controllers 48

49 Disk Arm Scheduling Algorithms (2) Initial position Pending requests Shortest Seek First (SSF) disk scheduling algorithm 49

50 Disk Arm Scheduling Algorithms (3) The elevator algorithm for scheduling disk requests 50

51 Error Handling A disk track with a bad sector Substituting a spare for the bad sector Shifting all the sectors to bypass the bad one 51

52 Stable Storage Analysis of the influence of crashes on stable writes 52

53 3.8 Character Oriented Terminals RS-232 Terminal Hardware An RS-232 terminal communicates with computer 1 bit at a time Called a serial line bits go out in series, 1 bit at a time Windows uses COM1 and COM2 ports, first to serial lines Computer and terminal are completely independent 53

54 Input Software (1) Central buffer pool Dedicated buffer for each terminal 54

55 Input Software (2) Characters handled specially in canonical mode 55

56 Output Software The ANSI escape sequences accepted by terminal driver on output ESC is ASCII character (0x1B) n,m, and s are optional numeric parameters 56

57 Display Hardware (1) Parallel port Memory-mapped displays driver writes directly into display's video RAM 57

58 Display Hardware (2) A video RAM image simple monochrome display character mode Corresponding screen the xs are attribute bytes 58

59 Input Software Keyboard driver delivers a number driver converts to characters uses a ASCII table Exceptions, adaptations needed for other languages many OS provide for loadable keymaps or code pages 59

60 Output Software for Windows (1) Sample window located at (200,100) on XGA display 60

61 Output Software for Windows (2) Skeleton of a Windows main program (part 1) 61

62 Output Software for Windows (3) Skeleton of a Windows main program (part 2) 62

63 Output Software for Windows (4) An example rectangle drawn using Rectangle 63

64 Output Software for Windows (5) Copying bitmaps using BitBlt. before after 64

65 Output Software for Windows (6) Examples of character outlines at different point sizes 65

66 Network Terminals X Windows (1) Clients and servers in the MIT X Windows System 66

67 X Windows (2) Skeleton of an X Windows application program 67

68 The SLIM Network Terminal (1) The architecture of the SLIM terminal system 68

69 The SLIM Network Terminal (2) Messages used in the SLIM protocol from the server to the terminals 69

70 Clocks Clock Hardware A programmable clock 70

71 Clock Software (1) Three ways to maintain the time of day 71

72 Clock Software (2) Simulating multiple timers with a single clock 72

73 Soft Timers A second clock available for timer interrupts specified by applications no problems if interrupt frequency is low Soft timers avoid interrupts kernel checks for soft timer expiration before it exits to user mode how well this works depends on rate of kernel entries 73

74 Power Management (1) Power consumption of various parts of a laptop computer 74

75 Power management (2) The use of zones for backlighting the display 75

76 Power Management (3) Running at full clock speed Cutting voltage by two cuts clock speed by two, cuts power by four 76

77 Power Management (4) Telling the programs to use less energy may mean poorer user experience Examples change from color output to black and white speech recognition reduces vocabulary less resolution or detail in an image 77

I/O Devices. Chapter 5 Input/Output. Memory-Mapped I/O (2) Memory-Mapped I/O (1) Interrupts Revisited. Direct Memory Access (DMA) 11/26/2013

I/O Devices. Chapter 5 Input/Output. Memory-Mapped I/O (2) Memory-Mapped I/O (1) Interrupts Revisited. Direct Memory Access (DMA) 11/26/2013 MODERN OPERATING SYSTEMS I/O Devices Third Edition ANDREW S. TANENBAUM Chapter 5 Input/Output Figure 5-1. Some typical device, network, and bus data rates. Memory-Mapped I/O (1) Memory-Mapped I/O (2) Figure

More information

I/O Hardwares. Some typical device, network, and data base rates

I/O Hardwares. Some typical device, network, and data base rates Input/Output 1 I/O Hardwares Some typical device, network, and data base rates 2 Device Controllers I/O devices have components: mechanical component electronic component The electronic component is the

More information

Chapter 5 Input/Output

Chapter 5 Input/Output Chapter 5 Input/Output 5.1 Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks 5.5 Clocks 5.6 Character-oriented terminals 5.7 Graphical user interfaces 5.8 Network

More information

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done? Input/Output : I/O Systems Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Character-oriented terminals Graphical user interfaces Network terminals Power management

More information

Chapter 3. Deadlocks

Chapter 3. Deadlocks Chapter 3 Deadlocks 3.1 Resource 3.2 Introduction to deadlocks 3.3 The ostrich algorithm 3.4 Deadlock detection and recovery 3.5 Deadlock avoidance 3.6 Deadlock prevention 3.7 Other issues Resources Examples

More information

Resources. Lecture 4. Deadlocks. Resources (2) Resources (1) Four Conditions for Deadlock. Introduction to Deadlocks

Resources. Lecture 4. Deadlocks. Resources (2) Resources (1) Four Conditions for Deadlock. Introduction to Deadlocks Lecture 4 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance 3.6. Deadlock prevention 3.7. Other issues Resources

More information

OPERATING SYSTEMS CS136

OPERATING SYSTEMS CS136 OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,

More information

Chapter 3. Deadlocks

Chapter 3. Deadlocks Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance 3.6. Deadlock prevention 3.7. Other issues Resources

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Input and Output Input/Output Devices The OS is responsible for managing I/O devices Issue requests Manage

More information

Chapter 5 Input/Output. I/O Devices

Chapter 5 Input/Output. I/O Devices Chapter 5 Input/Output 5.1 Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks 5.5 Clocks 5.6 Character-oriented terminals 5.7 Graphical user interfaces 5.8 Network

More information

Operating Systems, Fall

Operating Systems, Fall Input / Output & Real-time Scheduling Chapter 5.1 5.4, Chapter 7.5 1 I/O Software Device controllers Memory-mapped mapped I/O DMA & interrupts briefly I/O Content I/O software layers and drivers Disks

More information

Deadlocks. Thomas Plagemann. With slides from C. Griwodz, K. Li, A. Tanenbaum and M. van Steen

Deadlocks. Thomas Plagemann. With slides from C. Griwodz, K. Li, A. Tanenbaum and M. van Steen Deadlocks Thomas Plagemann With slides from C. Griwodz, K. Li, A. Tanenbaum and M. van Steen Preempting Scheduler Activations Scheduler activations are completely preemptable User" space" Kernel " space"

More information

DEADLOCKS M O D E R N O P E R A T I N G S Y S T E M S C H A P T E R 6 S P R I N G

DEADLOCKS M O D E R N O P E R A T I N G S Y S T E M S C H A P T E R 6 S P R I N G DEADLOCKS M O D E R N O P E R A T I N G S Y S T E M S C H A P T E R 6 S P R I N G 2 0 1 8 NON-RESOURCE DEADLOCKS Possible for two processes to deadlock each is waiting for the other to do some task Can

More information

Chapter 6. Deadlocks

Chapter 6. Deadlocks Chapter 6 Deadlocks 6.. Resources 6.. Introduction to deadlocks 6.3. The ostrich algorithm 6.6. Deadlock prevention 6.4. Deadlock detection and recovery 6.5. Deadlock avoidance 6.7. Other issues Learning

More information

Operating Systems. Lecture3.2 - Deadlock Management. Golestan University. Hossein Momeni

Operating Systems. Lecture3.2 - Deadlock Management. Golestan University. Hossein Momeni Operating Systems Lecture3.2 - Deadlock Management Golestan University Hossein Momeni momeni@iust.ac.ir Contents Resources Introduction to deadlocks Why do deadlocks occur? Ignoring deadlocks : ostrich

More information

Deadlocks Prof. James L. Frankel Harvard University. Version of 7:05 PM 7-Mar-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.

Deadlocks Prof. James L. Frankel Harvard University. Version of 7:05 PM 7-Mar-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Deadlocks Prof. James L. Frankel Harvard University Version of 7:05 PM 7-Mar-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Introduction to Deadlocks Computer resources Files Database

More information

Deadlocks. Tore Larsen. With slides from T. Plagemann, C. Griwodz, K. Li, A. Tanenbaum and M. van Steen

Deadlocks. Tore Larsen. With slides from T. Plagemann, C. Griwodz, K. Li, A. Tanenbaum and M. van Steen Deadlocks Tore Larsen With slides from T. Plagemann,. Griwodz, K. Li, A. Tanenbaum and M. van Steen Resources Resource allocation is a central OS concern Examples of computer resources PU Memory Disk drive

More information

CS450/550 Operating Systems

CS450/550 Operating Systems CS450/550 Operating Systems Lecture 3 Deadlocks Dr. Xiaobo Zhou Department of Computer Science CS450/550 Deadlocks.1 Review: Summary of Chapter 2 Sequential process model Multi-threading: user-space vs.

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note on Disk I/O 1 I/O Devices Storage devices Floppy, Magnetic disk, Magnetic tape, CD-ROM, DVD User

More information

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU)

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU) CSCI 4500 / 8506 Sample Questions for Quiz 4 Covers Modules 7 and 8 1. Deadlock occurs when each process in a set of processes a. is taking a very long time to complete. b. is waiting for an event (or

More information

Chapter 3: Deadlocks

Chapter 3: Deadlocks Chapter 3: Deadlocks Overview Resources Why do deadlocks occur? Dealing with deadlocks Ignoring them: ostrich algorithm Detecting & recovering from deadlock Avoiding deadlock Preventing deadlock Resources

More information

Learning Outcomes. Chapter 3. Deadlocks. Resources. Resources. Resources

Learning Outcomes. Chapter 3. Deadlocks. Resources. Resources. Resources hapter Deadlocks.. esource.. Introduction to deadlocks.. The ostrich algorithm.4. Deadlock detection and recovery.5. Deadlock avoidance.6. Deadlock prevention.7. Other issues Learning Outcomes Understand

More information

Resources. Chapter 3. Deadlocks. Resources. Resources

Resources. Chapter 3. Deadlocks. Resources. Resources hapter Deadlocks.. esource.. Introduction to deadlocks.. The ostrich algorithm.4. Deadlock detection and recovery.5. Deadlock avoidance.6. Deadlock prevention.7. Other issues esources Examples of computer

More information

Deadlocks. Today. Next Time. ! Resources & deadlocks! Dealing with deadlocks! Other issues. ! Memory management

Deadlocks. Today. Next Time. ! Resources & deadlocks! Dealing with deadlocks! Other issues. ! Memory management Deadlocks Today! Resources & deadlocks! Dealing with deadlocks! Other issues Next Time! Memory management Introduction to deadlocks A set of threads is deadlocked if each thread in the set is waiting for

More information

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security Input/Output Today Principles of I/O hardware & software I/O software layers Disks Next Protection & Security Operating Systems and I/O Two key operating system goals Control I/O devices Provide a simple,

More information

Deadlocks. Today. Next Time. Resources & deadlocks Dealing with deadlocks Other issues. I/O and file systems

Deadlocks. Today. Next Time. Resources & deadlocks Dealing with deadlocks Other issues. I/O and file systems Deadlocks Today Resources & deadlocks Dealing with deadlocks Other issues Next Time I/O and file systems That s some catch, that Catch-22 Thread A: lock(l1); lock(l2);... A Thread B: lock(l2); lock(l1);...

More information

Learning Outcomes. Chapter 6. Deadlocks. Resources. Resources & Deadlocks. Resource Access. Two example resource usage patterns

Learning Outcomes. Chapter 6. Deadlocks. Resources. Resources & Deadlocks. Resource Access. Two example resource usage patterns hapter 6 Deadlocks 6.. esources 6.. Introduction to deadlocks 6.. The ostrich algorithm 6.6. Deadlock prevention 6.4. Deadlock detection and recovery 6.5. Deadlock avoidance 6.7. Other issues Learning

More information

MODERN OPERATING SYSTEMS. Third Edition ANDREW S. TANENBAUM. Chapter 6 Deadlocks

MODERN OPERATING SYSTEMS. Third Edition ANDREW S. TANENBAUM. Chapter 6 Deadlocks MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 6 Deadlocks Preemptable and Nonpreemptable Resources Non-sharable resource: the resource can be used by only one process at a time A process

More information

CISC 7310X. C10: Deadlocks. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/12/2018 CUNY Brooklyn College

CISC 7310X. C10: Deadlocks. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/12/2018 CUNY Brooklyn College CISC 7310X C10: Deadlocks Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/12/2018 CUNY Brooklyn College 1 Outline Concept of deadlock Necessary conditions Models of deadlocks

More information

Chapter 5. Input / Output

Chapter 5. Input / Output Chapter 5 Input / Output 1 The Spectrum of I/O Devices 2 Device Controllers The Device vs. its Controller Some duties of a device controller: Interface between CPU and the Device Start/Stop device activity

More information

CS330: Operating System and Lab. (Spring 2006) I/O Systems

CS330: Operating System and Lab. (Spring 2006) I/O Systems CS330: Operating System and Lab. (Spring 2006) I/O Systems Today s Topics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking

More information

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware CSE 120 July 27, 2006 Day 8 Input/Output Instructor: Neil Rhodes How hardware works Operating Systems Layer What the kernel does API What the programmer does Overview 2 Kinds Block devices: read/write

More information

CS510 Operating System Foundations. Jonathan Walpole

CS510 Operating System Foundations. Jonathan Walpole CS510 Operating System Foundations Jonathan Walpole Disk Technology & Secondary Storage Management Disk Geometry Disk head, surfaces, tracks, sectors Example Disk Characteristics Disk Surface Geometry

More information

Introduction to OS. Deadlock. MOS Ch. 6. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Introduction to OS. Deadlock. MOS Ch. 6. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1 Introduction to OS Deadlock MOS Ch. 6 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 Outline What is Deadlock? How to handle Deadlock? Deadlock Detection and Recovery

More information

CSE380 - Operating Systems. Communicating with Devices

CSE380 - Operating Systems. Communicating with Devices CSE380 - Operating Systems Notes for Lecture 15-11/4/04 Matt Blaze (some examples by Insup Lee) Communicating with Devices Modern architectures support convenient communication with devices memory mapped

More information

More on Synchronization and Deadlock

More on Synchronization and Deadlock Examples of OS Kernel Synchronization More on Synchronization and Deadlock Two processes making system calls to read/write on the same file, leading to possible race condition on the file system data structures

More information

Operating Systems. Deadlock. User OS. Kernel & Device Drivers. Interface Programs. Brian Mitchell - Operating Systems

Operating Systems. Deadlock. User OS. Kernel & Device Drivers. Interface Programs. Brian Mitchell - Operating Systems User OS Kernel & Device Drivers Interface Programs Deadlock 1 Deadlocks Computer resources are full of resources that can only be used by one process at a time Unpredictable results can occur if two or

More information

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09 22 I/O Management (2) I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January 28 2009 WT 2008/09 2009 Universität Karlsruhe, System Architecture Group 1 Roadmap Motivation

More information

Course Description: This course includes the basic concepts of operating system

Course Description: This course includes the basic concepts of operating system Operating Systems Course Title: Operating Systems Full Marks:60+ 20+20 Course No: CSC259 Pass Marks: 24+8+8 Nature of the Course: Theory + Lab Credit Hrs: 3 Course Description: This course includes the

More information

ECS 150 (Operating Systems) Goal To examine what causes deadlock, and what to do about it. Spring Quarter

ECS 150 (Operating Systems) Goal To examine what causes deadlock, and what to do about it. Spring Quarter D e a d l o c k Goal To examine what causes deadlock, and what to do about it. Spring Quarter 1999 1 The resource manager is that part of the kernel responsible for managing resources. Its process interface

More information

MODERN OPERATING SYSTEMS. Third Edition ANDREW S. TANENBAUM. Chapter 6 Deadlocks

MODERN OPERATING SYSTEMS. Third Edition ANDREW S. TANENBAUM. Chapter 6 Deadlocks MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 6 Deadlocks Preemptable and Nonpreemptable Resources Sequence of events required to use a resource: 1. Request the resource. 2. Use the

More information

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1 Ref: Chap 12 Secondary Storage and I/O Systems Applied Operating System Concepts 12.1 Part 1 - Secondary Storage Secondary storage typically: is anything that is outside of primary memory does not permit

More information

Chapter 3: Deadlocks. Chapter 3

Chapter 3: Deadlocks. Chapter 3 hapter 3: Deadlocks hapter 3 Overview Resources Why do deadlocks occur? Dealing with deadlocks Ignoring them: ostrich algorithm Detecting & recovering from deadlock voiding deadlock Preventing deadlock

More information

Deadlock and Starvation

Deadlock and Starvation Deadlock and Starvation Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other Involve conflicting needs for resources by two or more

More information

Chapter 6 - Deadlocks

Chapter 6 - Deadlocks Chapter 6 - Deadlocks Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 6 - Deadlocks 1 / 100 1 Motivation 2 Resources Preemptable and Nonpreemptable Resources Resource Acquisition

More information

Shared and Preemptable Resources. A few resources may be sharable. Anyone can write the system log.

Shared and Preemptable Resources. A few resources may be sharable. Anyone can write the system log. Shared and Preemptable Resources A few resources may be sharable Anyone can write the system log Deadlock Ch 3 Some resources are preemptable They can be safely taken away Memory may be preempted by swapping

More information

Chapter 5 - Input / Output

Chapter 5 - Input / Output Chapter 5 - Input / Output Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 5 - Input / Output 1 / 90 1 Motivation 2 Principle of I/O Hardware I/O Devices Device Controllers Memory-Mapped

More information

Chapter 6. Deadlock. (A Quick Introduction)

Chapter 6. Deadlock. (A Quick Introduction) Chapter 6 Deadlock (A Quick Introduction) 1 Resources and Deadlocks Processes need access to resources in order to make progress. Examples of Resources: Kernel Data Structures (ProcessControlBlocks, Threads,

More information

CS 450 Fall xxxx Final exam solutions. 2) a. Multiprogramming is allowing the computer to run several programs simultaneously.

CS 450 Fall xxxx Final exam solutions. 2) a. Multiprogramming is allowing the computer to run several programs simultaneously. CS 450 Fall xxxx Final exam solutions 1) 1-The Operating System as an Extended Machine the function of the operating system is to present the user with the equivalent of an extended machine or virtual

More information

19: I/O. Mark Handley. Direct Memory Access (DMA)

19: I/O. Mark Handley. Direct Memory Access (DMA) 19: I/O Mark Handley Direct Memory Access (DMA) 1 Interrupts Revisited Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires. Interrupts

More information

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University I/O Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Device characteristics Block device vs. Character device Direct I/O vs.

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall 1 2 Differences

More information

11 Resource Management Deadlock and Starvation

11 Resource Management Deadlock and Starvation 11 Resource Management Deadlock and Starvation Examples, Deadlock Conditions, Policies against Deadlocks 11-24-2004 Winter Term 2004/2005 Gerd Liefländer 2003 Universität Karlsruhe, System Architecture

More information

Deadlocks. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Deadlocks. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Deadlocks Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics What is the deadlock problem? Four conditions for deadlock Handling deadlock

More information

COS 318: Operating Systems. Deadlocks. Jaswinder Pal Singh Computer Science Department Princeton University

COS 318: Operating Systems. Deadlocks. Jaswinder Pal Singh Computer Science Department Princeton University COS 318: Operating Systems Deadlocks Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Today s Topics u Conditions for a deadlock u Strategies

More information

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [DEADLOCKS] Shrideep Pallickara Computer Science Colorado State University L16.1 Frequently asked questions from the previous class survey Exponential Moving Average Is the α

More information

Main Points of the Computer Organization and System Software Module

Main Points of the Computer Organization and System Software Module Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a

More information

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09 21 I/O Management (1) I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January 26 2009 WT 2008/09 2009 Universität Karlsruhe, System Architecture Group 1 Recommended Reading

More information

Concurrency problems. To do. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems

Concurrency problems. To do. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Concurrency problems To do q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Bugs in some modern applications From some key apps, a summary

More information

Process P holds resource R. Process P is waiting for resource R. P Process P holds T and requests R. R Process Q holds R and requests T

Process P holds resource R. Process P is waiting for resource R. P Process P holds T and requests R. R Process Q holds R and requests T 1 Deadlocks ffl Non-sharable resource: the resource can be used by only one process at a time ffl A process may use a resource in only the following sequence: Request: If the resource cannot be granted,

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Deadlock

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Deadlock CSE120 Principles of Operating Systems Prof Yuanyuan (YY) Zhou Using Semaphore to Share Resource 2 3 4 5 Process P(); { A.Down(); B.Down(); 0 6 use both resource B.Up(); A.Up(); } Process Q(); { A.Down();

More information

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13 I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of

More information

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University I/O & Storage Jin-Soo Kim ( jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics I/O systems Device characteristics: block vs. character I/O systems

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information

I/O Systems. Jo, Heeseung

I/O Systems. Jo, Heeseung I/O Systems Jo, Heeseung Today's Topics Device characteristics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking

More information

Operating Systems (CS1022) Input/Output. Yagiz Özbek Evren

Operating Systems (CS1022) Input/Output. Yagiz Özbek Evren Operating Systems (CS1022) Input/Output Yagiz Özbek Evren 1 Content Principles of IO Hardware...3 IO Devices.. Device Controllers.. Memory-Mapped IO... Direct Memory Access... Interrupts. Principles of

More information

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University L30.1 Frequently asked questions from the previous class survey ECCs: How does it impact

More information

Operating Systems. V. Input / Output

Operating Systems. V. Input / Output Operating Systems V. Input / Output Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Devices of a Computer System Applications OS CPU Memory

More information

UNIT 4 DEADLOCKS 4.0 INTRODUCTION

UNIT 4 DEADLOCKS 4.0 INTRODUCTION UNIT 4 DEADLOCKS Deadlocks Structure Page Nos 4.0 Introduction 69 4.1 Objectives 70 4.2 Deadlocks 70 4.3 Characterisation of a Deadlock 71 4.3.1 Mutual Exclusion Condition 4.3.2 Hold and Wait Condition

More information

Concurrency problems. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems

Concurrency problems. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Concurrency problems q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Bugs in some modern applications From some key apps, a summary

More information

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University ECCs: How does it impact

More information

Deadlock. A Bit More on Synchronization. The Deadlock Problem. Deadlock Characterization. Operating Systems 2/7/2005. CSC 256/456 - Spring

Deadlock. A Bit More on Synchronization. The Deadlock Problem. Deadlock Characterization. Operating Systems 2/7/2005. CSC 256/456 - Spring A Bit More on Synchronization Deadlock CS 256/456 Dept. of Computer Science, University of Rochester Synchronizing interrupt handlers: Interrupt handlers run at highest priority and they must not block.

More information

CSCI-GA Operating Systems I/O. Hubertus Franke

CSCI-GA Operating Systems I/O. Hubertus Franke Operating Systems I/O CSCI-GA.2250-001 Hubertus Franke frankeh@cs.nyu.edu External devices that engage in I/O with computer systems can be grouped into three categories: Human readable suitable for communicating

More information

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel Chapter-6 SUBJECT:- Operating System TOPICS:- I/O Management Created by : - Sanjay Patel Disk Scheduling Algorithm 1) First-In-First-Out (FIFO) 2) Shortest Service Time First (SSTF) 3) SCAN 4) Circular-SCAN

More information

Operating Systems: William Stallings. Starvation. Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall

Operating Systems: William Stallings. Starvation. Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 6 Concurrency: Deadlock and Starvation Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Deadlock

More information

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests

More information

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University CS 370: OPERATING SYSTEMS [DISK SCHEDULING ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University Frequently asked questions from the previous class survey Can a UNIX file span over

More information

Device-Functionality Progression

Device-Functionality Progression Chapter 12: I/O Systems I/O Hardware I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Incredible variety of I/O devices Common concepts Port

More information

Chapter 12: I/O Systems. I/O Hardware

Chapter 12: I/O Systems. I/O Hardware Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations I/O Hardware Incredible variety of I/O devices Common concepts Port

More information

QUESTION BANK UNIT I

QUESTION BANK UNIT I QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?

More information

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall I/O Device Controllers I/O Systems CS 256/456 Dept. of Computer Science, University of Rochester 10/20/2010 CSC 2/456 1 I/O devices have both mechanical component & electronic component The electronic

More information

Input/Output Systems Prof. James L. Frankel Harvard University

Input/Output Systems Prof. James L. Frankel Harvard University Input/Output Systems Prof. James L. Frankel Harvard University Version of 5:20 PM 28-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. I/O Overview Different kinds of devices Mass storage

More information

Deadlocks. Copyright : University of Illinois CS 241 Staff 1

Deadlocks. Copyright : University of Illinois CS 241 Staff 1 Deadlocks 1 Deadlock Which way should I go? 2 Deadlock I Oh can no! almost I m get stuck! across GRIDLOCK! 3 Deadlock Definition Deadlocked process Waiting for an event that will never occur Typically,

More information

Deadlock. Concurrency: Deadlock and Starvation. Reusable Resources

Deadlock. Concurrency: Deadlock and Starvation. Reusable Resources Concurrency: Deadlock and Starvation Chapter 6 Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other No efficient solution Involve conflicting

More information

COMPUTER SCIENCE 4500 OPERATING SYSTEMS

COMPUTER SCIENCE 4500 OPERATING SYSTEMS Last update: 2/23/2017 COMPUTER SCIENCE 4500 OPERATING SYSTEMS 2017 Stanley Wileman Module 7: Deadlocks In This Module 2! Deadlock: Definition and Examples! Deadlock: Models! Deadlock: Prevention Algorithms

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple

More information

Content. 5: Input/Output. I/O Devices. Principles of I/O hardware. I/O Devices. I/O Devices

Content. 5: Input/Output. I/O Devices. Principles of I/O hardware. I/O Devices. I/O Devices Content 5: Input/Output Principles of I/O hardware Principles of I/O Software I/O software layers Disks Clocks Power management 1 2 Principles of I/O hardware People look at hardware in different ways

More information

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College CISC 7310X C11: Mass Storage Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/19/2018 CUNY Brooklyn College 1 Outline Review of memory hierarchy Mass storage devices Reliability

More information

System Model. Deadlocks. Deadlocks. For example: Semaphores. Four Conditions for Deadlock. Resource Allocation Graph

System Model. Deadlocks. Deadlocks. For example: Semaphores. Four Conditions for Deadlock. Resource Allocation Graph System Model Deadlocks There are non-shared computer resources Maybe more than one instance Printers, Semaphores, Tape drives, CPU Processes need access to these resources Acquire resource If resource

More information

Computer Science 4500 Operating Systems. In This Module. Deadlock Definition. Module 7 Deadlocks

Computer Science 4500 Operating Systems. In This Module. Deadlock Definition. Module 7 Deadlocks Computer Science 4500 Operating Systems Module 7 Deadlocks 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 In This Module Deadlock: Definition and Examples Deadlock: Models Deadlock: Prevention

More information

Computer Science 4500 Operating Systems

Computer Science 4500 Operating Systems Computer Science 4500 Operating Systems Module 7 Deadlocks 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 1 In This Module Deadlock: Definition and Examples Deadlock: Models Deadlock: Prevention

More information

Deadlock and Starvation

Deadlock and Starvation Deadlock and Starvation Deadlock Permanent blocking of a set of processes Processes are waiting on events, but the events can only be triggered by other blocked processes No simple, efficient solution

More information

Input/Output. Today. Next. ! Principles of I/O hardware & software! I/O software layers! Secondary storage. ! File systems

Input/Output. Today. Next. ! Principles of I/O hardware & software! I/O software layers! Secondary storage. ! File systems Input/Output Today! Principles of I/O hardware & software! I/O software layers! Secondary storage Next! File systems Operating systems and I/O! Two key operating system goals Control I/O devices Provide

More information

Chapter 7: Deadlocks. Operating System Concepts 8 th Edition,

Chapter 7: Deadlocks. Operating System Concepts 8 th Edition, Chapter 7: Deadlocks, Silberschatz, Galvin and Gagne 2009 Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks To present a number

More information

Last Class: Monitors. Real-world Examples

Last Class: Monitors. Real-world Examples Last Class: Monitors Monitor wraps operations with a mutex Condition variables release mutex temporarily C++ does not provide a monitor construct, but monitors can be implemented by following the monitor

More information

!! What is a deadlock? !! What causes a deadlock? !! How do you deal with (potential) deadlocks? Maria Hybinette, UGA

!! What is a deadlock? !! What causes a deadlock? !! How do you deal with (potential) deadlocks? Maria Hybinette, UGA Chapter 8: Deadlock Questions? CSCI [4 6]730 Operating Systems!! What is a deadlock?!! What causes a deadlock?!! How do you deal with (potential) deadlocks? Deadlock 2 Deadlock: What is a deadlock? Example:

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance Objectives Explore the structure of an operating

More information

! What is a deadlock? ! What causes a deadlock? ! How do you deal with (potential) deadlocks? Maria Hybinette, UGA

! What is a deadlock? ! What causes a deadlock? ! How do you deal with (potential) deadlocks? Maria Hybinette, UGA Chapter 8: Deadlock Questions? CSCI 4730 Operating Systems! What is a deadlock?! What causes a deadlock?! How do you deal with (potential) deadlocks? Deadlock Deadlock: What is a deadlock? Example: Two

More information

6. Concurrency: Deadlock

6. Concurrency: Deadlock CSC400 - Operating Systems 6. Concurrency: Deadlock J. Sumey Deadlock one problem that results from multiprogramming def: a process (or thread) is said to be deadlocked if it is waiting for an event that

More information