Font size
WorksheetsOperating Systems
Total questions: 94
Worksheet time: 47mins
When a device needs the attention of the processor, the device sends a(n) _____ signal to the processor.
calling
halt
interrupt
trap
____ allows the device controller to transfer data to or from the device buffer and main memory, without any intervention from the CPU.
Direct memory access
Random memory access
Non-uniform memory access
Sequential memory access
____ can assist in ensuring that no user application controls the computer system indefinitely.
Device controller
Register
Timer
BIOS
____ stores the location of the next instruction for CPU.
Instruction register
Address register
Program counter
Interrupt vector
Which storage device is usually organized into level 1, level 2, and level 3 ?
device buffers
cache
main memory
registers
The difference between multitasking and multi-programming:
In multitasking system, the CPU doesn't work on the next process unless the current one is terminated.
In multi-programming system, the CPU doesn't work on the next process unless the current one is terminated.
In multitasking system, the CPU works on a process for a specific interval and then moves to another process.
In multi-programming system, the CPU works on a process for a specific interval and then moves to another process.
The core part of the operating system that is running at all time on a computer is called ___.
trap
bootstrap
kernel
register
Which of the following statements is considered false?
Privilege instructions cannot be attempted in user mode.
Interrupts are handled in kernel mode.
Dual mode (user mode and kernel mode) can prevent a user application from wiping out the operating system.
Control is given to a user application when the system is in user mode.
The main challenges in cache management are:
reliability and volatility
speed and power consumption
compatibility and flexibility
cache size and replacement policy
Operating systems for ____ need to minimize power consumption.
desktop computer
mobile computer
embedded computers
mainframe
Which of the following is NOT one of the mechanism for inter-process communication?
message passing
all of these
registry
shared memory
The major difficulty in designing a layered operating system approach is ____.
making sure each layer is easily converted to modules
appropriately defining the various layers
debugging a particular layer
making sure that each layer hides certain data structures, hardware, and operations from higher-level layers
The ____ combines the object files to form an executable file.
compiler
linker
loader
debugger
In some systems where there are multiple command line interpreters, the interpreters are referred to as ____.
script
GUI
batch
shells
_____ provide(s) an interface to the services provided by an operating system.
Shared memory
Simulators
System calls
Communication
Instead of doing system calls directly, application developers use a(n) ____ which will invoke the appropriate system call.
Application programming interface
Application binary interface
Graphical interface
Command-line interface
Program counter _____
counts the number of instructions that the CPU has completed.
holds the location of next instruction for CPU.
counts the number of instructions for a program.
holds the current instruction the CPU is executing.
Which of the following statements is considered TRUE?
Interrupts are handled in user mode.
User applications are executed in kernel mode only.
Privilege instructions are executed in user mode.
Some privilege instructions may cause harm
Microkernels mainly use _____ for communication.
synchronization
message passing
virtualization
shared memory
Which operating system structure have no structure at all?
Micro-kernel
Monolithic
Layered
Loadable modules
Which of the following storage device is non-volatile?
main memory
solid state drive
registers
cache
A message-passing model is ____.
a network protocol, and does not apply to operating systems
the receiver process receives the message faster than in the shared memory model
only used for small simple operating systems
easier to implement than a shared memory model for inter-process communication
Which of the following will have one machine in hot-standby mode?
Asymmetric multiprocessing
Asymmetric clustering
Symmetric clustering
Symmetric multiprocessing
In a ___ computer, there are two or more processors on a single silicon chip.
distributed
multitasking
multiprocessor
multicore
Which of the following is different from others?
system mode
user mode
privileged mode
supervisor mode
The primary focus of a(n) ___ operating systems is resource utilization.
mobile computer
embedded computers
desktop computer
mainframe
The device controller sends a(n) ____ to inform the CPU about the status of the device.
calling
interrupt
trap
halt
The main challenges in cache management are:
reliability and volatility
compatibility and flexibility
speed and power consumption
cache size and replacement policy
In some systems where there are multiple command line interpreters, the interpreters are referred to as ____.
GUI
shells
script
batch
The core part of the operating system that is running at all time on a computer is called ___.
kernel
bootstrap
trap
register
_____ provide(s) an interface to the services provided by an operating system.
Communication
Simulators
Shared memory
System calls
The size of ___ of a process will change during the execution.
program counter
process ID number
data section
stack section
Which of the following transition of process states is not possible?
from ready to waiting
from ready to running
from running to ready
from waiting to ready
With indirect communication, the messages are sent to and received from ______.
sockets
hard drive
mailboxes or ports
portal
Process will exist as a(n) ____ process briefly when the parent has not yet called wait() when it terminates.
zombie
plant
widow
orphan
The collection of processes waiting for the service from a particular device is called ____.
job queue
device queue
ready queue
standby queue
Which of the following statements is false?
Data get delivered faster in shared memory than in message passing
Shared memory is more complicated to implement than message passing
Message passing is most useful for exchanging the small amount of data
Message passing doesn't require the intervention of the kernel
In Unix system, the ___ process, which considered as the root of all processes, is assigned as the parent to orphan processes.
parent
init or systemd
daemon
root
Which of the following is not part of Process control block?
global variables
program counter
process state
process priority
The ____ chooses which process that should be executed next by the CPU core.
CPU interrupt
CPU scheduler
CPU controller
CPU timer
When using the Shared Memory with ____, the consumer may have to wait for new items, but the producer can always produce new items.
indirect communication
unbounded buffer
bounded buffer
direct communication
In Unix system, the ___ process, which considered as the root of all processes, is assigned as the parent to orphan processes.
init or systemd
parent
daemon
root
One of the major issues with shared memory is that the processes are responsible for ___, which means ensuring the processes are not updating the same memory location simultaneously.
coordination
synchronization
resonation
security
Cancellation points are associated with ____ cancellation.
deferred
asymmetric
asynchronous
synchronous
When using the Shared Memory with ____, the consumer may have to wait for new items and the producer must wait if all buffers are full .
unbounded buffer
indirect communication
bounded buffer
direct communication
A ____ provides an API for creating and managing threads.
multithreading model
thread library
set of system calls
multicore system
The ____ chooses which process that should be executed next by the CPU core.
CPU interrupt
CPU scheduler
CPU timer
CPU controller
_____ is not considered a challenge when designing applications for multicore systems.
Deciding which activities can be run in parallel
Determining if data can be separated so that it is accessed on separate cores
Ensuring there is a sufficient number of cores
Identifying data dependencies between tasks.
_________ involves distributing tasks across multiple computing cores.
Concurrency
Synchronization
Task parallelism
Data parallelism
Which of the following is false?
Access to shared memory requires a system call.
Each message communicated between two processes requires at least two system call.
In shared memory, synchronization is handled by the processes.
With message passing, there can be many communication links between two processes.
Which of the following is FALSE about threads?
Communication among threads of the same process is done via message passing.
Switching controls among threads can be faster than switching among processes.
Creating threads incurs a lower overhead because no new memory space needs to be allocated.
For applications that perform concurrent tasks, use of threads can make such applications more responsive.
The size of ___ of a process will change during the execution.
heap section
text section
data section
program counter
Most operating systems now use the ____.
many-to-one model
one-to many-model
many-to-many model
one-to-one model
Which of the following will NOT be shared by all threads of the same process?
code
files
data
registers
Process will become a(n) ____ process when its parent terminates without invoking wait().
widow
zombie
plant
orphan
___ is the number of processes that are completed per time unit.
Turnaround time
Response time
Throughput
CPU utilization
Which of the following is true about non-preemptive scheduling?
A process changes from the running state to the ready state due to an interrupt.
A timer is required.
It will result in smaller average turnaround time.
A process keeps working on the CPU until it doesn't need the CPU because of I/O or termination.
Which of the following scheduling algorithms is preemptive?
shortest-remaining-time-first
first-come-first-serve
shortest-job-first
non-preemptive priority
The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU.
starvation
aging
convoy effect
degeneration
Which scheduling algorithm will give the most optimal average waiting time?
Shortest-job-first
Shortest-remaining-time-first
Priority Scheduling
First-come-first serve
It's very difficult to implement shortest-job-first or shortest-remaining-time-first because
this is a false statement.
there's no way to know how many process will arrive.
there's no way to know the next burst time needed for a process.
there's no way to know the next arrival time of a process.
When an available CPU voluntarily takes tasks from a busy CPU, it called ___.
pull migration
push migration
emigration
immigration
Operating systems try to keep a thread running on the same processor and take advantage of a warm cache. This is called _____.
processor set
processor affinity
load balancing
direct memory access
A system with CPUs that have different clock speed or processing power is called ___.
homogeneous multiprocessing
asymmetric multiprocessing
asynchronous multiprocessing
heterogeneous multiprocessing
The major issue of implementing priority scheduling in actual system is __.
unbalanced distribution of priority
degrading to first-come-first-serve when inappropriate priority numbers are used.
the indefinite waiting for CPU (starvation) of the low priority processes.
large average waiting time due to long high priority processes
Which of the following scheduling algorithms does NOT have a non-preemptive version?
round-robin
first-come-first-serve
shortest-job-first
priority scheduling
Which of the following already includes aging in the algorithm?
multilevel feedback queue
priority scheduling
round-robin
multilevel queue
The major challenge in implementing round-robin algorithm in the actual system is ___.
the size of ready queue
determining the order of the processes
knowing the burst times when the processes arrive
determine the size of the time quantum
When the time quantum is very large, round-robin algorithm may turn into ___.
Shortest-remaining-time-first
Priority scheduling
Shortest-job-first
First-come-first-serve
Which of the following already includes aging in the algorithm?
round-robin
multilevel feedback queue
multilevel queue
priority scheduling
An instruction that executes atomically ____.
must consist of only one machine instruction
cannot be used to solve the critical section problem
executes as a single, uninterruptible unit
none of these
To implement the Shortest-Job-First or the Shortest-Remaining-Time-First, we would need to know _____, which is almost impossible.
the burst time needed for a process before it is executed.
the priority of a process before it is executed
the number of processes in the queue
the arrival time of a process before it is executed.
The major challenge in implementing round-robin algorithm in the actual system is ___.
determine the size of the time quantum
the size of ready queue
knowing the burst times when the processes arrive
determining the order of the processes
Which of the following scheduling algorithms is preemptive?
shortest-remaining-time-first
first-come-first-serve
shortest-job-first
non-preemptive priority
A solution to critical section problem needs to satisfy the following, except ___.
mutual exclusion
progress
bounded waiting
spin lock
Which of the following is true about preemptive scheduling?
It will result in larger average turnaround time.
A process keeps working on the CPU until it doesn't need the CPU because of I/O or termination.
A process may change from the running state to the ready state due to an interrupt.
It won't result in race condition
The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU.
starvation
degeneration
aging
convoy effect
A(n) _______ refers to where a process is accessing/updating shared data.
critical section
entry section
mutex
test-and-set
Which scheduling algorithm will give the most optimal average waiting time?
Shortest-job-first
First-come-first serve
Priority Scheduling
Shortest-remaining-time-first
Which of the following scheduling algorithms does NOT have a preemptive version?
shortest-remaining-time-first
round-robin
first-come-first-serve
priority scheduling
Operating systems try to keep a thread running on the same processor and take advantage of a warm cache. This is called _____.
direct memory access
processor set
processor affinity
load balancing
When an available CPU voluntarily takes tasks from a busy CPU, it called ___.
pull migration
emigration
immigration
push migration
When multiple processes access and updates the shared data item concurrently, the final value of the shared data item depends on the order of access by the processes. This is referred to as ____.
starvation
deadlock
race condition
contention
Computer architectures provide _____, which instructions that can force any changes in memory to be propagated to all other processors, thereby ensuring that memory modifications are visible to threads running on other processors.
memory barrier
memory segmentation
memory stall
memory miss
In a system with ____ kernel, race conditions won't occur since the kernel-mode process will run until it exits kernel mode.
non-preemptive
asymmetric
asynchronous
preemptive
When is spinlock (busy waiting) more preferable?
when there is only one CPU
when the lock is to be held for short duration (short critical section)
when the critical section requires a long time
it's never a preferred approach
A mutex lock ____.
is not guaranteed to be atomic
is exactly like a counting semaphore
can be used to eliminate busy waiting
is essentially a boolean variable
When no process is in its critical section and there are some processes waiting to enter critical section, selecting which process to enter critical section next should take place as soon as possible. This is called ____.
memory model
progress
race condition
mutual exclusion
Which of the following is NOT one of the hardware instructions that provide support for solving the critical-section problem?
memory barriers
hardware instructions
semaphores
atomic variables
When using semaphores, a process invokes the wait() operation before accessing its critical section, followed by the signal() operation upon completion of its critical section. Consider reversing the order of these two operations—first calling signal(), then calling wait(). What would be a possible outcome of this?
Deadlock is possible.
Mutual exclusion is still assured.
Starvation is possible.
Several processes could be active in their critical sections at the same time.
A counting semaphore ____.
can be modified simultaneously by multiple threads
cannot be used to control access to a thread's critical sections
is essentially an integer variable
is accessed through only one standard operation
____________ occurs when a higher-priority process needs to access a data structure that is currently being accessed by a lower-priority process.
A critical section
A race condition
Deadlock
Priority inversion
What would happen if the exit section of a process does not include codes that allow other processes to enter their critical section?
Convoy effect will occur.
Inconsistent data because of race condition.
Nothing goes wrong
Other process would suffer from starvation.
The segment of code in which a process tries to obtain the permission to enter critical section is referred to as _____.
exit section
critical section
remainder section
entry section
