Process and Thread
Process and Thread
Câu hỏi 1
Đúng
The correct answer is: less than the time required to create a new process.
Câu hỏi 2
Đúng
Câu hỏi 3
Đúng
a. Related kernel level threads can be scheduled on different processors in a multiprocessor system
b. Context switch time is longer for kernel level threads than for user level threads.
d. Blocking one kernel level thread blocks all other related threads
The correct answer is: Blocking one kernel level thread blocks all other related threads
Câu hỏi 4
Đúng
int main(){
if(pid = = 0){
printf(“Hello Child\n”);
done = 1;
exit(0);
else if(pid>0) {
while(done == 0);
exit(1);
b. Parent executes first, children will run when parent completes its task.
d. Children execute first, parent waits and resumes when children completes its task.
The correct answer is: new - ready - running - waiting - ready - running – terminated
Câu hỏi 6
Đúng
If the kernel is single threaded, then any user level thread performing a blocking system call will ___________
a. cause the entire process to block even if the other threads are available to run.
c. cause the entire process to run along with the other threads.
The correct answer is: cause the entire process to block even if the other threads are available to run.
Câu hỏi 7
Đúng
a. Stack
b. Data
c. Code
d. Bootstrap program
Câu hỏi 8
Đúng
Câu hỏi 9
Đúng
a. A Block in memory
c. Data Structure
Câu hỏi 10
Đúng
a. process execution completes an instruction and load the new instruction to execute next.
b. the system must save the state of the old process and load the saved state for the new process.