Operating System Questions & Answers – Threads

This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Threads”.

1. Which one of the following is not shared by threads?
a) program counter
b) stack
c) both program counter and stack
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

2. A process can be ___________
a) single threaded
b) multithreaded
c) both single threaded and multithreaded
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

3. If one thread opens a file with read privileges then ___________
a) other threads in the another process can also read from that file
b) other threads in the same process can also read from that file
c) any other thread can not read from that file
d) all of the mentioned
View Answer

Answer: b
Explanation: None.
advertisement
advertisement

4. The time required to create a new thread in an existing process is ___________
a) greater than the time required to create a new process
b) less than the time required to create a new process
c) equal to the time required to create a new process
d) none of the mentioned
View Answer

Answer: b
Explanation: None.

5. When the event for which a thread is blocked occurs?
a) thread moves to the ready queue
b) thread remains blocked
c) thread completes
d) a new thread is provided
View Answer

Answer: a
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. The jacketing technique is used to ___________
a) convert a blocking system call into non blocking system call
b) create a new thread
c) communicate between threads
d) terminate a thread
View Answer

Answer: a
Explanation: None.

7. Termination of the process terminates ___________
a) first thread of the process
b) first two threads of the process
c) all threads within the process
d) no thread within the process
View Answer

Answer: c
Explanation: None.
advertisement

8. Which one of the following is not a valid state of a thread?
a) running
b) parsing
c) ready
d) blocked
View Answer

Answer: b
Explanation: None.

9. The register context and stacks of a thread are deallocated when the thread?
a) terminates
b) blocks
c) unblocks
d) spawns
View Answer

Answer: a
Explanation: None.
advertisement

10. Thread synchronization is required because ___________
a) all threads of a process share the same address space
b) all threads of a process share the same global variables
c) all threads of a process can share the same files
d) all of the mentioned
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – Operating System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.