NEW
Font size
WorksheetsThreads and Concurrency Quiz LATE (BSIT 204)
Total questions: 40
Worksheet time: 20mins
A thread is also known as a:
Heavyweight process
Lightweight process
Job scheduler
Resource manager
Which attribute uniquely identifies a thread?
Program counter
Thread ID
Base priority
Register
In Windows, which attribute shows the cumulative execution time of a thread?
Thread exit status
Thread execution time
Alert status
Suspension count
Which relationship describes one process with multiple threads?
1:1
M:1
1:M
M:M
In thread states, when a thread waits for an event, it is in:
Running
Ready
Blocked
Finished
Which operation creates a thread when a new process is formed?
Block
Spawn
Finish
Resume
Which thread type is managed completely in user space?
User-level thread
Kernel-level thread
Combined thread
System thread
A major advantage of user-level threads is:
No mode switch overhead
Better crash resilience
Simultaneous scheduling by kernel
Guaranteed priority scheduling
Which OS is an example of using the combined user- and kernel-level approach?
MS-DOS
Solaris
Linux v1
Classic UNIX
Which is NOT an advantage of kernel-level threads?
Multithreading kernel routines
Scheduling on a per-thread basis
No kernel involvement in management
Parallel scheduling on multiprocessors
The ability of an OS to support multiple concurrent execution paths in one process is called:
Multiprogramming
Multithreading
Multiprocessing
Multitasking
In multithreading, communication between threads within a process is:
Slower than interprocess communication
Not possible
Faster and direct
Requires a separate kernel API
Which benefit of multithreading allows applications to remain interactive during long tasks?
Responsiveness
Resource sharing
Economical
Scalability
Which benefit of multithreading becomes more significant in multiprocessor systems?
Responsiveness
Resource sharing
Economical
Scalability
What happens to all threads if a process is swapped out?
Only active threads remain
All threads are swapped out
Only the main thread is swapped
Threads continue independently
Which thread library feature allows saving and restoring execution state?
API
Context switching
Synchronization
Deadlock handling
Which Windows attribute lets a thread run on specific CPUs only?
Base priority
Thread context
Processor affinity
Execution time
Which type of threads save overhead by avoiding kernel mode switches?
User-level threads
Kernel-level threads
Combined approach
Process-level threads
The main drawback of multithreading regarding application stability is:
Low responsiveness
Crash resilience
High memory cost
Complex priority management
Which is an example of a multithreaded application?
Calculator app
Web browser loading images while rendering text
Disk formatting utility
BIOS loader
The management of multiple processes within one CPU is:
Multiprogramming
Multiprocessing
Distributed processing
Multithreading
Which term refers to indivisible execution of instructions?
Critical section
Race condition
Atomic operation
Monitor
Which problem occurs when the outcome depends on execution timing?
Deadlock
Starvation
Race condition
Mutual exclusion
Which OS mechanism allows one process to signal another using an integer value?
Monitor
Semaphore
Mutex lock
Event flag
A binary semaphore differs from a counting semaphore because it:
Uses only 0 and 1 values
Allows multiple processes simultaneously
Stores condition variables
Handles priority scheduling
Which concurrency mechanism requires the locker to be the one unlocking it?
Binary semaphore
Mutex lock
Spinlock
Monitor
Which mechanism makes a process wait until a condition becomes true?
Event flag
Condition variable
Mailbox
Monitor
Which describes permanent blocking of processes competing for resources?
Starvation
Deadlock
Livelock
Concurrency
A deadlock involving two processes competing for a disk file and tape drive involves:
Consumable resources
Reusable resources
Virtual resources
Shared caches
Which is NOT a necessary condition for deadlock?
Mutual exclusion
Hold and wait
Preemption
Circular wait
Which condition means resources cannot be forcibly taken away?
Hold and wait
Mutual exclusion
No preemption
Circular wait
Which tool represents resource allocation visually?
Condition variable
Resource allocation graph
Mutex diagram
Spinlock table
Deadlock prevention strategy involves:
Allowing all conditions but controlling allocation timing
Periodically detecting cycles
Designing system to disallow one of the four conditions
Rolling back blocked processes
Which deadlock avoidance technique denies process start if it risks deadlock?
Resource allocation denial
Process initiation denial
Circular wait denial
Preemption
Which strategy grants requests freely but checks for deadlocks periodically?
Prevention
Avoidance
Detection
Starvation control
Which recovery method involves aborting all deadlocked processes?
Rollback
Termination of all
Resource preemption
Successive abortion
Which deadlock condition is a consequence of the first three?
Hold and wait
Circular wait
No preemption
Mutual exclusion
Which mechanism involves infinite looping until a lock is free?
Mutex
Spinlock
Monitor
Semaphore
Which strategy for handling deadlocks requires knowing maximum resource needs in advance?
Prevention
Avoidance
Detection
Rollback
Which criterion may be used in selecting a process to abort during recovery?
Process with highest output so far
Process with least resources allocated
Process with longest execution time
Process with highest priority
