1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Interrupt latency
time from arrival of interrupt to
start of routine that
services interrupt (Real-Time CPU Scheduling)
Dispatch latency
time for schedule to take
current process off CPU
and switch to another (Real-Time CPU Scheduling)
What characterizes a NUMA (non-uniform memory access)-aware operating system?
Memory is assigned closest to the CPU the thread is running on.
What issues do you have to account for when setting up a NUMA machine?
Process/Thread Placement:
OS scheduler must decide where to place threads so that they run on CPUs near their memory.
Shared data structures:
Data shared across NUMA nodes can lead to contention and increased memory access time.
What are characteristics of simulations?
More accurate compared to queueing models, programmed model of a computer system, clock is a variable, gather statistics about algorithm performance
What is a race condition in operating systems?
A race condition occurs when two or more processes or threads access shared data concurrently, and the outcome of the execution depends on the specific order in which the access occurs.
What is mutual exclusion (critical section problem)?
Only one process at a time can be executing in its critical section at a time.
What is progress (critical section problem)?
When no processes are in there critical section, the selection of the next process to enter cannot be postponed indefinitely.
What is bounded waiting (critical section problem)?
Processes waiting to enter their critical sections have a a limit on how long they can be delayed.
Why is Peterson’s solution not guaranteed to work?
Peterson’s solution assumes sequential consistency where read and writes happen in their code-specified order. Modern compilers reorder instructions for performance. At the cpu level, instructions are also reordered and this can cause certain cores to not see other cores’ writes.
What is the purpose of the Test-and-Set instruction?
To atomically check a value and set it to true.
What does Compare-and-Swap do atomically?
Compares a value and swaps only if it matches the expected value.
What is a mutex lock?
Boolean variable indicating if lock is available or not.
What is busy waiting?
When a thread is waiting for a condition to become true.
What is a spinlock?
A type of mutex lock that uses busy waiting to acquire a lock.
What is a semaphore?
A special integer variable used to control access to shared resources in concurrent systems.
What are the two functions of a semaphore and what do they do?
Wait(), decrements the semaphore, signal(), increments the semaphore.
What are monitors?
Abstract data types that include shared variables (resources), procedures/functions to be performed on the shared data, and include a synchronization mechanism.
What is the bounded buffer problem?
A fixed-size collection stores items. Producers cannot add to the buffer if it is full. Consumers cannot take from the buffer if it is empty.
What is the reader-writer problem?
Writers need exclusive access (mutual exclusion) and readers should not be limited when reading data.
What is the dining-philosophers problem?
5 philosophers sit around a table with a bowl of rice each and a chopstick to their left and right. They must alternate between eating and thinking so that each philosopher can eat with two chopsticks.
What is hold and wait?
A process is holding at least one resource and is waiting for additional resources held by other processes.
What is no preemption?
Resources cannot be forcibly taken from a process.
What is circular wait?
Processes each have a resource and want a resource from a neighboring process.
What is mutual exclusion? (deadlocK)
Only one thread at a time can use a resource.
What is compile time binding?
The process of translating logical addresses into physical addresses.
What is load time binding?
When logical addresses are mapped to physical memory just before a program is loaded into memory.
What is execution time binding?
Happens while the program is running; program decides or updates memory addresses, values, or function targets during execution.
What are logical addresses?
Generated by the CPU, A.K.A virtual addresses.
What are physical addresses?
Addresses seen by the memory management unit.