Cmsc 421: Exam 2(A+ Graded)
concurrency correct answers the act of multiple processes (or threads) executing at the same time. critical section (CS) correct answers a segment of code that cannot be entered by a process while another process is executing a corresponding segment of the code. guarantee mutual exclusion correct answers If a process is executing in its critical section, then no other processes can be executing in their critical sections prevent lockout correct answers A process not attempting to enter the CS must not prevent other processes from entering the CS. Critical Section Problem correct answers When one process is in it's Critical Section, no others can be. Each must ask permission to enter it's section. prevent starvation correct answers A process (or a group of processes) must not be able to repeatedly enter the CS while other processes are waiting to enter. prevent deadlock correct answers Multiple processes trying to enter the CS at the same time must not block each other indefinitely. semaphore correct answers s is a non-negative integer variable that can be accessed using only two special operations, P and V. Implementation of P and V must guarantee that... correct answers 1. If several processes simultaneously invoke P(s) or V(s), the operations will occur sequentially in some arbitrary order. 2. If more than one process is waiting inside P(s) for s to become 0 , one of the waiting processes is selected arbitrarily to complete the P(s) operation. test-and-set instruction (TS) correct answers copies a variable into a register and sets the variable to zero in one indivisible machine cycle. lock correct answers a synchronization barrier through which only one process can pass at a time. TS allows an easy implementation of a... correct answers lock binary semaphore correct answers integer value can range only between 0 and 1 Pb and Vb are... correct answers simplified P and V operations that manipulate binary semaphores. Pb and Vb on the binary semaphore sb can be implemented directly using the TS instruction... correct answers 1. Vb(sb): sb = 1
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