mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
vault backup: 2022-10-30 14:25:53
This commit is contained in:
parent
9fde17e5bb
commit
555c2e1e61
27
content/notes/20-sync-deadlock.md
Normal file
27
content/notes/20-sync-deadlock.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
title: "20-sync-deadlock"
|
||||||
|
aliases:
|
||||||
|
tags:
|
||||||
|
- cosc204
|
||||||
|
- lecture
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bounded buffer problem
|
||||||
|

|
||||||
|
|
||||||
|
producer consumer problem
|
||||||
|
|
||||||
|
issues
|
||||||
|
- no data in buffe: consumer has nothing to consume
|
||||||
|
- buffer is full: no space for producer to produce
|
||||||
|
|
||||||
|
private vars
|
||||||
|
- in: next pos in buf to be writted
|
||||||
|
- out: next pos in buf to be read
|
||||||
|
|
||||||
|
shared variables
|
||||||
|
- buffer
|
||||||
|
- counter: number of items in buffer
|
||||||
|
|
||||||
|
waiting
|
||||||
|
- busy"
|
||||||
@ -49,7 +49,9 @@ tags:
|
|||||||
- [16-device-drivers](notes/16-device-drivers.md)
|
- [16-device-drivers](notes/16-device-drivers.md)
|
||||||
- [17-processes-communication](notes/17-processes-communication.md)
|
- [17-processes-communication](notes/17-processes-communication.md)
|
||||||
- [18-processes-sharing-and-threads](notes/18-processes-sharing-and-threads.md)
|
- [18-processes-sharing-and-threads](notes/18-processes-sharing-and-threads.md)
|
||||||
-
|
- [19-cpu-scheduling](notes/19-cpu-scheduling.md)
|
||||||
|
|
||||||
|
|
||||||
# Archive
|
# Archive
|
||||||
|
|
||||||
# Info
|
# Info
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user