A. Starvation
B. Deadlock
C. Aging
D. Signaling
Explanation: If a thread which had already locked a mutex, tries to lock the mutex again, it will enter into the waiting list of that mutex, which results in a deadlock. It is because no other thread can unlock the mutex.
A. Is a binary mutex
B. Must be accessed from only one process
C. Can be accessed from multiple processes
D. None of the mentioned
A. Mutex & counting
B. Binary & counting
C. Counting & decimal
D. Decimal & binary
A. Is a binary mutex
B. Must be accessed from only one process
C. Can be accessed from multiple processes
D. None of the mentioned
Explanation: میوٹیکس (Mutex) کیا ہے؟ میوٹیکس (جس کا پورا نام Mutual Exclusion ہے) آپریٹنگ سسٹم میں ایک ایسا تالا (Lock) ہے جو یہ یقینی بناتا ہے کہ کمپیوٹر کا کوئی بھی خاص حصہ یا ڈیٹا (Shared Resource) ایک وقت میں صرف ایک ہی پروگرام یا تھریڈ (Thread) استعمال کرے۔
A. 42
B. 2
C. 7
D. 12
Explanation: P represents Wait and V represents Signal. P operation will decrease the value by 1 every time and V operation will increase the value by 1 every time. In semaphore operations:P Operation (Wait/Down): Decrements the value of the semaphore ($S = S - 1$).V Operation (Signal/Up): Increments the value of the semaphore ($S = S + 1$).Step-by-step:Initial Value: $7$After 20 P operations: $7 - 20 = -13$After 15 V operations: $-13 + 15 = 2$
A. 1
B. -1
C. 0.8
D. 0.5
A. Two
B. Three
C. Four
D. Eight
Explanation: Here are the possible ways in which statements from A and B can be interleaved. A1 A2 B1 B2: X = 11 A1 B1 A2 B2: X = 6 A1 B1 B2 A2: X = 10 B1 A1 B2 A2: X = 10 B1 A1 A2 B2: X = 6 B1 B2 A1 A2: X = 12.
A. One
B. Two
C. Three
D. Four
Explanation: The semaphore T ensures that all the statements from A finish execution before B begins. So now there is only one way in which statements from A and B can be interleaved: A1 A2 B1 B2: X = 11.
A. System calls
B. Ipc mechanisms
C. System protection
D. None of the mentioned
A. Mutual exclusion
B. Bounded waiting
C. Aging
D. Progress
Explanation: A spinlock is a mutual exclusion mechanism that uses busy-waiting (looping) instead of sleeping, making it ideal for very short critical sections in multi-core systems.