Question Bank
Question Bank
a. Operating System
b. Kernel
d. Firmware
a. Communication
b. System Calls
c. Networking
d. I/O operations
In terms of resource utilisation, what advantage does a bounded operating system offer
over an unbounded operating system?
b. Bounded operating systems consume fewer system resources because they do not
need to support dynamic expansion.
c. Unbounded operating systems utilise system resources more efficiently due to their
fixed feature set.
a. Data Section
b. Stack
c. Heap
d. Text Section
a. Program Code
d. Accounting Information
In which scheduling algorithm does the process with the shortest next CPU burst time get
selected?
c. Priority Scheduling
d. Priority Scheduling
Which of the following statements accurately describes the purpose of using a mutex lock
in concurrent programming?
a. Mutex locks are used to maximise parallelism by allowing multiple threads to access
critical regions simultaneously.
b. Mutex locks are employed to introduce delays in accessing critical regions, ensuring fair
resource allocation among threads.
c. Mutex locks are utilised to protect critical regions and prevent race conditions by
allowing only one thread at a time to access them.
d. Mutex locks are primarily used to terminate threads that attempt to access critical
regions concurrently.
b. A program responsible for loading the initial instructions of the operating system into
memory and starting its execution
b. A way for applications to request services or resources from the operating system
c. Interfaces for interaction between applications and the operating system kernel
Which of the following are NOT typical steps in operating system debugging?
a. CreateFile()
b. read()
c. write()
d. Sleep()
a. Seconds
b. Milliseconds
c. Microseconds
d. Nanoseconds
c. Hardware layer - System Call Inference layer - Libraries layer - User Interface layer
d. User layer - Libraries layer - Kernel layer - System Call Inference layer
b. APIs act as an intermediary layer between user-level applications and system calls.
c. APIs do not provide a higher-level abstraction for accessing OS features and services.
d. APIs define the syntax, semantics, and behaviour of functions and data structures that
applications can use to interact with the OS.
Qt=2ms
What is a bootstrap program
a) It is the first code that is executed when the computer system is started
b) It is the program that helps in restarting the system
c) It is just a simple program like we have other programs in a system
d) None of these
The address of the next instruction to be executed by the current process is provided by the
__________
a) CPU registers
b) Program counter
c) Process stack
d) Pipe
Which state of a process defined "The process is waiting for some event to occur (such as
an I/O completion or reception of a signal)"
a) Ready
b) Running
c) Waiting
To access the services of the operating system, the interface is provided by the
___________
a) Library
b) System calls
c) Assembly instructions
d) API
In a timeshare operating system, when the time slot assigned to a process is completed, the
process switches from the current state to?
a) Suspended state
b) Terminated state
c) Ready state
d) Blocked state
Consider the following set of processes, the length of the CPU burst time given in
milliseconds.
Process Burst time
P1 6
P2 8
P3 7
P4 3
Assuming the above process being scheduled with the SJF scheduling algorithm.
a) The waiting time for process P1 is 0ms
b) The waiting time for process P1 is 3ms
c) The waiting time for process P1 is 9ms
d) The waiting time for process P1 is 16ms
With _____________ only one process can execute at a time; meanwhile all other
processes are waiting for the processor. With ______________ more than one process can
be running simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uni-processing
c) Multiprogramming, Multiprocessing
d) Uni-programming, Multiprocessing
A thread is usually defined as a light weight process because an operating system maintains
smaller data structures for a thread than for a process. In relation to this, which of the
following is true
a) On per thread basis, the operating system maintains only CPU register state
b) The OS does not maintain a separate stack for each thread.
c) On pre-thread basis, the operating system does not maintain virtual memory system.
d) On per thread basis, the operating system maintains only scheduling and accounting
information
Under non-pre-emptive scheduling, once the CPU has been allocated to a process, the
process keeps the CPU until.
1. It releases the CPU by terminating
2. It releases the CPU by switching to the waiting state
3. It releases the CPU By switching to the ready state
4. It releases the CPU By switching to the Running state
a) 1 and 2
b) 1,2,3
c) 2,3,4
d) 1,2,3,4
a) A section of code that is critical for the proper functioning of the program
b) A section of code that must be executed atomically by only one process or thread at
a time
c) A section of code that handles error conditions
d) A section of code that performs I/O operations
Once the process is allocated the CPU and is executing, which of several events could
occur:
I. The process could issue an I/O request and then be placed in an I/O queue
II. The process could create a new child process and wait for the child’s termination.
III. The process could be removed forcibly from the CPU, as a result of an interrupt, and be
put back in the ready queue.
a) Only 1
b) 1 and 2
c) 1, 2,3
d) 2 and 3
Which of the following scheduling algorithms is used in real-time systems to ensure that
critical tasks meet their deadlines?
a) First-Come, First-Served (FCFS)
b) Shortest Job Next (SJN)
c) Round Robin (RR)
d) Rate-Monotonic Scheduling (RMS)
For process P1, P2, P3, P4, P5 How many times the following function prints “Semaphore”.
If Semaphore is initialised by 0?
Do
{
wait (S);
{
While(s<=0);
{
s=s-1;
Print (“Semaphore”);
}
signal(s);
{
s=s+1;
}
}
a) None
b) 2
c) 3
d) 1
Consider the set of 3 processes whose arrival time and burst time are given below
If the CPU scheduling policy is SRTF, the average waiting time and average turnaround time
is calculated as
a) 12.33, 10
b) 11.22, 6
c) 12.33, 5
d) 11.22, 10
Consider the set of 6 processes whose arrival time and burst time are given below:
Process Id Arrival time Burst time
P1 0 7
P2 1 5
P3 2 3
P4 3 1
P5 4 2
P6 5 1
If the CPU scheduling policy is the shortest remaining time first, the average turnaround time
will be………….
a) 7.17
b) 6.17
c) 8.27
d) 5.67
Consider the set of 5 processes whose arrival time and burst time are given below.
If the CPU scheduling policy is Round Robin with time quantum = 2 unit, average turnaround
time is calculated as
A. 8
B. 7.6
C. 8.2
D. 8.6
Consider the following statements about process state transitions for a system using
preemptive scheduling.
Consider a process P currently running on a CPU. Identify which of the following events will
invariably necessitate a context switch by the operating system, causing process P to
transition to a non-running state (such as ready or blocked):
I. P makes a blocking system call to read a block of data from the disk.
II. P tries to access a page that is in the swap space, resulting in a page fault.
III. An interrupt is raised by the disk to deliver data requested by some other process.
IV. A timer interrupt is raised by the hardware.
Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and
j. The program executed by process is shown below.
repeat
flag[i] = true;
turn = j;
while (P) do no-op;
Enter critical section, perform actions, then
exit critical section
Flag[i] = false;
Perform other non-critical section actions.
Until false;
For the program to guarantee mutual exclusion, the predicate P in the while loop should
be
A. flag[j] == true and turn == i
B. flag[j] = =true and turn == j
C. flag[i] == true and turn == j
D. flag[i] = =true and turn == i
Consider the two functions incr() and decr() shown below.
incr() decr()
{ {
wait(s); wait(s);
X = X+1; X = X-1;
signal(s); signal(s);
} }
There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the
same shared variable X. The initial value of X is 10.
A. 2
B. 2n
C. 2n
D. 2n-1
The following program consists of 3 concurrent processes and 3 binary semaphores. The
semaphores are initialized as S0 = 1, S1 = 0, S2 = 0.
Process P0
while(true)
{
wait(S0);
print '0';
release(S1);
release(S2);
}
Process P1
wait(S1);
release(S0);
Process P2
wait(S2);
release(S0);
How many times will P0 print ‘0’?
a) At least twice
b) Exactly twice
c) Exactly thrice
d) Exactly once
Consider the set of 6 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is Round Robin with time quantum = 2, calculate the average
waiting time and average turnaround time.
A) 10.84 unit and 7.33 unit
B) 11.23 unit and 8.21 unit
C) 9.8 unit and 7.14 unit
D) 10. 34 unit and 8.44 unit
Consider the set of 4 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is SRTF, calculate the waiting time of process P2.
A) 15 unit B) 12 unit C) 16 unit D) 14 unit
Consider the set of 5 processes whose arrival time and burst time are given below-
Consider the following table of arrival time and the burst time for the five processes P0, P1,
P2, P3, P4, P5. What is the average waiting time for the five processes?
Process. No Arrival Time Burst Time
P0 0 14
P1 1 3
P2 2 1
P3 3 2
P4 4 5
A) 15 unit
B) 12 unit
C) 18 unit
D) 13 unit
Consider the following set of processes, assumed to have arrived at time 0. Consider the
CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR,
assume that the processes are scheduled in the order P1, P2, P3, P4.
If the time quantum for RR is 4 ms, then the absolute value of the difference between the
average turnaround times (in ms) of SJF and RR (round off to 2 decimal places) is
_________ .
(A) 5.0 (B) 5.25 (C) 5.50 (D) 5.75
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.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing
To access the services of operating system, the interface is provided by the ___________
a) System calls
b) API
c) Library
d) Assembly instructions
The systems which allow only one process execution at a time, are called __________
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
Process Q:
while (1) {
Y:
print '1';
print '1';
Z:
}
Synchronisation statements can be inserted only at points W, X, Y and Z Which of the
following will ensure that the output string never contains a substring of the form 01^n0 or
10^n1 where n is odd?
(A) P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S and T initially 1
(B) P(S) at W, V(T) at X, P(T) at Y, V(S) at Z, S and T initially 1
(C) P(S) at W, V(S) at X, P(S) at Y, V(S) at Z, S initially 1
(D) V(S) at W, V(T) at X, P(S) at Y, P(T) at Z, S and T initially 1
At a particular time of computation the value of a counting semaphore is 7. Then 20 P
operations and xV operations were completed on this semaphore. If the new value of
semaphore is 5, x will be
a)18
b)22
c)15
d)13
Process Q:
while (1) {
Y:
print '1';
print '1';
Z:
}
A. 2
B. 2n
C. 2n
D. 2n-1
Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and
j. The program executed by process is shown below.
repeat
flag[i] = true;
turn = j;
while (P) do no-op;
Enter critical section, perform actions, then
exit critical section
Flag[i] = false;
Perform other non-critical section actions.
Until false;
For the program to guarantee mutual exclusion, the predicate P in the while loop should
be
A. flag[j] == true and turn == i
B. flag[j] = =true and turn == j
C. flag[i] == true and turn == j
D. flag[i] = =true and turn == i
Both processes are started at the same time, and each resource can be accessed by only
one process at a time The following scheduling constraints exist between the access of
resources by the processes:
• P2 must complete use of R1 before P1 gets access to R1
• P1 must complete use of R2 before P2 gets access to R2.
• P2 must complete use of R3 before P1 gets access to R3.
• P1 must complete use of R4 before P2 gets access to R4.
There are no other scheduling constraints between the processes. If only binary semaphores
are used to enforce the above scheduling constraints, what is the minimum number of binary
semaphores needed?
(A) 1
(B) 2
(C) 3
(D) 4
Consider two processes P1 and P2 accessing the shared variables X and Y protected by
two binary semaphores SX and SY respectively, both initialized to 1. P and V denote the
usual semaphone operators, where P decrements the semaphore value, and V increments
the semaphore value. The pseudo-code of P1 and P2 is as follows :
In order to avoid deadlock, the correct operators at L1, L2, L3 and L4 are respectively
a)P(SY), P(SX); P(SX), P(SY)
b)P(SX), P(SY); P(SY), P(SX)
c)P(SX), P(SX); P(SY), P(SY)
d)P(SX), P(SY); P(SX), P(SY)
Suppose we want to synchronize two concurrent processes P and Q using binary
semaphores S and T. The code for the processes P and Q is shown below.
Process P:
while (1) {
W:
print '0';
print '0';
X:
}
Process Q:
while (1) {
Y:
print '1';
print '1';
Z:
}
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is SJF preemptive, calculate the average waiting time.
A) 3.8 unit B) 4.4unit C) 4.2 unit D) 3.9 unit
Consider the set of 6 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is Round Robin with time quantum = 3, calculate the average
waiting time and average turnaround time.
A) 21.33 unit and 16 unit
B) 22.23 unit and 8.21 unit
C) 19.8 unit and 17.14 unit
D) 19.34 unit and 18.44 unit
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is SJF non-preemptive, calculate the average waiting time.
A)4.8 unit B) 5.4unit C) 5.2 unit D) 4.3 Unit
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is priority non-preemptive, calculate the average waiting time
and average turnaround time. (Higher number represents higher priority)
Consider a computer system that supports 32-bit physical as well as virtual addresses. Now
since the space of the physical address is the same size as the virtual address, the OS
designers would decide to entirely get rid of its virtual memory. Which one of these is true in
this case
A. It is no longer possible to efficiently implement multi-user support
B. It is possible to make CPU scheduling more efficient now
C. There would no longer be a requirement for hardware support for memory management
D. It would be possible to make the processor cache organisation more efficient no
Kernel threads
A. cannot be supported and managed directly by the operating system
B. can be supported and managed directly by the operating system
C. are supported below the kernel and are managed without kernel support
D. None of the above
Suppose that a process is in “Blocked” state waiting for some I/O service. When the service
is completed, it goes to the
A. Running state
B. Ready state
C. Suspended state
D. Terminated state
The scheduling in which CPU is allocated to the process with least CPU-burst time is called
A. Priority Scheduling
B. Shortest job first Scheduling
C. Round Robin Scheduling
D. Multilevel Queue Scheduling
Which of the following statements are true
I. Shortest remaining time first scheduling may cause starvation.
II. Preemptive scheduling may cause starvation.
III. Round robin is better than FCFS in terms of response time.
A. I only B. I and III C. II and III D. I, II , III
A thread is usually defined as a light weight process because an operating system maintains
smaller data structures for a thread than for a process. In relation to this, which of the
following is true
A. On per thread basis, the operating system maintains only CPU register state
B. The OS does not maintain a separate stack for each thread.
C. On prethread basis, the operating system does not maintain virtual memory system.
D. On per thread basis, the operating system maintains only scheduling and accounting
information
The portion of the process scheduler in an operating system that dispatches processes is
concerned with
A. assigning ready processes to CPU
B. assigning ready processes to waiting queue
C. assigning running processes to blocked queue
D. All of these
Each process has a segment of code, called a ____________, in which the process may be
changing common variables, updating a table, writing a file, and so on
A. None-critical section
B. Critical section
C. Exit Section
D. Entry Section
Under nonpreemptive scheduling, once the CPU has been allocated to a process, the
process keeps the CPU until.
1. It releases the CPU by terminating2
2. It releases the CPU by switching to the waiting state
3. It releases the CPU By switching to the ready state
4. It releases the CPU By switching to the Running state
A. 1 and 2
B. 1,2,3
C. 2,3,4
D. 1,2,3,4 2
In which of the following scheduling algorithm new processes are added to the tail of the
ready queue. The CPU scheduler picks the first process from the ready queue, sets a timer
to interrupt after 1 time quantum, and dispatches the process.
A. Shortest-Job-First Scheduling
B. Priority Scheduling
C. First-Come, First-Served Scheduling
D. Round-Robin Scheduling
Consider the set of 3 processes whose arrival time and burst time are given below
If the CPU scheduling policy is SRTF, the average waiting time and average turnaround time
is calculated as
A. 12.33, 10
B. 11.22, 6
C. 12.33, 5
D. 11.22, 10
Consider the following set of processes, the length of the CPU burst time given in
milliseconds.
Process Burst time
P0 6
P1 8
P2 7
P3 3
Process being scheduled with the SJF scheduling algorithm.
If the CPU scheduling policy is Round Robin with time quantum = 2 unit, average turnaround
time is calculated as
A. 8
B. 7.6
C. 8.2
D. 8.6
If the Disk head is located initially at 32, find the number of disk moves required with FCFS if
the disk queue of I/O blocks requests are 98, 37,14,124,65,67.
To access the services of the operating system, the interface is provided by the
___________
a) Library
b) System calls
c) Assembly instructions
d) API
In a timeshare operating system, when the time slot assigned to a process is completed, the
process switches from the current state to?
a) Suspended state
b) Terminated state
c) Ready state
d) Blocked state
Which one of the following errors will be handle by the operating system?
a) lack of paper in printer
b) connection failure in the network
c) power failure
d) all of the mentioned
A thread shares its resources (like data section, code section, open files, signals) with
___________
a) other process similar to the one that the thread belongs to
b) other threads that belong to similar processes
c) other threads that belong to the same process
d) all of the mentioned
Consider a transaction T1 that was committed before the checkpoint. The <T1 commits>
record appears in the log before the <checkpoint> record. Any modifications made by T1
must have been written to the stable storage either with the checkpoint or before it. Thus at
recovery time ____________
a) There is a need to perform an undo operation on T1
b) There is a need to perform a redo operation on T1
c) There is no need to perform an undo and redo operation on T1
d) All of the mentioned
The portion of the process scheduler in an operating system that dispatches processes is
concerned with ____________
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned
10 different processes are running on a workstation. Idle processes are waiting for an input
event in the input queue. Busy processes are scheduled with the Round-Robin time-sharing
method. Which of the following quantum times is the best value for small response times, if
the processes have a short runtime, e.g. less than 10ms?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms
Under multiprogramming, turnaround time for short jobs is usually ________ and that for
long jobs is slightly ___________
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
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.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing
Consider the set of 6 processes whose arrival time and burst time are given below:
Process Id Arrival time Burst time
P1 0 7
P2 1 5
P3 2 3
P4 3 1
P5 4 2
P6 5 1
If the CPU scheduling policy is the shortest remaining time first, the average turnaround time
will be…………..
a) 7.17
b) 6.17
c) 8.27
d) 5.67
Consider the set of 6 processes whose arrival time and burst time are given below:
Process Id Arrival time Burst time
P1 5 5
P2 4 6
P3 3 7
P4 1 9
P5 2 2
P6 6 3
If the CPU scheduling policy is Round Robin with time quantum = 3, the average waiting
time is equal to ………..
a) 17
b) 14
c) 15
d) 16
Using the Priority Scheduling algorithm, find the average waiting time for the following set of
processes given with their priorities in the order: Process: Burst Time: Priority respectively.
P1 : 10 : 3 ,
P2 : 1 : 1 ,
P3 : 2 : 4 ,
P4 : 1 : 5 ,
P5 : 5 : 2.
a) 8 milliseconds
b) 8.2 milliseconds
c) 7.75 milliseconds
d) 3 milliseconds
Consider three CPU-intensive processes, which require 10, 20, and 30 time units and arrive
at times 0, 2, and 6, respectively. How many context switches are needed if the operating
system implements the shortest remaining time first scheduling algorithm? Do not count the
context switches at time zero and at the end.
a) 1
b) 2
c) 3
d) 4
. What is a batch operating system?
1. Multiple individual tasks
2. Similar types of tasks are grouped together
3. Tasks operating at different systems
4. All of the above
Which of the following mechanisms is used to prevent multiple processes or threads from
simultaneously accessing a shared resource?
1) Critical Section
2) Semaphore
3) Mutex
4) Monitor
In a critical section problem, if two processes attempt to enter their critical sections
simultaneously, what issue can occur?
1) Deadlock
2) Race condition
3) Starvation
4) Thrashing
The switching of the CPU from one process or thread to another is called ____________
1) process switch
2) task switch
3) context switch
4) all of the mentioned
The processes that are residing in main memory and are ready and waiting to execute are
kept on a list called _____________
1) job queue
2) ready queue
3) execution queue
4) process queue
In the producer-consumer problem, if the buffer is full and a producer attempts to add an
item to the buffer, what will happen?
1. The producer will wait until the buffer has space available.
2. The producer will overwrite the existing data in the buffer.
3. The producer will terminate.
4. The system will raise an error.
Consider the following statements with respect to user-level threads and kernel supported
threads:
1. context switch is faster with kernel-supported threads
2. for user-level threads, a system call can block the entire process
3. Kernel supported threads can be scheduled independently
4. User level threads are transparent to the kernel
Which of the above statements are true?
1. (ii), (iii) and (iv) only
2. (ii) and (iii) only
3. (i) and (iii) only
4. (i) and (ii) only
smaller the number, higher the priority. If the CPU scheduling policy FCFS, What will be the
the average waiting time?
Consider the set of 6 processes whose arrival time and burst time are given below: -
If the CPU scheduling policy is shortest remaining time first, calculate the average
waiting time and average turnaround time.
Consider the following set of process that arrive at time 0, with the length of CPU burst given
in milliseconds. Calculate the average waiting time when the processes arrive in the
following order:
a. P1, P2, P3 P4 P5
Options:
a) I and II
b) II and III
c) III and IV
d) IV and I
When the final value of a variable is dependent on the execution sequence of processes
there is said to be
a) Starvation
b) Deadlock
c) A time lock
d) Race condition
In a single processor system which scheduling algorithm results the maximum throughput
a) Shortest Job First
b) Round Robin
c) Longest Job First
d) Highest Response First
Which one of the following is not the goal of the CPU scheduling algorithm
a) Maximizing the burst time
b) Minimizing the response time
C) Minimizing the average waiting time
d) Minimizing the turn-around time
a) I only
b) I and III only
c) II and III only
d) I and II and III
In which situation a currently running process always moves from running to ready state
i) When a higher priority process enters into the ready state
ii) When the running process demands an Input/Output operation
iii) When a new process arrives in the ready state
iv) When the running process gets suspended
v) When a block process resumes to ready state
vi) When time quanta of the running process expires
Options:
a) I and V
b) II and III
c) I and VI
d) III and V
e) III,IV,V and VI
Consider the peterson’s algorithm for mutual exclusion between two concurrent processes
K and L. The program executed by process is shown below. (Marks2)
While(True)
{
Interested[k]=true;
Turn =L
While(X);
Enter critical section,
Perform action
Exit critical section
Interested[k]=False
}
For the program to guarantee mutual exclusion the predicate X in the while loop should be
a) Interested[L]==True and Turn ==L
b) Interested[L]!=True and Turn ==L
c) Interested[k]==True and Turn ==k
d) Interested[k]==True and Turn ==L
Consider three processes P0,P1 and P2, all arriving at time zero, with total execution time of
10,20 and 30 units respectively. Each process spends the first 20% of execution time doing
I/O, the next 70% of time doing computation and the last 10% of time doing I/O again.
The operating system uses a shortest remaining compute time first scheduling algorithm
and schedules a new process either when the running process get blocked on I/O or when
the running process finishes its compute burst . Assume that all I/O operation can be
overlapped as much as possible. For how much time the processes have waited for the
processor?
a) P0:0, P1:7,P2:15
b) P0:0, P1:5,P2:17
c) P0:2,P1:5,P2:15
d) P0:2,P1:7,P2:17
If the time quanta used in the round robin scheduling policy is more than the maximum time
required to execute any process, then the policy will be
a) The policy will become first come first serve
b) The policy will become priority scheduling
c) The policy will become shortest come first
d) The policy will become shortest remaining first
In a computer system having single processor, has two processes, both are having
alternate 10ms CPU bursts with 90ms I/O bursts. Both the processes are created nearly at
the same time. The input output operation of both processes can proceed in parallel. Which
one of the following scheduling strategies will result in the least CPU utilization (over a long
period of time)
a) First come first serve
b) Static priority scheduling with different priorities for the two processes
c) Round Robin with time quanta of 10ms
d) Round robin with time quanta of 5 ms
a)2
b)14
c) 1
d) 7
Consider ‘m’ processes sharing the CPU in a round robin fashion. Assuming that each
process switch takes ‘k’ seconds , what must be the quantum size Q such that overhead
resulting from process switching is minimized but at the same time each process is
guaranteed to get its turn at the CPU at least every ‘h’ seconds?
a) Q≥(h-mk/m-1)
b) Q≤ (h-mk/m-1)
c) Q≤(k-mh/m+1)
d) Q≥(k-mh/m+1)
In the context of inter-process communication, which of the following are true?
A. Message passing can be easier to implement in distributed systems compared to shared
memory.
B. Race conditions can be avoided by ensuring that shared resources are accessed in a
mutually exclusive manner.
C. Signals are a form of asynchronous communication used in UNIX systems.
D. Pipes in UNIX are an example of two-way communication between processes.
You are designing a CPU scheduler for a system that prioritises interactive
processes to ensure a responsive user experience. However, you must also ensure that
batch processing jobs, which are lower in priority compared to interactive processes, do not
starve. Based on these requirements, which of the following strategies would you implement
in your CPU scheduling algorithm?
Options:
A. Apply the Shortest Job First (SJF) algorithm, as it offers the lowest average waiting time
for processes.
B. Utilise the Round Robin (RR) algorithm with a dynamic time quantum, adjusting the
quantum based on the process type (interactive vs. batch).
C. Implement a Multilevel Feedback Queue (MFQ) scheduling algorithm, where interactive
processes are placed in a higher-priority queue compared to batch processes, but batch
processes can gradually increase their priority if they wait too long.
D. Implement Aging with Priority Scheduling, where lower priority processes gradually
increase their priority over time to prevent starvation.
You are analysing a system that utilises both multitasking and multithreading to
optimise performance. Given the following statements, identify which accurately reflect the
principles and functionalities of multitasking and multithreading in operating systems.
Options:
A. Multitasking allows a single CPU to run multiple processes concurrently by rapidly
switching between them, giving the illusion of parallelism.
B. Multithreading within a single process allows threads to share resources such as memory
space, which can lead to more efficient use of system resources compared to multiple
processes.
C. In a multithreaded environment, each thread has its own separate stack, but all threads
within the same process share the heap space.
D. Multitasking increases the performance of CPU-intensive applications by allowing multiple
CPUs to execute different threads of the same process simultaneously.
Select the system calls from the list below that would typically be used in a
Unix-like operating system to manage process control and file operations. Choose all that
apply.
Options:
A. fork()
B. read()
C. chmod()
D. socket()
E. getpid()
Scenario: Imagine you are designing a new operating system for a high-performance
computing system that requires efficient management of processes, memory, and I/O
operations. You need to ensure that the operating system can handle multiple tasks
simultaneously, manage memory efficiently to support various applications, and provide
robust I/O operations management.
Based on the scenario above, which of the following features should be
incorporated into the design of the new operating system to meet the specified
requirements? Select all that apply.
A. Implement a preemptive multitasking scheduler to allow the operating system to manage
the execution time of processes efficiently.
B. Use a monolithic kernel to simplify the design and reduce the overhead associated with
context switching and inter-process communication.
C. Integrate a virtual memory management system to provide a larger address space to
processes and to support efficient memory utilization.
D. Employ a Round Robin scheduling algorithm with a fixed time quantum for all processes
to ensure fairness in process execution.
E. Incorporate a Direct Memory Access (DMA) mechanism to allow peripherals to directly
read from and write to main memory, reducing the CPU's I/O operation load.
In the context of operating systems, which of the following are valid methods of
inter-process communication (IPC)? Select all that apply.
Options:
A. Shared Memory - Processes communicate by accessing a shared section of memory,
providing fast communication by avoiding system calls.
B. Pipes - A communication channel that allows one process to send data to another
process in a unidirectional flow.
C. Semaphores - Mechanisms used to control access to a common resource by multiple
processes to avoid critical section problems.
D. Remote Procedure Calls (RPCs) - A protocol that one program can use to request a
service from a program located on another computer in a network.
Scenario: You are analyzing the performance of a real-time operating system (RTOS) that is
used to control robotic machinery. The RTOS is designed to handle a high frequency of
interrupt-driven tasks, which requires efficient context switching to maintain system
responsiveness and task prioritization.
Considering the scenario, which features should the RTOS's context switching mechanism
possess to ensure optimal performance in handling high-frequency interrupt-driven tasks?
Select all that apply.
Options:
A. The context switching mechanism should have minimal overhead to reduce the time
spent in switching between tasks.
B. The RTOS should prioritize tasks based on their urgency and deadlines, not just on a
first-come, first-served basis.
C. The context switching process should include extensive memory management steps to
optimize RAM usage.
D. The RTOS should employ a complex scheduling algorithm that considers the future
computational needs of tasks to optimize context switching.