Operating Systems (COS3721) Exam
Questions And Answers 100% Verified And
Updated.
_____ is not considered a challenge when designing applications for multicore systems.
A) Deciding which activities can be run in parallel
B) Ensuring there is a sufficient number of cores
C) Determining if data can be separated so that it is accessed on separate cores
D) Identifying data dependencies between tasks. - Answer✔B) Ensuring there is a sufficient
number of cores
A ____ provides an API for creating and managing threads.
A) set of system calls
B) multicore system
C) thread library
D) multithreading model - Answer✔C) thread library
The _____ model multiplexes many user-level threads to a smaller or equal number of kernel
threads.
A) many-to-many
B) two-level
C) one-to-one
D) many-to-one - Answer✔A) many-to-many
The _____ model maps many user-level threads to one kernel thread.
A) many-to-many
B) two-level
C) one-to-one
1|Page
, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.
D) many-to-one - Answer✔D) many-to-one
The _____ model maps each user-level thread to one kernel thread.
A) many-to-many
B) two-level
C) one-to-one
D) many-to-one - Answer✔C) one-to-one
The _____ model allows a user-level thread to be bound to one kernel thread. A) many-to-many
B) two-level
C) one-to-one
D) many-to-one - Answer✔B) two-level
The most common technique for writing multithreaded Java programs is _____.
A) extending the Thread class and overriding the run() method
B) implementing the Runnable interface and defining its run() method
C) designing your own Thread class
D) using the CreateThread() function - Answer✔B) implementing the Runnable interface and
defining its run() method
In Pthreads, a parent uses the pthread_join() function to wait for its child thread to complete.
What is the equivalent function in Win32?
A) win32_join()
B) wait()
C) WaitForSingleObject()
D) join() - Answer✔C) WaitForSingleObject()
Which of the following statements regarding threads is false?
A) Sharing is automatically provided in Java threads.
B) Both Pthreads and Win32 threads share global data.
C) The start() method actually creates a thread in the Java virtual machine.
D) The Java method join() provides similar functionality as the WaitForSingleObject in Win32. -
Answer✔A) Sharing is automatically provided in Java threads.
A _____ uses an existing thread — rather than creating a new one — to complete a task.
A) lightweight process
2|Page
, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.
B) thread pool
C) scheduler activation
D) asynchronous procedure call - Answer✔B) thread pool
According to Amdahl's Law, what is the speedup gain for an application that is 60% parallel and
we run it on a machine with 4 processing cores?
A) 1.82
B) .7
C) .55
D) 1.43 - Answer✔D (?) according to memo A according to calculations + telegram
_________ involves distributing tasks across multiple computing cores.
A) Concurrency
B) Task parallelism
C) Data parallelism
D) Parallelism - Answer✔B) Task parallelism
___________ is a formula that identifies potential performance gains from adding additional
computing cores to an application that has a parallel and serial component.
A) Task parallelism
B) Data parallelism
C) Data splitting
D) Amdahl's Law - Answer✔D) Amdahl's Law
When OpenMP encounters the #pragma omp parallel directive, it
A) constructs a parallel region
B) creates a new thread
C) creates as many threads as there are processing cores
D) parallelizes for loops - Answer✔C) creates as many threads as there are processing cores
Grand Central Dispatch handles blocks by
A) placing them on a dispatch queue
B) creating a new thread
C) placing them on a dispatch stack
D) constructing a parallel region - Answer✔A) placing them on a dispatch queue
3|Page
, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.
A traditional (or heavyweight) process has a single thread of control. - Answer✔True
A thread is composed of a thread ID, program counter, register set, and heap - Answer✔False
Virtually all contemporary operating systems support kernel threads - Answer✔True
Linux distinguishes between processes and threads - Answer✔False
In Java, data shared between threads is simply declared globally - Answer✔False
Each thread has its own register set and stack - Answer✔True
Deferred cancellation is preferred over asynchronous cancellation. - Answer✔True
The single benefit of a thread pool is to control the number of threads. - Answer✔False
It is possible to create a thread library without any kernel-level support - Answer✔True
It is possible to have concurrency without parallelism - Answer✔True
Amdahl's Law describes performance gains for applications with both a serial and parallel
component - Answer✔True
OpenMP only works for C, C++, and Fortran programs. - Answer✔True
Grand Central Dispatch requires multiple threads - Answer✔False
The trend in developing parallel applications is to use implicit threading - Answer✔True
Task parallelism distributes threads and data across multiple computing cores - Answer✔False
Which of the following is true of cooperative scheduling?
A) It requires a timer.
B) A process keeps the CPU until it releases the CPU either by terminating or by switching to the
waiting state.
C) It incurs a cost associated with access to shared data.
D) A process switches from the running state to the ready state when an interrupt occurs. -
Answer✔B) A process keeps the CPU until it releases the CPU either by terminating or by
switching to the waiting state.
2. ____ is the number of processes that are completed per time unit.
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput - Answer✔D) Throughput
4|Page