chp 6 and 7: process synchronization

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:27 AM on 2/24/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

what are race conidtions

when the output depends on the timing/interleaving of operations

  • processes can run concurrently

  • processes can be interrupted at any time

  • shared data can end up inconsistent

2
New cards

what is the critical section

any section of code that uses shared data; when one process is in its critical section, no other may be in its critical section

3
New cards

what are examples of code that can be found in the critical section

  • Changing common variables

  • Updating tables

  • Writing files

4
New cards

what is the general structure of a process

entry section

critical section

exit section

remainder section

5
New cards

what are the bad solutions of the critical section problem

  • disabling interrupts: impractical and can cause starvation, and too much control to users/developers

  • shared flags: one process can block unnecessarily even when critical section is free

6
New cards

what are the 3 requirements for a correct critical section problem solution

1, mutual exclusion: one process in critical section at a time

  1. progress: if critical section is free, can’t postpone forever

  2. bounded waiting: a bound must exist on how long a process can be forced to wait

7
New cards

what is peterson’s solution

use turn (whose turn it is) and flag[2] (who wants to enter)

8
New cards

what are the 3 hardware solutions to the critical section problem

memory barrier instructions:

hardware instructions

atomic variables

9
New cards

what are memory barrier instructions

instructions to force memory updates to all processors ensuring that all threads use the correct data

10
New cards

what are hardware instructions

instructions guaranteed to function atomically (uninterruptible)

11
New cards

what are atomic variables

variables with operations that use only atomic hardware instructionw

12
New cards

what are mutex locks

a user-friendly approach built by kernel developers for application developers to provide mutual exclusion; a boolean variable indicating if a lock is available or not

13
New cards

what do acquire() and release() do for mutex locks

acquire(): acquires the lock and enters the critical section

release() releases the lock and exits the critical section

14
New cards

what is busy-waiting

any process that wishes to enter its critical section must loop continuously white it waits

15
New cards

what are the two types of semphores

binary semaphore: integer value can range only between 0 and 1 (mutex)

counting semaphore: Integer value can range over an unrestricted domain

16
New cards

what do wait(S) and signal(S) do

wait(S) obtains a resource if available

signal(S) releases a resource

If the value of S reaches 0, then no resources are available and the call wait(S) will block until one becomes available

Explore top notes

note
Lecture 13A: Paleozoic Life
Updated 236d ago
0.0(0)
note
Gravitation and Circular Motion
Updated 1083d ago
0.0(0)
note
Chapter 11: Stockholders' Equity
Updated 812d ago
0.0(0)
note
chapter 4: a&p (tissues)
Updated 661d ago
0.0(0)
note
APES Unit 2 - Biodiversity
Updated 546d ago
0.0(0)
note
Lecture 13A: Paleozoic Life
Updated 236d ago
0.0(0)
note
Gravitation and Circular Motion
Updated 1083d ago
0.0(0)
note
Chapter 11: Stockholders' Equity
Updated 812d ago
0.0(0)
note
chapter 4: a&p (tissues)
Updated 661d ago
0.0(0)
note
APES Unit 2 - Biodiversity
Updated 546d ago
0.0(0)

Explore top flashcards

flashcards
global Quiz
39
Updated 1053d ago
0.0(0)
flashcards
ap psych unit 7
73
Updated 1143d ago
0.0(0)
flashcards
Westward Expansion
29
Updated 1139d ago
0.0(0)
flashcards
latin vocab 1-30
28
Updated 754d ago
0.0(0)
flashcards
Chem Ch.4 Element Info
30
Updated 1283d ago
0.0(0)
flashcards
global Quiz
39
Updated 1053d ago
0.0(0)
flashcards
ap psych unit 7
73
Updated 1143d ago
0.0(0)
flashcards
Westward Expansion
29
Updated 1139d ago
0.0(0)
flashcards
latin vocab 1-30
28
Updated 754d ago
0.0(0)
flashcards
Chem Ch.4 Element Info
30
Updated 1283d ago
0.0(0)