Podcast
Questions and Answers
Which action does the OS perform when it dispatches a thread?
Which action does the OS perform when it dispatches a thread?
- The OS executes a file I/O request.
- The OS triggers a software interrupt to regain CPU control.
- The OS terminates the thread or its parent process normally.
- The OS loads the instruction pointer with an instruction address that belongs to the dispatched thread. (correct)
During the next fetch and execution cycle, what resources does the thread take control of?
During the next fetch and execution cycle, what resources does the thread take control of?
- General-purpose registers only
- CPU only
- CPU and its related resources, such as general-purpose registers. (correct)
- Memory only
What events can cause a thread to lose control of the CPU?
What events can cause a thread to lose control of the CPU?
- The OS executes a file I/O request.
- The thread triggers a software interrupt.
- The thread or its parent process terminates normally.
- An interrupt occurs. (correct)
How does the OS regain CPU control after a thread terminates?
How does the OS regain CPU control after a thread terminates?
What can cause a hardware-generated interrupt?
What can cause a hardware-generated interrupt?
True or false: When a thread is dispatched, it takes control of a CPU and its related resources, such as general-purpose registers?
True or false: When a thread is dispatched, it takes control of a CPU and its related resources, such as general-purpose registers?
True or false: The OS regains CPU control by executing an exit service call, which triggers a software interrupt?
True or false: The OS regains CPU control by executing an exit service call, which triggers a software interrupt?
True or false: An interrupt can occur when a process or thread terminates itself?
True or false: An interrupt can occur when a process or thread terminates itself?
True or false: The most common method for the OS to regain CPU control is by loading the instruction pointer with an instruction address that belongs to the dispatched thread?
True or false: The most common method for the OS to regain CPU control is by loading the instruction pointer with an instruction address that belongs to the dispatched thread?
True or false: The act of giving control of a CPU to a ready thread is called interrupting?
True or false: The act of giving control of a CPU to a ready thread is called interrupting?