0% found this document useful (0 votes)
116 views46 pages

Question Bank

Uploaded by

armaanmishra48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views46 pages

Question Bank

Uploaded by

armaanmishra48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

The one program running at all times on the computer is:

a. Operating System

b. Kernel

c. Central Processing Unit

d. Firmware

The process of exchanging information, on the same computer or between computers


over a network is known as:

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?

a. Bounded operating systems offer better resource utilisation by dynamically allocating


resources based on demand.

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.

d. Bounded operating systems are less flexible in resource management compared to


unbounded operating systems.

Which section of a process contains the program code?

a. Data Section

b. Stack

c. Heap

d. Text Section

What information is typically stored in a Process Control Block (PCB)?

a. Program Code

b. CPU Scheduling Information


c. Memory Management Information

d. Accounting Information

In which scheduling algorithm does the process with the shortest next CPU burst time get
selected?

a. First-Come, First-Served (FCFS) Scheduling

b. Round Robin (RR) Scheduling

c. Priority Scheduling

d. Shortest-Job-First (SJF) Scheduling

What is the primary goal of the dispatcher module?

a. To switch the CPU to another process

b. To manage the ready queue

c. To allocate memory to processes

d. To manage I/O devices

Which of the scheduling algorithm uses quantum time:

a. First-Come, First-Served (FCFS) Scheduling

b. Round Robin (RR) Scheduling

c. Shortest-Job-First (SJF) 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.

What happens when a user program makes a system call?

a. The program continues to run concurrently with the kernel.

b. Control is transferred to the kernel, which handles the request.

c. The system call is automatically denied due to security restrictions.

d. The program terminates and the operating system takes over.

What is the primary role of an operating system?

a. To provide hardware to the user

b. To manage all resources

c. To control user interactions

d. To act as an interface between the user and the computer hardware

What are the true statements about a bootstrap program?

a. A program that initialises the hardware components of a computer system

b. A program responsible for loading the initial instructions of the operating system into
memory and starting its execution

c. A program that manages the allocation of system resources to various processes

d. The bootstrap program is typically stored in firmware, such as ROM or EEPROM.

Which of the following describes system calls?

a. Low-level programming language constructs

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

d. Interfaces for interaction between applications and hardware

Which of the following are NOT typical steps in operating system debugging?

a. Skip testing and validation


b. Analysing system state

c. Ignoring user reports

d. Using debugging tools

Which of the following are Windows commands?

a. CreateFile()

b. read()

c. write()

d. Sleep()

CPU Bursts are measured in:

a. Seconds

b. Milliseconds

c. Microseconds

d. Nanoseconds

What are the Non preemptive processes?

a. If high priority process arrives, low priority process may starve

b. The resources are allocated to a process for a limited time

c. Process cannot be interrupted till it terminates or switches to waiting state

d. It relies on processes to release the CPU voluntarily

Correct formulae for Turnaround Time:

a. Burst time + Waiting time.

b. Arrival time + Burst time

c. Waiting time + Arrival time

d. Completion time - Arrival time

Select the 2 correct arrangements of layers:

a. Hardware layer - Kernel layer - Libraries layer - User layer


b. User layer - Kernel layer - System Call Inference layer - Hardware layer

c. Hardware layer - System Call Inference layer - Libraries layer - User Interface layer

d. User layer - Libraries layer - Kernel layer - System Call Inference layer

Which statements accurately describe APIs in the context of operating systems?

a. APIs never include libraries or frameworks that wrap system calls

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.

FCFS: Without Arrival Time


SJF: Without Arrival Time
Priority Scheduling: Consider Lower Priority

Priority Scheduling: With Arrival time - Consider Higher time


Round Robin Preemptive (with arrival time)

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

If the semaphore value is negative ____________

a) Its magnitude is the number of processes waiting on that semaphore


b) It is invalid
c) No operation can be further performed on it until the signal operation is performed on it
d) none of the mentioned

Out of the following, which one needs a device driver


a) Main memory
b) Disk
c) Register
d) Cache

Which of the following is the feature of the operating system


a) Error detection aids
b) Control over system performance
c) Job Accounting
d) Coordination between other software and users
e) All

The code that changes the value of the semaphore is ____________


a) Remainder section code
b) Non – critical section code
c) Critical section code
d) None of the mentioned

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

In real time operating system ____________


a) Process scheduling can be done only once
b) All processes have the same priority
c) Kernel is not required
d) A task must be serviced by its deadline period

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

What is the main function of the command interpreter


a) To provide the interface between the API and application program
b) To handle the files in the operating system
c) To get and execute the next user-specified command
d) None of the mentioned

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

In the context of synchronisation, what does a "critical section" refer to?

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 state transitions is not possible?


a) Blocked to running
b) Ready to running
c) Blocked to ready
d) Running to blocked

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)

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 only
c) II and III only
d) I, II and III

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.

I. A running process can move to ready state.


II. A ready process can move to ready state.
III. A blocked process can move to running state.
IV. A blocked process can move to ready state.

Which of the above statements are TRUE?


a) I, II and III only
b) II and III only
c) I, II and IV only
d) I, II, III and IV

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.

Which of the above statements are TRUE?


a) I and II only
b) II and III only
c) II and IV only
d) I, II, III and IV

Consider the following two-process synchronization solution.


Process 0 Process 1
Entry: loop while (turn == 1); Entry: loop while (turn == 0);
(critical section) (critical section)
Exit: turn = 1; Exit turn = 0;
The shared variable turn is initialized to zero. Which one of the following is TRUE?
(A) This is a correct two-process synchronization solution.
(B) This solution violates mutual exclusion requirement.
(C) This solution violates progress requirement.
(D) This solution violates bounded wait requirement.

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.

suppose there are two implementations of the semaphore s, as follows:


I-1:s is a binary semaphore initialized to 1.
I-2:s is a counting semaphore initialized to 2.
Let V1, V2 be the values of X at the end of execution of all the threads with implementations
I-1, I-2, respectively.
Which one of the following choices corresponds to the minimum possible values of V1, V2,
respectively?
A. 15,7
B. 7,7
C. 12,7
D. 12,8

A counting semaphore S is initialized to 10. Then, 6 P operations and 4 V operations are


performed on S. What is the final value of S?
A. 0
B. 5
C. 8
D. 3

A shared variable x, initialised to zero, is operated on by four concurrent processes W, X, Y,


Z as follows. Each of the processes W and X reads x from memory, increments by one,
stores it to memory and then terminates. Each of the processes Y and Z reads x from
memory, decrements by two, stores it to memory, and then terminates. Each process before
reading x invokes the P operation (i.e. wait) on a counting semaphore S and invokes the V
operation (i.e. signal) on the semaphore S after storing x to memory. Semaphore S is
initialised to two. What is the maximum possible value of x after all processes complete
execution?
Process W Process X Process Y Process Z
Wait(s) Wait(s) Wait(s) Wait(s)
Read (x) Read (x) Read (x) Read (x)
x= x+1; x=x+1; x=x-2; x= x-2;
write (x) write (x) write (x) write (x)
signal (s) Signal(s) Signal(s) Signal (s)
initially, counting semaphore S is initialised with value 2
A. -2
B. -1
C. 1
D. 2

A process executes the following code

for(i=0; i<n; i++)


{
fork();
}
The total number of child processes created is

A. 2
B. 2n
C. 2n
D. 2n-1

A counting semaphore S is initialized to 7. Then, 20 P operations and 15 V operations are


performed on S. What is the final value of S?
(A) 5
(B) 2
(C) 6
(D) 3

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-

Process Id Arrival time Burst time


P1 0 4
P2 1 5
P3 2 2
P4 3 1
P5 4 6
P6 6 3

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-

Process Id Arrival time Burst time


P1 0 20
P2 15 25
P3 30 10
P4 45 15

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-

Process Id Arrival time Burst time Priority


P1 0 4 2
P2 1 3 3
P3 2 1 4
P4 3 5 5
P5 4 2 5
If the CPU scheduling policy is priority preemptive, calculate the average waiting time and
average turnaround time. (Higher number represents higher priority)
A) 7.6 unit and 4.6 unit
B) 8.6 unit and 5.7 unit
C) 7.2 unit and 4.0 unit
D) 8.4 unit and 4.1 unit

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

The number of processes completed per unit time is known as __________


a) Output
b) Throughput
c) Efficiency
d) Capacity

Which of the following do not belong to queues for processes?


a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue

What is a medium-term scheduler?


a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
Restricting the child process to a subset of the parent’s resources prevents any process from
__________
a) overloading the system by using a lot of secondary storage
b) under-loading the system by very less CPU utilization
c) overloading the system by creating a lot of sub-processes
d) crashing the system by utilizing multiple resources

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

Which one of the following is not true?


a) kernel is the program that constitutes the central core of the operating system
b) kernel is the first part of operating system to load into memory during booting
c) kernel is made of various modules which can not be loaded in running operating system
d) kernel remains in the memory during the entire computer session.

The OS X has ____________


a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules

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

In operating system, each process has its own __________


a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned
The number of processes completed per unit time is known as __________
a) Output
b) Throughput
c) Efficiency
d) Capacity

Which combination of the following features will suffice to characterize an OS as a


multi-programmed OS?
(a) More than one program may be loaded into main memory
at the same time for execution.
(b) If a program waits for certain events such as I/O,
another program is immediately scheduled for execution.
(c) If the execution of program terminates, another program
is immediately scheduled for execution.
(A) a
(B) a and b
(C) a and c
(D) a, b and c

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:
}
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

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:
}

Synchronization statements can be inserted only at points W, X, Y and Z. Which of the


following will always lead to an output starting with ‘001100110011’ ?
(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 initially 1, and T initially 0
(C) P(S) at W, V(T) at X, P(T) at Y, V(S) at Z, S and T initially 1
(D) P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S initially 1, and T initially 0

A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y,


Z as follows. Each of the processes W and X reads x from memory, increments by one,
stores it to memory and then terminates. Each of the processes Y and Z reads x from
memory, decrements by two, stores it to memory, and then terminates. Each process before
reading x invokes the P operation (i.e. wait) on a counting semaphore S and invokes the V
operation (i.e. signal) on the semaphore S after storing x to memory. Semaphore S is
initialized to two. What is the maximum possible value of x after all processes complete
execution?
Process W Process X Process Y Process Z
Wait(s) Wait(s) Wait(s) Wait(s)
Read (x) Read (x) Read (x) Read (x)
x= x+1; x=x+1; x=x-2; x= x-2;
write (x) write (x) write (x) write (x)
signal (s) Signal(s) Signal(s) Signal (s)
initially, counting semaphore S is initialized with value 2
A. -2
B -1
C 1
D 2

A process executes the following code

for(i=0; i<n; i++)


{
fork();
}
The total number of child processes created is

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

Consider the following two-process synchronization solution.


Process 0 Process 1
Entry: loop while (turn == 1); Entry: loop while (turn == 0);
(critical section) (critical section)
Exit: turn = 1; Exit turn = 0;
The shared variable turn is initialized to zero. Which one of the following is TRUE?
(A) This is a correct two-process synchronization solution.
(B) This solution violates mutual exclusion requirement.
(C) This solution violates progress requirement.
(D) This solution violates bounded wait requirement.
Two concurrent processes P1 and P2 use four shared resources R1, R2, R3 and R4, as
shown below.

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:
}

Synchronization statements can be inserted only at points W, X, Y and Z. Which of the


following will always lead to an output starting with ‘001100110011’ ?
(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 initially 1, and T initially 0
(C) P(S) at W, V(T) at X, P(T) at Y, V(S) at Z, S and T initially 1
(D) P(S) at W, V(S) at X, P(T) at Y, V(T) at Z, S initially 1, and T initially 0

A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y,


Z as follows. Each of the processes W and X reads x from memory, increments by one,
stores it to memory and then terminates. Each of the processes Y and Z reads x from
memory, decrements by two, stores it to memory, and then terminates. Each process before
reading x invokes the P operation (i.e. wait) on a counting semaphore S and invokes the V
operation (i.e. signal) on the semaphore S after storing x to memory. Semaphore S is
initialized to two. What is the maximum possible value of x after all processes complete
execution?
Process W Process X Process Y Process Z
Wait(s) Wait(s) Wait(s) Wait(s)
Read (x) Read (x) Read (x) Read (x)
x= x+1; x=x+1; x=x-2; x= x-2;
write (x) write (x) write (x) write (x)
signal (s) Signal(s) Signal(s) Signal (s)
initially, counting semaphore S is initialized with value 2
A. -2
B -1
C 1
D 2
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
P1 2 6
P2 5 2
P3 1 8
P4 0 3
P5 4 4
B) 8 B) 12 C) 9 D) 11

Consider the set of 5 processes whose arrival time and burst time are given below-

Process Id Arrival time Burst time


P1 3 1
P2 1 4
P3 4 2
P4 0 6
P5 2 3

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-

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, 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-

Process Id Arrival time Burst time


P1 3 1
P2 1 4
P3 4 2
P4 0 6
P5 2 3

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-

Process Id Arrival time Burst time Priority


P1 0 4 2
P2 1 3 3
P3 2 1 4
P4 3 5 5
P5 4 2 5

If the CPU scheduling policy is priority non-preemptive, calculate the average waiting time
and average turnaround time. (Higher number represents higher priority)

A) 8.2 unit and 5.2 unit


A) 9.2 unit and 6.2 unit
B) 7.4 unit and 5.3 unit
C) 8.9 unit and 6.4 unit

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

Out of the following, which one needs a device driver


A. Main memory
B. Disk
C. Register
D. Cache

Which of the following is the feature of the operating system


A. Error detection aids
B. Control over system performance
C. Job Accounting
D. Coordination between other software and users
E. All
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

By operating system, the resource management can be done via


A. time division multiplexing
B. space division multiplexing
C. both (a) and (b)
D. none of the mentioned

In operating system, each process has its own


A. address space and global variables
B. open files
C. pending alarms, signals and signal handlers
D. all of the mentioned

What is the ready state of a process


A. when process is scheduled to run after some execution
B. when process is unable to run until some task has been completed
C. when process is using the CPU
D. none of the mentioned

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

Round robin scheduling falls under the category of ____________


A. Non-preemptive scheduling
B. Preemptive scheduling
C. All of the mentioned
D. None of the mentioned

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

What is the main function of the command interpreter


A. to provide the interface between the API and application program
B. to handle the files in the operating system
C. to get and execute the next user-specified command
D. none of the mentioned

What is interprocess communication


A. communication within the process
B. communication between two process
C. communication between two threads of same process
D. none of the mentioned

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

Which of the following statement is True for Aging


A. Aging involves gradually increasing the priority of processes that wait in the system
for a long time
B. Aging involves gradually decreasing the priority of processes that wait in the system
for a long time
C. Aging involves gradually increasing the priority of processes that wait in the system
for a small time
D. Aging involves gradually decreasing the priority of processes that wait in the system
for a small time

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.

A. The waiting time for process P1 is 3ms


B. The waiting time for process P1 is 11ms
C. The waiting time for process P1 is 16ms
D. The waiting time for process P1 is 9ms
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

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.

A. 310 B. 324 C. 315 D. 321

What is the mean of the Booting in the operating system?


a) Restarting computer
b) Install the program
c) To scan
d) To turn off

In Operating Systems, which of the following is not a CPU scheduling algorithm?


a) Priority
b) Round Robin
c) Shortest Job First
d) Bankers Algorithm

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

In real time operating system ____________


a) process scheduling can be done only once
b) all processes have the same priority
c) kernel is not required
d) a task must be serviced by its deadline period

In operating system, each process has its own __________


a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
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

A process having multiple threads of control implies ___________


a) it can do more than one task at a time
b) it can do only one task at a time, but much faster
c) it has to use only one thread per process
d) none of the mentioned

Concurrent access to shared data may result in ____________


a) data consistency
b) data insecurity
c) data inconsistency
d) none of the mentioned

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 only
c) II and III only
d) I, II and III
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

Mutual exclusion implies that ____________


a) if a process is executing in its critical section, then no other process must be executing in
their critical sections
b) if a process is executing in its critical section, then other processes must be executing in
their critical sections
c) if a process is executing in its critical section, then all the resources of the system must be
blocked until it finishes execution
d) none 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

At a particular time of computation, the value of a counting semaphore is 7. Then 20 P


operations and 15 V operations were completed on this semaphore. The resulting value of
the semaphore is?
a) 2
b) 7
c) 42
d) 12

The following pair of processes share a common variable X.


Process A
int Y;
A1: Y = X*2;
A2: X = Y;
Process B
int Z;
B1: Z = X+1;
B2: X = Z;
X is set to 5 before either process begins execution. As usual, statements within a process
are executed sequentially, but statements in process A may execute in any order concerning
statements in process B.
How many different values of X are possible after both processes finish executing?
a) two
b) four
c) three
d) eight

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

What is a time sharing operating system?


1. Makes use of log files to do basic task
2. One shell seems to be shared
3. Allows users to use one system with two different terminals
4. All of the above

What of the following isn’t directly related to the operating system?


1. BIOS
2. Software programs
3. Hardware devices
4. All of the above

Which one of the following is not true?


1)Kernel remains in the memory during the entire computer session
2) Kernel is made of various modules which can not be loaded in running operating system
3) Kernel is the first part of the operating system to load into memory during booting
4) Kernel is the program that constitutes the central core of the operating system

What is the main purpose of an operating system's scheduler?


1) To allocate memory resources
2) To manage input/output operations
3) To prioritize processes for execution
4) To maintain file system integrity

What is the purpose of interprocess communication (IPC) in operating systems?


1) To enable processes to share data and information
2) To manage CPU scheduling
3) To control access to peripheral devices
4) To allocate memory resources

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.

In the context of synchronization, what does a "critical section" refer to?


1. A section of code that is critical for the proper functioning of the program
2. A section of code that must be executed atomically by only one process or thread at
a time
3. A section of code that handles error conditions
4. A section of code that performs I/O operations

What are the essential contents in each entry of a page table?


1. Page frame number
2. Both virtual page number and page frame number
3. Virtual page number
4. Access right information

Which of the following scheduling algorithms is non-preemptive?


1. Round Robin
2. First-In First-Out
3. Multilevel Queue Scheduling
4. Multilevel Queue Scheduling with Feedback

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

A process executes the code


fork ();
fork ();
fork ();
The total number of child processes created is
1. 3
2. 4
3. 7
4. 8

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
(1) I only
(2) I and III only
(3) II and III only
(4) I, II and III

How does a semaphore differ from a mutex?


1) A semaphore allows multiple threads to access a resource simultaneously, while a mutex
allows only one.
2) A semaphore is more efficient than a mutex.
3) A mutex can be shared across processes, while a semaphore cannot.
4) There is no difference between a semaphore and a mutex.
Consider a set of 5 processes whose arrival time. CPU time needed and the priority are
given below

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

Provide the Gantt chart for the same.


Which of the following we don’t want to achieve through process synchronization
a) Mutual Exclusion
b) Progress
c) Race Condition
d) Bounded Waiting

Which of the following given mechanisms provide mutual exclusion


a) Lock Variable and Decker Algorithm
b) Lock variable and peterson’s algorithm
c) Peterson’s algorithm and Decker Algorithm
d) None of these

In which of the following process states, a process exists in main memory.


a)Running State, Suspended wait, Ready State
b)New State, Ready, Running State
c)New State, Suspended Ready, Running State
d)Ready State, Running State, I/O wait State

Which of the following statement is incorrect


i) If time slice used in round robin is more than the maximum time required to execute
any process. Then the policy will work similar to FCFS.
ii) Processes accesses shared data at the same time it can cause data inconsistency.
iii) The portion of program text where the shared variables or the shared resources will
be placed is called PCB.
iv) The final output of any variable depends on the execution sequence of processes
this type of condition is called progress.

Options:
a) I and II
b) II and III
c) III and IV
d) IV and I

Which of the following statement is correct about multithreading.


Statements:
i) All thread shares the same program counter
ii) All thread shares their registers and data
iii) Creating a new thread in a current process requires significantly less time than
creating a new process
iv) When working with threads, context switching is faster.
Options:
a) I and IV
b) III and IV
c) II and IV
d) III and II

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

Which of the following statement are true?


I) Shortest remaining time first scheduling may cause starvation
II) Pre-emptive Scheduling may cause starvation
III) Round Robin is better than FCFS in terms of response 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

Each process Pi =1…….13 is coded as follows


While(True)
{
P(mutex)
{critical section}
V(mutex)
}
The code for P14 is identical except that it uses V(mutex) in place of P(mutex). What is the
largest number of processes that can be inside the critical section at any moment.

a)2
b)14
c) 1
d) 7

At a particular time of computation the value of a counting semaphore is 9.Then 15 P


operations and 12 V operations were completed on this semaphore. The resulting value of
the semaphore is
a)12
b)3
C)6
D)2

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.

Identify the components of an operating system that are directly involved in


managing system memory. Select all that apply.
Options:
A. Memory Manager - Handles the allocation and deallocation of memory blocks to
processes, ensuring efficient memory usage.
B. File System - Organises and manages the storing and retrieval of data on disk drives.
C. Scheduler - Determines which process will be executed by the processor at any given
time.
D. Virtual Memory Manager - Manages virtual memory, allowing processes to use more
memory than physically available by using disk space.

Which of the following strategies can be used to handle deadlocks?


Options:
A. Deadlock Prevention - Design the system in such a way that one of the necessary
conditions for deadlock is systematically negated.
B. Deadlock Avoidance - The system dynamically examines the allocation state to ensure
that a circular wait condition can never exist.
C. Deadlock Detection and Recovery - Allow the system to enter a deadlock state but then
detect it and recover.
D. Deadlock Ignorance - Ignore the problem entirely and reboot the system when a deadlock
occurs.

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.

Question: Consider the following statements regarding operating systems and


identify which aren’t correct?
Options:
A. In a microkernel operating system architecture, the microkernel provides minimal
services, including device drivers and file system management.
B. In a monolithic kernel, all operating system services run along with the main kernel thread
in a single address space, enhancing performance but potentially decreasing system
reliability.
C. Banker's algorithm is used in operating systems to avoid deadlock situations by ensuring
that a system does not allocate its resources in a manner that can lead to a deadlock.
D. Virtual memory allows an operating system to use hard disk space to simulate extra
memory, but it cannot be used to isolate the address spaces of different processes.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy