1/49
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
process synchronization
the coordination of processes to ensure they operate smoothly and efficiently without interfering with each other, especially when accessing shared resources or data
mutex
short for mutual exclusion, a lock that ensures only one process can access a critical section or resource at a time, preventing race conditions
semaphores
synchronization tools used to control access to shared resources by multiple processes
starvation
a situation where a process is perpetually denied access to resources because other processes continuously acquire them
circular wait
a condition where each process in a set is waiting for a resource held by another process in the same set, contributing to deadlock
fair resource allocation
a principle ensuring that all processes have fair access to resources, preventing starvation and ensuring balanced system performance
producer-consumer scenario
where one process produces data and another consumes it, requiring synchronization to ensure that the buffer used does not overflow or underflow
concurrency
the ability of an operating system to execute multiple processes simultaneously, improving performance and responsiveness
critical section
A section of code responsible for changing data that must only be executed by one thread or process at a time to avoid a race condition.
entry section
The section of code within a process that requests permission to enter its critical section.
exit section
The section of code within a process that cleanly exits the critical section.
remainder section
Whatever code remains to be processed after the critical and exit sections.
preemptive kernel
A type of kernel that allows a process to be preempted while it is running in kernel mode.
nonpreemptive kernels
A type of kernel that does not allow a process running in kernel mode to be preempted; a kernel-mode process will run until it exits kernel mode, blocks, or voluntarily yields control of the CPU.
mutex lock
A mutual exclusion lock; the simplest software tool for assuring mutual exclusion.
contended
A term describing the condition of a lock when a thread blocks while trying to acquire it.
uncontended
A term describing a lock that is available when a thread attempts to acquire it.
busy waiting
A practice that allows a thread or process to use CPU time continuously while waiting for something. An I/O loop in which an I/O thread continuously reads status information while waiting for I/O to complete.
spinlock
A locking mechanism that continuously uses the CPU while waiting for access to the lock.
To use a binary semaphore to solve the critical section problem, the semaphore must be initialized to 1 and _____ must be called before entering a critical section and _____ must be called after exiting the critical section.
wait(), signal()
A counting semaphore can be used as a binary semaphore.
True
_____ can be used to prevent busy waiting when implementing a semaphore.
Waiting queues
semaphore
An integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait() and signal().
counting semaphore
A semaphore that has a value between 0 and N, to control access to a resource with N instances.
binary semaphore
A semaphore of values 0 and 1 that limits access to one resource (acting similarly to a mutex lock).
readers-writers problem
A synchronization problem in which one or more processes or threads write data while others only read data.
reader-writer lock
A lock appropriate for access to an item by two types of accessors, read-only and read-write.
dining-philosophers problem
A classic synchronization problem in which multiple operators (philosophers) try to access multiple items (chopsticks) simultaneously.
monitor
a synchronization construct in programming languages that prevents race conditions
synchronization
coordinating processes or threads to ensure they work together properly without causing problems
initialization
the setup code included in the monitor package and used once when creating the monitor
encapsulation
keeping data and methods that use it together in one unit to make it easier to manage and protect
monitor entry queue
a place that holds all the threads (or procedures) waiting to enter the monitor
monitor procedure
functions that can be called from outside the monitor
private data
secret data inside the monitor, including private functions that cannot be used outside the monitor
signal()
a function that allows one of the paused processes in the waiting queue to start running
wait()
a function that pauses a process and puts it in a waiting queue inside the monitor
interprocess communication (IPC)
mechanisms allowing processes to communicate and synchronize their actions
race conditions
occur when multiple processes access and modify shared data concurrently, leading to unpredictable outcomes depending on the timing of their execution
shared variables
memory locations accessible by multiple processes for reading and writing data
What is the coordination of processes used to ensure they operate without interfering with each other?
Synchronization
What is a situation where the outcome of a process execution depends on the specific order in which processes access shared data?
Race condition
How can processes avoid race conditions in a multiprocessor environment?
By employing synchronization mechanisms
Which mechanism ensures exclusive access to a critical section by allowing only one process to enter at a time?
Mutex lock
Which mechanism uses counters to control access to resources, allowing processes to wait for availability and signal completion?
Semaphore
Which type of semaphore behaves similarly to a mutex lock, allowing only one process to access a critical section at a time?
Binary
Which classic synchronization problem involves ensuring that multiple readers can access shared data simultaneously but only one writer can modify it at a time?
Readers-writers problem
What does the dining philosophers problem illustrate in terms of synchronization?
The complexity of managing multiple resources among multiple processes
Which synchronization construct encapsulates data and operations, ensuring mutual exclusion and simplifying process synchronization management?
Monitor
How does a monitor ensure that only one process can access shared data at a time?
By implementing condition variables