Chapter 25 Flashcards

1
Q

What is critical region

A

A critical region is a section of code that is always executed under mutual exclusion.

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

What are 2 parts of critical region

A
  1. Variables that must be accessed under mutual exclusion

2. A new language statement that identifies a critical region in which the variables are accessed

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

What are monitors

A

High-level synchronization construct that allows the safe sharing of an abstract data type among concurrent cooperating processes.

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

How many process can be active within a monitor

A

Only 1

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

What is abstract data type

A

There is a data and then some defined functions that access that data.

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

Monitor resembles to class. What is the difference between monitor and class

A

In class we can access as many functions as we like but in monitor only one function can be accessed by a process.

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

How to define monitor

A

monitor monitor-name { }

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

What about monitor with condition variables

A

Additional synchronization constructs are needed to model some synchronization problems. They can be modeled with condition variables.

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

How to define condition variables

A

condition x, y;

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

How many operations can be performed on condition variables and which are they

A

2 operations. wait and signal

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

What is null operation

A

If there is no process waiting on condition variable and some process invoke signal operation on that condition variable then it is called null operation. It means nothing is happened.

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