Process Synchronization is the task of coordinating the execution of processes in such a way that two processes can have access to the same shared data and resources
Anonymous Quiz
61%
T
39%
F
Race Condition is Several processes access and manipulate the same data concurrently may lead to incorrect shared data.
Anonymous Quiz
90%
T
10%
F
The Producer-Consumer problem is a classic multi-process synchronization problem.
Anonymous Quiz
83%
T
17%
F
The job of the consumer is to generate the data, put it into the buffer, and again start generating
data
data
Anonymous Quiz
17%
T
83%
F
The producers and consumers share different memory buffers that is of fixed-size (bounded buffer)
Anonymous Quiz
29%
T
71%
F
in producer consumer problem We can do so by having an integer counter that keeps track of the
number of full buffers. Initially, counter is set....
number of full buffers. Initially, counter is set....
Anonymous Quiz
2%
-1
78%
0
15%
1
5%
2
in producer consumer problem, we use while(counter == BUFFER_SIZE); in … stage
Anonymous Quiz
84%
producer
16%
consumer
in producer consumer problem, we use while(counter == 0); in … stage
Anonymous Quiz
78%
consumer
22%
producer
in producer consumer problem
in =.........
in =.........
Anonymous Quiz
6%
in + 1
6%
(in + 1) % counter
80%
(in +1) % BUFFER_SIZE
8%
(in - 1) % BUFFER_SIZE
in producer consumer problem
out =........
out =........
Anonymous Quiz
36%
(out - 1) % BUFFER_SIZE
58%
(out + 1) % BUFFER_SIZE
2%
out + 1
4%
0
share common variables, updating table, writing file, etc..
Anonymous Quiz
8%
entry section
3%
exit section
82%
critical section
6%
remainder section
When one process in critical section, other may be in its critical section
Anonymous Quiz
68%
F
32%
T
Each process must ask permission to enter critical section in …..
Anonymous Quiz
87%
entry section
8%
critical section
4%
exit section
2%
remainder section
If process Pi is executing in its critical section, then no other processes can be
executing in their critical sections
executing in their critical sections
Anonymous Quiz
8%
Progress
12%
Bounded Waiting
80%
Mutual Exclusion