Midterm Questions Flashcards
The ___ of a process contains temporary data such as function parameters, return addresses, and local variables
Stack
Which of the following component of program state are shared are shared across threads in a multi-threaded process?
register variables, local variables, global variables, stack memory
global variables
The list of a process waiting for an I/O device
device queue
When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?
The child process runs concurrently with parent
The child process has a new program loaded into it
The child is a duplicate of the parent
All of the above
All of the above
When a process creates a new process using the fork() operation, what state is shared between parent process and child process?
shared memory segments
What is most often used by operating systems to handle deadlock?
pretend that deadlocks never occur (ostrich approach)
The number of processes that are completed per time unit
Throughput
___ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of the previous CPU burst
SJF
Presents a set of programmer-defined operations that are provided mutual exclusion within it
monitor
The ___ multi-threading model multiplexes many user-level threads to a smaller or equal number of kernel threads
many-to-many model
Which of the following would be an acceptable signal handling scheme for a multi-threaded program?
Deliver the signal to the thread to which the signal applies
Deliver the signal to every thread in the process
Deliver the signal to only certain threads in the process
All of the above
All of the above
Which of the following is not a necessary condition for deadlock?
Circular Wait
Starvation
Mutual Exclusion
Hold and wait
Starvation
In a system where round robin is used for CPU scheduling, what happens when a process can’t finish its computation during its current time quantum?
The process state is changed from running to ready
A process control block ___
includes information on a process’s state
Which of the following is true?
A safe state is a deadlocked state
A safe state may lead to a deadlocked state
An unsafe state is always a deadlocked state
An unsafe state may lead to a deadlocked state
An unsafe state may lead to a deadlocked state