Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Operating System
»
Threads in Operating System
Operating System
unfold_more
double_arrow
Deadlock in Operating System
double_arrow
Inter-Process Communication
double_arrow
Process
double_arrow
Process Schedulers
double_arrow
Synchronization in Operating System
double_arrow
Threads in Operating System
quiz
Threads in Operating System
1.
What is a thread in the context of an operating system?
A)
An independent program
B)
A unit of execution within a process
C)
A type of system call
D)
A hardware component
Answer
keyboard_arrow_down
keyboard_arrow_up
B) A unit of execution within a process
Explanation
2.
How many threads are active at once in a system with multiple CPU cores?
A)
One thread per process
B)
Two threads per CPU core
C)
Multiple threads, potentially equal to the number of CPU cores
D)
Unlimited threads, depending on system resources
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Multiple threads, potentially equal to the number of CPU cores
Explanation
3.
What resources does a kernel thread own?
A)
Memory and file resources
B)
Thread-local storage and virtual memory
C)
Stack, registers, and thread-local storage
D)
CPU cache and TLB
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Stack, registers, and thread-local storage
Explanation
4.
Which of the following is an example of one process with multiple threads?
A)
A simple calculator program written in C
B)
A web server program written in Java using Java Servlets
C)
A file compression utility written in C++
D)
A graphical user interface (GUI) application written in JavaScript using Node.js
Answer
keyboard_arrow_down
keyboard_arrow_up
B) A web server program written in Java using Java Servlets
Explanation
5.
Which of the following is not a characteristic of threads?
A)
Lightweight
B)
Independent address space
C)
Share resources with other threads
D)
Can be scheduled independently
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Independent address space
Explanation
6.
Which threading model allows for a combination of user-level and kernel-level threads?
A)
User-level threading model
B)
Kernel-level threading model
C)
Hybrid threading model
D)
Multiprocessor threading model
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Hybrid threading model
Explanation
7.
When a thread is waiting for a lock to be released by another thread, which state is it typically in?
A)
Running
B)
Terminated
C)
Blocked
D)
Sleeping
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Blocked
Explanation
Quick Links
Biology
chevron_right
Plants
chevron_right
Genetics
chevron_right
Cell Biology
chevron_right
Essential Nutrients
Physics
chevron_right
Dynamics
chevron_right
Geometrical Optics
chevron_right
Waves and Optics
chevron_right
Electricity and Magnetism
Astronomy
chevron_right
The Universe
chevron_right
Galaxies
chevron_right
Stars
chevron_right
Space Exploration
Current Affairs & Events
chevron_right
Latest Current Events
chevron_right
Daily Current Affairs