Question 51
MediumWhat does hyper-threading (simultaneous multithreading) allow?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
What does hyper-threading (simultaneous multithreading) allow?
One physical core to run two hardware threads at once
A thread to run on two computers
The CPU to skip context switches entirely
Two processes to share one PID
Sign up free to see the answer and a step-by-step explanation.
Which of these makes a context switch more expensive?
Using a faster CPU clock
Running only one thread
Having to flush the TLB because the address space changes
Having fewer processes
Sign up free to see the answer and a step-by-step explanation.
In inter-process communication, what is a socket?
An endpoint for communication between processes, possibly on different computers
A hardware slot for the CPU
A file system type
A kind of semaphore
Sign up free to see the answer and a step-by-step explanation.
What is a process control block (PCB) used for?
Storing everything the OS needs to manage a process, such as its state, registers and memory information
Booting the computer
Holding the process's code
Storing user files
Sign up free to see the answer and a step-by-step explanation.
A program is 80% parallelisable. By Amdahl's law, what is the maximum speed-up on 4 cores?
4
3.2
2
2.5
Sign up free to see the answer and a step-by-step explanation.
Which of these are shared by all threads of a process? (Select all that apply.)
The code section
Open files
The stack
The heap
Sign up free to see the answer and a step-by-step explanation.
What does fork() return to the parent process when it succeeds?
0
The PID of the new child
The parent's own PID
1
Sign up free to see the answer and a step-by-step explanation.
Why is switching between two threads of the same process usually faster than switching between two processes?
Threads don't have registers
Threads never use the CPU
The address space doesn't change, so page tables and TLB entries stay valid
Processes cannot be switched at all
Sign up free to see the answer and a step-by-step explanation.
A process has three threads. One of them calls exit(). What happens?
The call fails
The other threads become separate processes
Only that thread terminates
The whole process, with all its threads, terminates
Sign up free to see the answer and a step-by-step explanation.
Which scheduler controls the degree of multiprogramming by deciding which new jobs are admitted to memory?
The short-term scheduler
The long-term (job) scheduler
The disk scheduler
The dispatcher
Sign up free to see the answer and a step-by-step explanation.