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

ومـما زادني شـرفـاً وتـيــهـاً
وكدت بأخمصي أطأ الـثريا
دخولي تحت قولك يا عبادي
وأن صـيَّرت أحمد لي نـبيـا
Download Telegram
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
in Test_and_set exit section
Anonymous Quiz
26%
lock = True
74%
lock = False
CompareAndSwap software instruction is also an atomic instruction
Anonymous Quiz
63%
T
38%
F
CompareAndSwap always returns the new value of the lock variable
Anonymous Quiz
41%
T
59%
F
in CompareAndSwap exit section
Anonymous Quiz
78%
lock = 0
19%
lock = 1
3%
lock = -1
Simplest is mutex lock, boolean variable indicating if lock is available or not
Anonymous Quiz
88%
T
12%
F
Calls to acquire () and release () can’t be atomi
Anonymous Quiz
13%
T
87%
F
in Mutex Locks Spinlocks is ideal for single-CPU as it is wasteful of CPU cycles that other process might be able to use productively
Anonymous Quiz
67%
F
33%
T
Derived Channel
Atomic =
semaphore S is an integer variable that can only be modified via two interruptible operations: wait () and signal ()
Anonymous Quiz
71%
T
29%
F
in semaphore wait function the value of the integer is
Anonymous Quiz
32%
incremented
68%
decremented
in semaphore signal function the value of the integer is
Anonymous Quiz
15%
decremented
85%
incremented