WorksheetsComputer System and Page Replacement Quiz
Total questions: 81
Worksheet time: 41mins
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. How many page faults does the LRU page replacement algorithm produce (including page faults when the frames were free)?
11
13
12
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. How many page faults does the Optimal page replacement algorithm produce (including page faults when the frames were free)?
11
9
10
8
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. How many page faults does the FIFO page replacement algorithm produce (including page faults when the frames were free)?
13
14
16
15
What is not a main structural element of a computer system?
Processor
I/O modules
Operating system
Main memory
Which of the following element of a computer system stores data and programs?
System bus
Processor
Main memory
I/O modules
Which of the following provides for communication among elements of a computer system?
System bus
Processor
AC
Main memory
Which of the following element of a computer system moves data between the computer and its external environment?
Main memory
I/O modules
Registers
System bus
The processor contains a single data register, called
PC
AC
MAR
IR
This register specifies a particular input/output device
I/OBR
MAR
I/OAR
PC
This register is used for the exchange of data between an I/O module and the processor
AC
IR
I/OAR
I/OBR
This register contains the data to be written into memory or which receives the data read from memory
Memory buffer register
Memory address register
Accumulator
Instruction register
This register specifies the location in memory for the next read or write
Accumulator
Memory buffer register
Memory address register
Instruction register
Which register contains the address of the next instruction to be fetched?
MAR
Accumulator
Instruction register
Program counter
Which register contains the instruction most recently fetched?
AC
Instruction register
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?
MAR and MBR
AC and IR
MBR and IR
PC and IR
Which of the following registers are used by the processor to exchange data with Input/output module?
PC and AC
IR and MAR
I/OAR and I/OBR
MAR and MBR
Which of the following element of a computer system controls the operation of the computer and performs its data processing functions?
System bus
I/O modules
Main memory
Processor
For 4 page frames, the following is 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 page replacement algorithm produce (including page faults when the frames were free)?
12
8
10
11
For 4 page frames, the following is 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 page replacement algorithm produce (including page faults when the frames were free)?
15
12
13
14
For 4 page frames, the following is 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 page replacement algorithm produce (including page faults when the frames were free)?
10
8
7
9
The fetched instruction is loaded into
IR
PC
MAR
AC
At the beginning of each instruction cycle, the processor fetches an instruction from the memory. The address of the instruction is held in
PC
IR
MAR
MBR
The processor is executing 'Load AC from memory' instruction. Choose the correct micro-instructions:
PC → MBR M → IR
MBR → IR M → AC
MAR → PC M → IR
PC → MAR M → MBR MBR → IR IR → MAR M → MBR MBR → AC
Process is
a program in execution
a data structure
a user process
a thread
A task in a blocked state
is in ready state
is executing
is waiting for some temporarily unavailable resources
has completed execution
The system which allows only one process execution at a time, are called
Real-time systems
Uniprogramming sys
The system which allows only one process execution at a time, are called
Real-time systems
Uniprogramming systems
Distributed systems
Multiprogramming systems
Which of the following is not the state of a process?
Ready
Running
Old
Blocked
Suppose that a process is in 'Blocked' state waiting for some I/O service. When the service is completed it goes to the:
Exit state
Ready state
New state
Running state
Which of the following state transitions is not possible?
Blocked to running
Blocked to ready
Ready to running
Running to blocked
If a process is executing in its critical section, then no other processes can be executing in their critical section. This condition is called
Mutual exclusion
Starvation
Semaphore
Deadlock
Process is
An OS thread
A unit of activity characterized by the execution of a sequence of instructions, a current state, and an associated set of system instructions
A data structure
A program in memory
Interprocess communication:
allows processes to synchronize activity
uses cache memory
prevents multitasking
uses signals only
A program
is a single instruction
is an OS task
is a sequence of instructions
is a running process
In operating system, each process has its own:
all of the above
address space
open files
program counter
For each process OS creates and manages:
Thread block
File table
Process control block
Semaphore
Listing the sequence of instructions that are executed is called?
Schedule
Log
Trace
Track
A process can be terminated due to:
All of the mentioned
I/O failure
Software error
Parent termination
What is the ready state of a process?
When process is scheduled to run after some execution
When it's created
When it's blocked
When it's terminated
What is interprocess communication?
Communication between two process
File sharing
Communication inside one thread
Data duplication
A set of processes is deadlock if:
Each process is terminated
Each process is blocked and will remain so forever
No process is ready
Processes are waiting indefinitely
The address of the next instruction to be executed by the current process is provided by the:
MBR
Program counter
Instruction register
MAR
A single thread of control allows the process to perform:
Concurrent jobs
All processes
Multiple tasks
Only one task at a time
The objective of multi-programming is to:
To run only one process
To minimize memory use
To simplify OS
To maximize CPU utilization
What is a long-term scheduler?
It selects which process has to be brought into the ready queue
It handles I/O devices
It switches contexts
It allocates memory
What is a short-term scheduler?
It manages files
It handles cache
It selects which process has to be executed next and allocates CPU
It allocates registers
The primary distinction between the short-term and long-term scheduler is:
The memory they use
The frequency of their execution
The process size
The speed
In a multi-programming environment
Only one process in memory
Processes are stored on disk
No process in memory
More than one process resides in the memory
Which of the following state transitions is not possible?
Blocked to ready
Running to blocked
Blocked to running
Ready to running
Which of the following is a synchronization tool?
Semaphore
Cache
Interrupt
Thread
Mutual exclusion can be provided by the:
Signals
Only mutex
Both (mutex locks, binary semaphores)
Only semaphores
When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called:
Context switch
Priority inversion
Deadlock
Starvation
With … only one process can execute at a time; meanwhile all other process are waiting for the processor. With … more than one process can be running simultaneously each on a different processor
Multiprogramming, Monoprocessing
Uniprogramming, Multiprocessing
Threading, Context Switching
Multitasking, Uniprogramming
Interprocess communication:
Requires semaphores
Requires shared memory
Allows processes to communicate and synchronize their actions without using the same address space
Is not needed
Message passing system allows process to:
Communicate with one another without resorting to shared data
Share memory directly
Use shared variables
Use semaphores only
The link between two processes P and Q to send and receive messages is called:
Data bus
Communication link
Pipe
Message buffer
In indirect communication between processes P and Q:
They use semaphores
There is a mailbox to help communication between P and Q
They communicate via cache
They use sockets
In the non-blocking send:
The process waits
The receiver blocks
The sending process sends the message and resumes operation
The message is dropped
In the blocking send, blocking receive:
Both sender and receiver are blocked until message is delivered
None blocked
Only receiver blocked
Only sender blocked
In the non-blocking send, blocking receive:
Receiver continues
Sender continues on, receiver is blocked until the requested message arrives
Both continue
Sender blocked
In the non-blocking send, non-blocking receive:
Neither of processes are required to wait
Both wait
Sender waits
Receiver waits
Remote Procedure Calls (RPC) are used:
Between threads
On same system
For communication between two processes on separate systems
Only locally
What is a trap/exception
Context switch
Software generated interrupt caused by an error
Cache miss
Hardware failure
Semaphores:
Synchronize critical resources to prevent deadlock
Only manage memory
Only schedule I/O
Terminate threads
Four necessary conditions for deadlock to exist are: mutual exclusion, no-preemption, circular wait and
Interrupt block
Hold and wait
I/O wait
Deadlock count
Part of a program where the shared memory is accessed and which should be executed invisibly, is called:
I/O area
Critical section
Execution segment
Shared block
Banker's algorithm for resource allocation deals with:
Context switching
Deadlock avoidance
Paging
Interrupts
A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called:
Deadlock
Thread conflict
Priority inversion
Race condition
The segment of code in which the process may change common variables, update tables, write into files is known as:
I/O section
Instruction set
Execution block
Critical section
Mutual exclusion means that:
All processes execute freely
If a process is executing in its critical section, then no other process must be executing in their critical sections
No critical sections
Processes share access
A minimum of … variables is/are required to be shared between processes to solve the critical section problem?
Two
Four
Three
One
An un-interruptible unit is known as:
Binary
Critical
Atomic
Semaphored
Semaphore is a/an … to solve the critical section problem:
Communication tool
Queue system
Synchronization tool
Memory area
The code that changes the value of the semaphore is:
Wait code
Critical section code
Initialization
Exit code
The two kinds of semaphores are:
Integer, Boolean
Shared, Exclusive
Counting, Binary
True, False
A binary semaphore is a semaphore with integer values:
0, 2
0, 1
1, 2
-1, 1
A monitor is a type of:
Thread type
High level synchronization construct
Memory handler
Semaphore
What is the reusable resource:
Shared resource
That can be used by one process at a time and is not depleted by that use
Cache
Temporary file
A system is in the safe state if:
Only a
None of the above
Both a and b
Only b
Which of the following is the deadlock avoidance algorithm?
FIFO
Round-robin
Optimal replacement
Banker's algorithm
