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

ومـما زادني شـرفـاً وتـيــهـاً
وكدت بأخمصي أطأ الـثريا
دخولي تحت قولك يا عبادي
وأن صـيَّرت أحمد لي نـبيـا
Download Telegram
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
The Test_and_Set takes a shared variable called offset that represent the lock status and return its
original value and then set the variable to true which means the lock is disabled
Anonymous Quiz
51%
T
49%
F