Derived Channel
1.54K subscribers
252 photos
4 videos
374 files
68 links
القناة الأساسية
@stepbystep001

ومـما زادني شـرفـاً وتـيــهـاً
وكدت بأخمصي أطأ الـثريا
دخولي تحت قولك يا عبادي
وأن صـيَّرت أحمد لي نـبيـا
Download Telegram
in producer consumer problem
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 =........
Anonymous Quiz
36%
(out - 1) % BUFFER_SIZE
58%
(out + 1) % BUFFER_SIZE
2%
out + 1
4%
0
in producer consumer problem next_consumed =
buffer[in]
Anonymous Quiz
30%
T
70%
F
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
Anonymous Quiz
8%
Progress
12%
Bounded Waiting
80%
Mutual Exclusion
Peterson’s Solution is a hardware-based solution to the critical-sectio
Anonymous Quiz
29%
T
71%
F
Peterson’s Solution is … to be synchronized
Anonymous Quiz
6%
limited to 1 process
6%
limited to 3 processes
79%
limited to 2 processes
9%
unlimited
in Peterson’s Solution we have … shared variables
Anonymous Quiz
19%
1
7%
0
70%
2
4%
3
in Peterson’s Solution entry section of process j contains
Anonymous Quiz
76%
while(flag[i] && turn == i);
14%
while(flag[j] && turn == i);
10%
while(flag[j] && turn == j);
in Peterson’s Solution exit section of process i contains
Anonymous Quiz
19%
flag[j] = false
13%
flag[j] = true
13%
flag[i] = true
55%
flag[i] = false
in Peterson’s Solution exit section of process j contains
Anonymous Quiz
73%
flag[j] = false
9%
flag[j] = true
8%
flag[i] = false
10%
flag[i] = true
increment زيادة
to solve critical section problem Disabling interrupts is efficient on multiprocessor systems
Anonymous Quiz
54%
F
46%
T
in hardware synchronization solutions are based on the idea of locking
Anonymous Quiz
85%
T
15%
F
we have a shared lock variable which can take one of the two values, 0 or 1
Anonymous Quiz
89%
Test_and_set
11%
CompareAndSwap