Font size
WorksheetsMCQ - Operating Systems & Architecture
Total questions: 83
Worksheet time: 42mins
For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. How many page faults does the LRU page replacement algorithm produce (including page faults when the frames were free)?
11
10
13
12
For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. How many page faults does the Optimal page replacement algorithm produce (including page faults when the frames were free)?
11
9
8
10
For 3 page frames, the following is the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. How many page faults does the FIFO page replacement algorithm produce (including page faults when the frames were free)?
14
13
16
15
What is not a main structural element of a computer system?
I/O modules
Main memory
Operating system
Processor
Which of the following element of a computer system stores data and programs?
I/O modules
Processor
Main memory
System bus
Which of the following provides for communication among elements of a computer system?
Main memory
System bus
AC
Processor
Which of the following element of a computer system moves data between the computer and its external environment?
Main memory
Registers
System bus
I/O modules
The processor contains a single data register, called
MAR
IR
PC
AC
This register specifies a particular input/output device
MAR
I/OAR
I/OBR
PC
This register is used for the exchange of data between an I/O module and the processor
AC
I/OAR
I/OBR
IR
This register contains the data to be written into memory or which receives the data read from memory
Memory buffer register
Instruction register
Memory address register
Accumulator
This register specifies the location in memory for the next read or write
Accumulator
Memory address register
Memory buffer register
Instruction register
Which register contains the address of the next instruction to be fetched?
Instruction register
Program counter
Accumulator
MAR
Which register contains the instruction most recently fetched?
Instruction register
AC
MBR
Program counter
Index register, segment register, and stack register are examples of
Data registers
Control registers
Flag registers
Status registers
Which of the following registers are used by the processor to exchange data with memory?
AC and IR
PC and IR
MAR and MBR
MBR and IR
Which of the following registers are used by the processor to exchange data with Input/output module?
I/OAR and I/OBR
IR and MAR
MAR and MBR
PC and AC
Which of the following element of a computer system controls the operation of the computer and performs its data processing functions?
System bus
Main memory
Processor
I/O modules
For 4 page frames, the reference string: 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6. How many page faults does the LRU algorithm produce?
10
12
11
8
For 4 page frames, the reference string: 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6. How many page faults does the FIFO algorithm produce?
12
10
13
14
For 4 page frames, the reference string: 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6. How many page faults does the Optimal algorithm produce?
7
10
9
8
The fetched instruction is loaded into
MAR
PC
AC
IR
At the beginning of each instruction cycle, the processor fetches an instruction from memory. The address is held in
PC
MAR
MBR
IR
At the beginning of each instruction cycle, the processor fetches an instruction from memory. The address is held in
PC
MAR
MBR
IR
The processor is executing 'Load AC from memory'. Choose correct micro-instructions:
PC→MAR, M→MBR, MBR→IR, IR→MAR, M→MBR, MBR→AC
MAR→PC, M→IR
PC→MBR, M→IR, MBR→AC
MBR→IR, M→AC
Process is
a compiler
a program in execution
a thread
an OS
A task in a blocked state
is executing
is in ready state
is waiting for some temporarily unavailable resources
is terminated
System that allows only one process execution at a time is called
Multiprogramming
Real-time systems
Multitasking
Uniprogramming systems
Which of the following is not a process state?
Ready
Blocked
Old
Running
Suppose process is in Blocked state waiting for I/O. When completed, it goes to
Ready state
Terminated
New
Running
Which of the following state transitions is not possible?
Waiting to ready
Ready to running
Blocked to running
Running to waiting
If process executes in its critical section, no others must. This is
Race condition
Starvation
Deadlock
Mutual exclusion
Process is
A unit with instruction sequence, state, and resources
Only a function
Only a thread
Only a class
Interprocess communication
Disables context switching
Blocks memory
Slows processing
Allows processes to synchronize activity
A program is
a single instruction
a compiler
a sequence of instructions
a data packet
Each process in OS has its own
address space
all of the above
code
open files
For each process OS creates and manages
Stack
Queue
Semaphore
Process control block
Listing the sequence of instructions that are executed is called
Debugging
Trace
Tracking
Logging
A process can be terminated due to
Error
Parent request
All of the mentioned
I/O failure
Ready state of process means
New process
Completed
Currently blocked
Scheduled to run after some execution
Interprocess communication means
Communication between two processes
Data storage
File sharing
Communication between threads
A set of processes is deadlocked if
They share no data
Each is blocked and remains so
They all completed
Each is running
Address of next instruction is provided by
Program counter
MBR
MAR
IR
Single thread of control allows
Multiple processes
Only one task at a time
Multitasking
Parallelism
Objective of multiprogramming is
To reduce speed
To maximize CPU utilization
To prevent errors
To increase memory
What is a long-term scheduler?
Selects process to bring into ready queue
Manages memory
Chooses next instruction
Handles I/O
What is a short-term scheduler?
Manages I/O
Handles files
Selects which process to execute next
Schedules memory
Main difference between long and short-term scheduler is
Frequency of execution
Speed
Size of process
Memory use
In multiprogramming environment
No process stored
No memory used
More than one process resides in memory
Only one process
Which of the following state transitions is not possible?
Running to blocked
Blocked to running
Running to ready
Ready to running
Which of these is a synchronization tool?
Semaphore
Compiler
Scheduler
Loader
Mutual exclusion can be provided by
Only locks
None of these
Both (mutex locks, binary semaphor
What is a synchronization tool?
Semaphore
Compiler
Scheduler
Loader
Mutual exclusion can be provided by
Only locks
None of these
Both (mutex locks, binary semaphores)
Only mutex
Priority inversion is when
Tasks run parallel
Low blocks high
High-priority task is blocked by medium
Deadlock occurs
With uniprogramming
Only one process runs; with multiprocessing, many
No parallelism
All run in one core
Only threads exist
IPC allows
Shared cache
Memory duplication
Processes to communicate without shared space
Disk swapping
Message passing allows
Buffer locking
Communication without shared data
Thread control
Shared memory use
Link between two processes is called
Semaphore
Communication link
Data pipe
Queue
Indirect communication means
Semaphore sharing
No communication
Shared memory only
Uses mailbox between processes
In non-blocking send
Message lost
Receiver blocks
Sender waits
Sender sends and resumes
Blocking send, blocking receive
Both sender and receiver wait
Neither wait
Only sender waits
Only receiver waits
Non-blocking send, blocking receive
Sender blocks
Sender continues, receiver waits
Both wait
Both continue
Non-blocking send and receive
Both block
Receiver waits
Sender waits
Neither waits
RPC used for
Same process sync
Communication between processes on different systems
Compiler error
Data loss
Trap/exception is
Scheduler call
Memory fault
Hardware interrupt
Software interrupt from error
Semaphores
Allocate memory
Synchronize to prevent deadlock
Handle I/O
Create threads
4 necessary conditions for deadlock: mutual exclusion, no-preemption, circular wait and
I/O wait
Process wait
Memory leak
Hold and wait
Part of program accessing shared memory invisibly is
Critical section
Shared block
User mode
System block
Banker's algorithm is for
Deadlock avoidance
Process creation
Memory scheduling
Paging
Multiple processes accessing same data concurrently with outcome dependent on access order is
Deadlock
Mutex
Race condition
Critical section
Segment updating shared data is
Critical section
Heap
Stack
Variable section
Mutual exclusion means
All run free
Deadlock safe
Only one process in critical section
Multiple allowed
Min variables to solve critical section problem
Three
Two
Four
One
Un-interruptible unit is
Atomic
Shared
Critical
Threaded
Semaphore is a
Process
Synchronization tool
Resource
Variable
Code that changes semaphore value is
User code
Critical section code
Shared code
ISR
Two kinds of semaphores
Atomic, Non-atomic
Simple, Complex
Counting, Binary
Threaded, Non-threaded
Binary semaphore values are
1, 2
0, 1
0, 2
0, -1
Monitor is a
Semaphore
High level sync construct
Low-level API
Thread
Reusable resource is
Stack
Shared cache
Used by one process, not depleted
Temporary file
System is in safe state if
Neither
Only b
Both a and b
Only a
Which is deadlock avoidance algo?
LRU
FIFO
Round Robin
Banker's algorithm
