A Learning Platform

SUCCESS

Success = Discipline + Consistency + Sacrifice.
Discipline - in what you do.
Consistency - in what you do.
Sacrifice - for what you do.

                   -- Manjunatha C. P. --

OPERATING SYSTEM MCQ SET 4

1. A thread is best described as:
A) A heavy-weight process
B) A program in execution
C) A lightweight process
D) A batch job

C) A lightweight process

2. Which of the following components is shared among threads of the same process?
A) Program counter
B) Stack
C) Registers
D) Address space

D) Address space

3. Which of the following is NOT a benefit of multithreading?
A) Improved responsiveness
B) Resource sharing
C) Increased CPU idle time
D) Better utilization of multiprocessors

C) Increased CPU idle time

4. Which threading model maps many user threads to one kernel thread?
A) One-to-one
B) Many-to-many
C) Many-to-one
D) Two-level

C) Many-to-one

5. Which threading model provides true parallelism on multiprocessor systems?
A) Many-to-one
B) One-to-one
C) Single-threaded
D) Batch threading

B) One-to-one

6. In which threading model can user threads be multiplexed onto kernel threads?
A) One-to-one
B) Many-to-one
C) Many-to-many
D) Single-threaded

C) Many-to-many

7. Which of the following is an example of a user-level thread library?
A) Windows Threads
B) POSIX Threads
C) Java Threads
D) Linux Kernel Threads

C) Java Threads

8. Kernel-level threads are:
A) Managed entirely by user programs
B) Invisible to the operating system
C) Managed directly by the OS
D) Faster to create than user threads

C) Managed directly by the OS

9. Which of the following problems can occur due to concurrent access?
A) Deadlock
B) Race condition
C) Starvation
D) All of the above

D) All of the above

10. A race condition occurs when:
A) Two processes run at the same speed
B) Multiple threads access shared data without synchronization
C) CPU scheduling fails
D) I/O device becomes slow

B) Multiple threads access shared data without synchronization

11. Which of the following ensures mutual exclusion?
A) Semaphore
B) Mutex
C) Spinlock
D) All of the above

D) All of the above

12. Which of the following is NOT a property of threads?
A) Each thread has its own stack
B) Threads share code section
C) Threads share address space
D) Threads have independent files

D) Threads have independent files

13. Which problem arises when threads wait indefinitely for resources?
A) Starvation
B) Deadlock
C) Livelock
D) Busy waiting

B) Deadlock

14. Which multithreading issue occurs when threads repeatedly change state but make no progress?
A) Starvation
B) Deadlock
C) Livelock
D) Context switching

C) Livelock

15. Which of the following is true about user-level threads?
A) Blocked threads do not affect others
B) Kernel is unaware of threads
C) Slower context switching
D) True parallelism is achieved

B) Kernel is unaware of threads

16. Which of the following is a disadvantage of many-to-one threading model?
A) Low overhead
B) Blocking system calls block all threads
C) Easy implementation
D) No kernel involvement

B) Blocking system calls block all threads

17. Which of the following statements about kernel threads is correct?
A) Faster to create than user threads
B) Do not allow concurrency
C) Can run in parallel on multiprocessors
D) Not supported by OS

C) Can run in parallel on multiprocessors

18. Which of the following resources is NOT shared among threads?
A) Heap
B) Code
C) Stack
D) Global variables

C) Stack

19. Which OS provides POSIX thread (pthread) support?
A) Windows
B) UNIX/Linux
C) MS-DOS
D) Embedded RTOS only

B) UNIX/Linux

20. Which of the following improves CPU utilization in multithreaded systems?
A) Blocking I/O
B) Context switching
C) Concurrency
D) Spooling

C) Concurrency

21. Which of the following problems occurs when a low-priority thread holds a resource needed by a high-priority thread?
A) Starvation
B) Deadlock
C) Priority inversion
D) Livelock

C) Priority inversion

22. Which mechanism helps solve priority inversion?
A) Aging
B) Priority inheritance
C) Round Robin
D) Deadlock prevention

B) Priority inheritance

23. Which of the following is an advantage of kernel-level threads?
A) Faster context switch
B) No kernel involvement
C) Better concurrency on multiprocessors
D) Simpler design

C) Better concurrency on multiprocessors

24. Which of the following is NOT a multithreading model?
A) One-to-one
B) Many-to-one
C) Many-to-many
D) One-to-many

D) One-to-many

25. Which of the following best describes concurrency?
A) Multiple CPUs executing simultaneously
B) Multiple tasks making progress over time
C) Sequential execution
D) Batch execution

B) Multiple tasks making progress over time