Synchronization

Q1. A __________ exists when access to shared data is not controlled, potentially resulting in __________ data values.

Answers: race condition, corrupt

Q2. A __________ process is one that can affect or be affected by other processes executing in the system.

Answers: cooperating

Q3. A __________ section is a segment of code where a process may access and update shared data, and no two processes should be executing it at the same time.

Answers: critical

Q4. The three conditions that must be met for a solution to the critical-section problem are __________, __________, and __________.

Answers: mutual exclusion, progress, bounded waiting

Q5. The __________ operation of a semaphore decreases its value, and the __________ operation increases its value.

Answers: wait, signal

Q6. A __________ semaphore can only have values of 0 and 1, while a __________ semaphore can take unrestricted non-negative values.

Answers: binary, counting

Q7. The __________ problem occurs when multiple threads access and manipulate the same data concurrently, and the final result depends on the execution order.

Answers: race condition

Q8. A __________ kernel allows a process to be preempted while running in kernel mode, while a __________ kernel does not.

Answers: preemptive, nonpreemptive

Q9. In Peterson’s solution, the two shared variables used for synchronization are __________ and __________.

Answers: turn, flag

Q10. The __________ instruction atomically modifies a memory location and is commonly used in synchronization.

Answers: test_and_set

Q11. The __________ and __________ operations are the two fundamental operations used in implementing semaphores.

Answers: wait, signal

Q12. The mutual exclusion requirement states that if process Pi is executing in its __________ section, then no other process can be executing in their __________ sections.

Answers: critical, critical

Q13. The two general approaches used to handle critical sections in operating systems are __________ kernels and __________ kernels.

Answers: preemptive, nonpreemptive

Q14. A __________ is a data structure that maintains a list of processes waiting to enter a critical section.

Answers: waiting queue

Q15. The __________ problem arises when a low-priority process holds a resource needed by a high-priority process.

Answers: priority inversion

Q16. A __________ ensures that all load and store operations are completed before additional load and store operations occur.

Answers: memory barrier

Q17. A __________ lock is a mutual exclusion mechanism that uses busy waiting.

Answers: spin

Q18. The __________ operation suspends a process when it cannot proceed due to resource unavailability.

Answers: sleep

Q19. The __________ operation resumes execution of a suspended process.

Answers: wakeup

Q20. A system with multiple processors executing threads in parallel is known as a __________ system.

Answers: multiprocessor

Q21. A __________ process can directly share a logical address space with other processes.

Answers: cooperating

Q22. The __________ section of a process requests permission to enter the critical section.

Answers: entry

Q23. The __________ section of a process executes after exiting the critical section.

Answers: remainder

Q24. __________ is the requirement that a process should not wait indefinitely to enter its critical section.

Answers: bounded waiting

Q25. The __________ model determines how memory modifications by one processor are visible to others.

Answers: memory

Q26. The __________ problem is solved by ensuring that only one process can access shared data at a time.

Answers: critical-section

Q27. __________ synchronization tools provide higher-level methods for process coordination.

Answers: software-based

Q28. A process executes the __________ operation on a semaphore to decrement its value before proceeding.

Answers: wait

Q29. A process executes the __________ operation on a semaphore to increment its value and wake up a waiting process.

Answers: signal

Q30. The __________ of a process refers to its position in the system’s scheduling order.

Answers: priority

Q31. The __________ algorithm is a software-based solution to the critical-section problem for two processes.

Answers: Peterson’s

Q32. The __________ problem can be prevented by ensuring that processes take turns entering their critical sections.

Answers: race condition

Q33. The __________ variable is used in Peterson’s solution to determine which process enters the critical section first.

Answers: turn

Q34. The __________ instruction is an atomic operation that swaps the contents of two memory locations.

Answers: compare_and_swap

Q35. The __________ scheduling method selects the next process based on priority.

Answers: priority-based

Q36. The __________ data structure is used by semaphores to keep track of waiting processes.

Answers: queue

Q37. A __________ lock is a simple software tool used for mutual exclusion.

Answers: mutex

Q38. The __________ technique allows waiting processes to be placed in a queue rather than using busy waiting.

Answers: blocking

Q39. The __________ function is used to acquire a mutex lock before entering the critical section.

Answers: acquire

Q40. The __________ function is used to release a mutex lock after exiting the critical section.

Answers: release

Q41. The __________ operation ensures that a thread’s access to a shared resource does not interfere with others.

Answers: synchronization

Q42. A __________ system must be carefully designed to avoid deadlocks and ensure fair process execution.

Answers: concurrent

Q43. The __________ technique prevents busy waiting by putting waiting processes to sleep.

Answers: blocking

Q44. The __________ section contains code that is executed when a process finishes using a shared resource.

Answers: exit

Q45. The __________ section of a process follows the critical section and performs clean-up operations.

Answers: exit

Q46. The __________ technique avoids starvation by ensuring each process gets a turn to execute.

Answers: fair scheduling

Q47. The __________ method ensures that higher-priority processes are not indefinitely delayed by lower-priority processes.

Answers: priority inheritance

Q48. A __________ is a data structure used to store and manage a list of active processes.

Answers: process table

Q49. The __________ method of synchronization ensures that no process is starved of resources.

Answers: fair scheduling

Q50. The __________ is a high-level synchronization tool used to avoid timing errors in concurrent programming.

Answers: monitor

robot