Design: Concurrency Management System
Design focuses on concurrency control mechanisms and resource access management. Does not cover network protocols or UI design.
Functional Requirements
Non-Functional Requirements
Jump into concepts and practice - no test required
+-------------------+ +-------------------+ +-------------------+
| Client/Process | <---> | Lock Manager | <---> | Resource Manager |
+-------------------+ +-------------------+ +-------------------+
| | |
| | |
| v |
| +-------------------+ |
| | Deadlock Detector | |
| +-------------------+ |
| | |
+------------------------------------------------------+lock.acquire() is used to obtain the lock before accessing shared data.Thread 1: temp = counter
temp = temp + 1
counter = temp
Thread 2: temp = counter
temp = temp + 1
counter = temp
What is the possible final value of counter if it starts at 0?lock.acquire() shared_data.append(1) # Missing lock.release()