CMSC 421 Exam 2(Complete solutions)
Preemption correct answers Ability of the OS to interrupt a currently executing task and allocate the CPU to another task. Non-preemption correct answers Once a task starts executing, it continues until it completes or voluntarily gives up the CPU. Dispatcher correct answers The kernel routine that gives control of a core to the thread selected by the scheduler 1. Switches context from one process to another 2. Switches to user mode 3. Jumps to the proper location in the user program to resume that program Round Robin correct answers FCFS, but is preemptive If CPU burst of currently running process is longer than 1 time quantum, the timer will go off and cause an interrupt to the OS. Will then be added to back of queue. First Come First Serve (FCFS) correct answers The process that requests the CPU first is allocated the CPU first Shortest First Scheduling (SFS) correct answers CPU is always assigned to the process with the smallest CPU burst time Time Quantum (or Time Slice) correct answers A small unit of time used by scheduling algorithms as a basis for determining when to preempt a thread from the CPU to allow another to run Mutual Exclsuion correct answers Only 1 process can access its critical section at a time Mutex Lock correct answers Mutual exclusion lock Semaphore correct answers Atomic integer Counting Semaphore: 0 to N resources Binary Semaphore: 0 to 1 resources wait() when applying for a semaphore signal() when releasing a semaphore Monitors correct answers A high-level abstraction that provides a convenient and effective mechanism for process synchronization
Información del documento
- Subido en
- 23 de mayo de 2024
- Número de páginas
- 3
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas