Discussion
What is a race condition in operating systems ?
Answer: B
A race condition is multiple processes accessing shared data concurrently, so that the result depends on the timing.
If two threads both read a counter, add one and write it back, their steps can interleave so that one update is lost, and the final value depends on which ran first. Code that touches shared data must be a critical section protected by mutual exclusion, with locks, semaphores or atomic operations.
Competition for the CPU is handled by the scheduler and is not a race condition. Waiting for I/O is ordinary blocking. Priority inversion is a different scheduling problem, where a high-priority task waits on a lower-priority one.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development