Operating System » Classic Sync Problems
Operating System Subcategories
Memory Management Swapping 1Process Scheduling Queue
Virtual Memory Page Replacement Algorithms 1Linux
Cpu SchedulingMemory Management
Computer FundamentalsCpu Scheduling Benefits
Threads Signal HandlingThreads Ult Klt
Distributed Operating SystemBasics
Operating SystemProcesses
Cpu Scheduling Algorithms 1Cpu Scheduling Algorithms 2
DeadlockDeadlock Avoidance
Memory Management Swapping 2Memory Allocation 1
Secondary StorageMemory Management Paging 1
Memory Management Paging 2Rtos
Multimedia System Cpu Disk SchedulingSecurity Intrusion Detection
Virtual Memory ThrashingFile System Interface Access Methods 1
File System Interface Directory Structure 1File System Interface Directory Structure 2
File System Interface Mounting SharingFile System Allocation Methods 1
Disk Scheduling 2Disk Management
Classic Sync ProblemsSemaphores 1
Process CreationMultimedia System Network Management
Semaphores 2Cpu Scheduling 2
Application Io Interface 1Inter Process Communication
Process SynchronizationMultimedia System Compression 1
Network File System 1Disk Scheduling 1
Mass Storage Raid 1File System 1
Communication Systems Bandwidth Transmission MediumSecurity Cryptography
Two Port NetworkProcess Rpc
Virtual Memory Page Replacement Algorithms 2Virtual Memory Frame Allocation
Network File System 2File System Allocation Methods 2
File System Allocation Methods 3Process Control Block
Process StructuresCritical Section Problem
Process Sync MonitorsAtomic Transactions
Deadlock RecoveryMemory Allocation 2
Memory Management SegmentationApplication Io Interface 2
Kernel Io SubsystemsMultimedia System Compression 2
Multimedia System Compression 3Security User Authentication
Security Program System ThreatsSecurity System Facility
Threads Fork ExecThreads Cancellation
Threads PoolsMulti Threading Models
Virtual Memory Demand PagingVirtual Memory
File System ConceptsFile System Implementation
File System Interface Access Methods 2File System Recovery
Io SubsystemSwap Space Management
Mass Storage Raid 2Mass Storage Tertiary Storage
Protection ConceptsProtection Access Matrix
SecurityProtection Memory Protection
Protection Revocation Access RightsNetwork Structure Topology
RobustnessDistributed File System
Distributed SynchronizationDeadlock Prevention
Deadlock DetectionThreads
File System Interface ProtectionFile System Free Space Performance
The bounded buffer problem is also known as ____________

A. Readers €? writers problem
B. Dining €? philosophers problem
C. Producer €? consumer problem
D. None of the mentioned

In the bounded buffer problem, there are the empty and full semaphores that ____________

A. Count the number of empty and full buffers
B. Count the number of empty and full memory spaces
C. Count the number of empty and full queues
D. None of the mentioned

In the bounded buffer problem ____________

A. There is only one buffer
B. There are n buffers ( n being greater than one but finite)
C. There are infinite buffers
D. The buffer size is bounded

The dining – philosophers problem will occur in case of ____________

A. 5 philosophers and 5 chopsticks
B. 4 philosophers and 5 chopsticks
C. 3 philosophers and 5 chopsticks
D. 6 philosophers and 5 chopsticks

Explanation: 1. DefinitionOne-liner: It is a classical synchronization problem used to model the challenges of allocating multiple shared resources among several processes without causing deadlock. 2. Primary CausesDeadlock: Occurs when all philosophers pick up their left fork simultaneously, leaving no right forks available (Circular Wait).Starvation: Occurs when a philosopher is indefinitely unable to acquire both forks because their neighbors are constantly alternating eating and thinking.3. Key Solutions (Deadlock Prevention)Resource Hierarchy: Assign numbers to forks and require philosophers to always pick up the lower-numbered fork first.Limitation: Allow only $n-1$ philosophers (e.g., 4 out of 5) to sit at the table simultaneously.Asymmetric Strategy: Have even-positioned philosophers pick the right fork first and odd-positioned philosophers pick the left fork first.Atomicity: Use a Monitor or Semaphore to ensure a philosopher only picks up forks if both are available at the same time.

A deadlock free solution to the dining philosophers problem ____________

A. Necessarily eliminates the possibility of starvation
B. Does not necessarily eliminate the possibility of starvation
C. Eliminates any possibility of any kind of problem further
D. None of the mentioned

Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. (GATE 2010) Method used by P1 : while(S1==S2); Critical section S1 = S2; Method used by P2 : while(S1!=S2); Critical section S2 = not(S1); Which of the following statements describes properties achieved?

A. Mutual exclusion but not progress
B. Progress but not mutual exclusion
C. Neither mutual exclusion nor progress
D. Both mutual exclusion and progress

Explanation: The while(S1==S2) or while(S1!=S2) loops will work as a mutex. When either P1 or P2 enters the Critical section (CS), they will make sure to change the values of S1 or S2 upon exit from the CS such that the other process enters the CS while that process waits on the mutex.