0% found this document useful (0 votes)
6 views6 pages

OS Unit3 Practice MCQ

The document is a quiz worksheet created by Mr. Pushpendra Pateriya, consisting of 20 questions related to threads, synchronization, and concurrency in computing. It includes multiple-choice questions covering topics such as thread behavior, critical sections, and semaphore usage. An answer key is provided at the end of the document for reference.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

OS Unit3 Practice MCQ

The document is a quiz worksheet created by Mr. Pushpendra Pateriya, consisting of 20 questions related to threads, synchronization, and concurrency in computing. It includes multiple-choice questions covering topics such as thread behavior, critical sections, and semaphore usage. An answer key is provided at the end of the document for reference.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
QUIZIZZ worksheets os.unit3 ‘otal questions: 20 Worksheet time: 31mmins Instructor name: Mr. Pushpendra Pateriya 1. fone thread opens a file with read privileges then a) any other thread can not read from that file ©) other threads in the another process can also read from that file Name Class Date b) all of the mentioned d) other threads in the same process can also read from that file 2. The register context and stacks of a thread are deallocated when the thread? a) spawns ©) blocks 3, Thread synchronization is required because a) all threads of a process share the same address space Q) all threads of a process can share the same files 4. Athread is also called 1a) Light Weight Process(LWP) ©) Heavy Weight Process(HWP) 5. Multithreading on a multi - CPU machine a) doesn't affect the concurrency ©) decreases concurrency b) unblocks 4d) terminates b) all threads of a process share the same global variables d) all of the mentioned b) Process d) None of the mentioned b) increases concurrency d) can increase or decrease the concurrency 10. " Ifthe kernel is single threaded, then any user level thread performing a blocking system call will ee eee a) none of the mentioned b) cause the entire process to run along with the other threads ©) cause the entire process to block even ifthe _ d) cause the thread to block with the other other threads are available to run threads running Which of the following is FALSE? a) User level threads do not need any hardware b) Related kernel level threads can be support scheduled on different processors in a multiprocessor system ©) Blocking one kernel level thread blocks alld) Context switch time is longer for kernel level other related threads threads than for user level threads ‘The model in which one kernel thread is mapped to many user-level threads is called a) Many to One model b) Many to Many model ©) One to Many made! d) One to One model In the Many to One model, if a thread makes a blocking system call a) the entire process will be blocked b) none of the mentioned ©) the entire process will run d) a part of the process will stay blocked, with the rest running Concurrent access to shared data may result in a) none of the mentioned b) data insecurity ©) data consistency d) data inconsistency situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called a) starvation b) race condition ©) aging 4d) data consistency 12, 13, 14, 15, 16. 17 ‘The segment of code in which the process may change common variables, update tables, write into files is known as a) critical section b) non ~ critical section 9) synchronizing d) program Mutual exclusion implies that a) none of the mentioned b) if a process is executing in its critical section, then other processes must be executing in their critical sections ©) ifa process is executing in its critical section, ) if @ process is executing in its critical section, then all the resources of the system must be _then no other process must be executing in blocked until it finishes execution their critical sections ‘Aminimum of ___variable(s) is/are required to be shared between processes to solve the critical section problem ay b) 2 04 a3 The bounded buffer problem is also known as a) None of the mentioned b) Producer - Consumer problem ©) Readers - Writers problem d) Dining - Philosophers problem To ensure difficulties do not arise in the readers - writers problem are given exclusive access to the shared object.a) b) c) d) a) writers b) none of the mentioned ©) readers and writers d) readers The dining - philosophers problem will occur in case of a) 5 philosophers and 5 chopsticks b) 6 philosophers and 5 chopsticks ©) 3 philosophers and 5 chopsticks d) 4 philosophers and 5 chopsticks 18. 19. 20, II processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward. Suppose a process executes in the following manner. signal(mutex); critical section wait(mutex); In this situation a) a deadlock will occur ©) several processes maybe executing in their critical section A monitor is a type of, a) low level synchronization construct ©) semaphore What are the two kinds of semaphores? a) decimal & binary ©) mutex & counting b) d b) d b) d all of the mentioned processes will starve to enter critical section none of the mentioned high level synchronization construct counting & decimal binary & counting Answer Keys dl d) other threads in the same process can also read from that file 4, a) Light Weight Process(LWP) 7. ©) Blocking one kernel level 10, 13, 16. 19, thread blocks all other related threads d) data inconsistency 0) ifa process is executing in its critical section, then no other process must be executing in their critical sections a) writers d) high level synchronization construct 2. d) terminates 5, b) increases concurrency 8, a) Many to One model 11. b) race condition 14. b)2 17. a)5 philosophers and 5 chopsticks 20. d) binary & counting 3. d)all of the mentioned 6. c) cause the entire process to block even if the other threads are available to run 9. a) the entire process will be blocked 12. a) critical section 15. b) Producer - Consumer problem 18. ©) several processes maybe executing in their critical section

You might also like