Ch.6 Flashcards

(14 cards)

1
Q

Structures of a process(4):

A
  • entry section
  • critical section
  • exit section
  • remainder section
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Requirements that must be satisfied to every solution in critical section problem(3):

A

1- mutual exclusion

2- progress

3- bounded waiting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Types of kernel behavior(2):

A

1- preemptive kernel
2- Non-preemptive kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Synchronization tools

A

1- Peterson solution
2- hardware based
3- mutex locks
4-semaphores
5- monitor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Problems in semaphores

A
  • deadlocks
  • starvation
  • priority inversion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Classical problems

A
  • bounded waiting
  • readers- writers
  • dinning philosophers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Problems with semaphores

A
  • incorrect order: single before wait
  • double wait: wait wait
  • omitting: of wait, signal, or both
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Synchronization examples

A
  • windows
  • Linux
  • Pthreads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Consequence of problems with semaphores:!

A

Deadlock

Starvation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Types of semaphores

A

Binary semaphores

Counting semaphores

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Condition varicose operations(2):

A

Wait(): releases the monitor lock

Signal(): wake up one process that previously called x.wait() on the same condition, and if no process is waiting it does nothing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Windows synchronization

A
  • uses interrupt masks to protect access to shared resources
  • use spinlocks on multiprocessor systems
  • provide dispatcher objects user- land which may act as mutex , semaphores, events, and timers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Linux synchronization

A

Pre version 2.6 interrupts are disabled to implement short critical sections

Version 2.6 and later—> fully preemptive

Provides: semaphores, atomic integers, spin locks, reader writer versions of both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Pthreads synchronization

A

Pthreads API is OS independent

Provides: mutex lock, conditions variable

Non portable extensions include: read write lock, spin locks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly