Sample Paper
FINALTERM EXAMINATION
Fall 2022
CS604 – Operating System
Time: 90 min
Marks: 60
Question No: 1 (Marks: 01) - Please choose the correct option
An operating system is _______
A. An interface between the user program and application programs
B. A collection of programs that manages hardware resources ✔️
C. Application software that provide services to user programs
D. Service provider do not deal with the application programs
Question No: 2 (Marks: 01) - Please choose the correct option
Which of the following is not an operating system?
A. Windows
B. Linux
C. Oracle✔️
D. DOS
Question No: 3 (Marks: 01) - Please choose the correct option
________is the interface provided by the operating system to access the system services.
A. Library
B. System calls
C. Assembly instructions
D. API✔️
Question No: 4 (Marks: 01) - Please choose the correct option
CPU scheduling is the basis of ___________
A. multiprogramming operating systems✔️
B. larger memory sized systems
C. multiprocessor systems
D. none of the mentioned
Question No: 5 (Marks: 01) - Please choose the correct option
Which one of the following is not a real time operating system?
A. RTLinux
B. Palm OS✔️
C. QNX
D. VxWorks
Question No: 6 (Marks: 01) - Please choose the correct option
Which of the following is a single-user operating system?
A. Windows
B. MAC
E. Ms-Dos✔️
C. Linux
Question No: 7 (Marks: 01) - Please choose the correct option
The list of processes is placed in _______ that are prepared to be executed and waiting
for CPU.
A. Job queue
B. Ready queue✔️
C. Execution queue
D. Process queue
Question No: 8 (Marks: 01) - Please choose the correct option
Which of the following is main drawback of semaphore?
A. Deadlock
B. Starvation
C. Busy waiting✔️
D. Block
Question No: 9 (Marks: 01) - Please choose the correct option
The round-robin scheduling is a/an __________.
A. Linear data scheduling
B. Non-linear data scheduling
C. Preemptive scheduling✔️
D. Non-preemptive scheduling
Question No: 10 (Marks: 01) - Please choose the correct option
Which of the following does not interrupt the running process?
A. Timer interrupt
B. Device
C. Power failure
D. Scheduler process✔️
Question No: 11 (Marks: 01) - Please choose the correct option
Which of the following "semaphore" can take the non-negative integer values?
A. Binary Semaphore
B. Counting Semaphore✔️
C. Real Semaphore
D. Integer Semaphore
Question No: 12 (Marks: 01) - Please choose the correct option
The resource management can be done in an operating system via
A. Space division multiplexing
B. Both time and space division multiplexing✔️
C. Time division multiplexing
D. Real time multiplexing
Question No: 13 (Marks: 01) - Please choose the correct option
Processes are in deadlock condition, if _______
A. All processes are trying to kill each other
B. Each process is terminated
C. Each process is blocked and waiting for each other resources✔️
D. All resources are free and each process request is accepted
Question No: 14 (Marks: 01) - Please choose the correct option
Which of the following statement caused the “violation of mutual exclusion”?
A. Statement B in P0 only executed after statement A has been executed in P1.
B. P0 grabs semaphore S and waits for semaphore Q which is hold by P1.
C. Semaphore S concurrently executed by P0and P1.✔️
D. P0 wait for semaphore S and will remain so forever.
Question No: 15 (Marks: 01) - Please choose the correct option
Single thread of control allows process to perform ________.
A. Multiple tasks at a time
B. Only two tasks at a time
C. Both A & B
D. Only one task at a time✔️
Question No: 16 (Marks: 01) - Please choose the correct option
Long-term scheduler is____?
A. It selects which process has to be executed next and allocates CPU
B. It selects which process has to be brought into the ready queue✔️
C. Both A & B
D. It selects which process to remove from memory by swapping
Question No: 17 (Marks: 01) - Please choose the correct option
Which of the following is a synchronization tool?
A. Pipe
B. Thread
C. Socket
D. Semaphore✔️
Question No: 18 (Marks: 01) - Please choose the correct option
In Multilevel feedback scheduling algorithm
A. Processes are not classified into groups
B. A process can move to a different classified ready queue✔️
C. Classification of the ready queue is permanent
D. Processes are classified into multiple waiting queues
Question No: 19 (Marks: 01) - Please choose the correct option
__________ that can be loaded into adjacent “holes” in the main memory.
A. Segments
B. Frames
C. Partitions
D. Pages✔️
Question No: 20 (Marks: 01) - Please choose the correct option
The mutual exclusion condition must hold for________.
A. Non-sharable resources✔️
B. Sharable resources
C. Dependent processes
D. Independent processes
Question No: 21 (Marks: 01) - Please choose the correct option
In Operating System we use a process synchronization tool called a semaphore.
Semaphore is a/an____________.
A. float variable
B. character variable
C. integer variable✔️
D. sub variable
Question No: 22 (Marks: 01) - Please choose the correct option
High-level synchronization construct is called the ________.
A. signal
B. monitor✔️
C. checker
D. controller
Question No: 23 (Marks: 01) - Please choose the correct option
In deadlock characteristics we restrict that at least one resource must be held in non-
shareable mode; that is only one process is allowed to use the resource is
called__________.
A. Mutual exclusion:✔️
B. Semaphore
C. Signal
D. Circular wait
Question No: 24 (Marks: 01) - Please choose the correct option
Deadlock handling technique that each process will give the advance information like
which resource will be requested during their life time is called_______.
A. deadlock prevention
B. deadlock avoidance✔️
C. deadlock stopping
D. deadlock creation
Question No: 25 (Marks: 01) - Please choose the correct option
A System is in _______ if the system can allocate resources to each process in some
order and still avoid a deadlock.
A. Unsafe state
B. Safe state✔️
C. Remainder state
D. Waiting state
Question No: 26 (Marks: 01) - Please choose the correct option
A ______Pi →Rj indicates that process Pi may request resource Rj at some time in the
future.
A. request edge
B. claim edge✔️
C. system edge
D. first edge
Question No: 27 (Marks: 01) - Please choose the correct option
In _______ when new process enters the system, it must declare the maximum
number of instances of each resource type that it may need.
A. Response algorithm
B. Banker algorithm✔️
C. Request algorithm
D. Debit algorithm
Question No: 28 (Marks: 01) - Please choose the correct option
In Banker algorithm ___________means that process Pi may request at most k instances
of Resource Rj
A. Max[k, i] = = j
B. Max[i, j] = = k✔️
C. Max[i, k] = = j
D. Max[k, j] = = i
Question No: 29 (Marks: 01) - Please choose the correct option
We obtain _______ from the resource allocation graph by removing the nodes of type
resource and collapsing the appropriate edges.
A. wait-cycle graph
B. wait-for graph.✔️
C. Wait-sub graph
D. Wait-line graph
Question No: 30 (Marks: 01) - Please choose the correct option
In resource preemption _________ indicates that, which resources and which processes
are to be pre-empted.
A. Rollback
B. Starvation
C. Selecting a Victim✔️
D. prioritization
Question No: 31 (Marks: 01) - Please choose the correct option
The compiler must generate the _________ code, where the process to be resided in
physical memory.
A. One-link
B. re-locatable ✔️
C. Stackable
D. Three-link
Question No: 32 (Marks: 01) - Please choose the correct option
In __________ a process is not loaded until it is called in a program.
A. Static loading
B. Dynamic loading✔️
C. Fuzzy loading
D. Segment loading
Question No: 33 (Marks: 01) - Please choose the correct option
Logical address is divided into two parts ______ and ________.
A. Stack number p, stack offset d
B. Page number p, page offset d✔️
C. Push number p, and pop number d
D. Queue number p and stack number d
Question No: 34 (Marks: 01) - Please choose the correct option
Physical address is divided into two parts ______ and ________.
A. Stack number p, offset d
B. frame number f, offset d✔️
C. Push number p, and offset d
D. Queue number p and stack offset d
Question No: 35 (Marks: 01) - Please choose the correct option
In physical address we have 64 number of frames i.e., f=64 then
f = ceiling [log2 64] bits = _____ bits
A. 8
B. 9
C. 4
D. 6✔️
Question No: 36 (Marks: 01) - Please choose the correct option
Which of the following is true about the Hashed Page Table?
A. It has Page number, frame number for the page, and pointer to the previous
element—(p, f, prev).
B. It has Page number, frame number for the page, and pointer to the next element—
(p, f, next).✔️
C. It has Segment number, page number for the page, and pointer to the previous
element—(s, f, prev).
D. It has Segment offset, frame number for the page, and pointer to the previous
element—(s, f, prev).
Question No: 37 (Marks: 01) - Please choose the correct option
____________is a memory management scheme that supports programmer’s view of
memory.
A. Hashing
B. Segmentation✔️
C. Paging
D. synchronization
Question No: 38 (Marks: 01) - Please choose the correct option
______ happens if the process tries to access a page that has not been brought into
memory.
A. Page fault✔️
B. Page drop
C. Segment line
D. Page stop
Question No: 39 (Marks: 01) - Please choose the correct option
In _________frames are equally divided among all the processes.
A. Fixed allocation✔️
B. Priority allocation
C. Proportional Allocation
D. Simple Allocation
Question No: 40 (Marks: 01) - Please choose the correct option
If a process is in ____________if it is spending more time in paging (i.e., swapping pages
in and out) than executing.
A. Thrashing✔️
B. Segmenting
C. Starting
D. Scaling
Question No: 41 (Marks: 03)
List down any three features of Operating System.
Here are three key features of an Operating System:
1. Process Management:
1. Memory Management:
1. File System Management
Question No: 42 (Marks: 03)
Write down the types of Semaphore.
1. Binary Semaphore
2. Counting Semaphore
Question No: 43 (Marks: 03)
Consider a process with its segment 15 having 5096 bytes. The process generates a
logical address (15,3921). Where Page size = 1 KB
How many pages does the segment have?
What page does the logical address refer to?
*Number of pages in segment 15:*
Segment size = 5096 bytes
Page size = 1 KB = 1024 bytes
Number of pages = Segment size / Page size
= 5096 / 1024
= 5 (with remainder)
Since the remainder is non-zero, we round up:
Number of pages = 6
*Page referenced by logical address (15, 3921):*
Offset = 3921 bytes
Page size = 1024 bytes
Page number = Offset / Page size
= 3921 / 1024
= 3 with remainder 897
Page referenced = 3
Byte offset within page = 897
Question No: 44 (Marks: 03)
In performance of paging, you are required to find the effective Memory access time
where.
Tmem (Time to Access memory) = 110 nsec
TTLB (Time to Access Look Aside Buffer) = 30 nsec
Hit ratio is 90%
Effective Memory Access Time (EMAT) calculation:
EMAT = (Hit Ratio x TTLB) + ((1 - Hit Ratio) x (TTLB + Tmem))
Given values:
Tmem = 110 ns
TTLB = 30 ns
Hit Ratio = 90% = 0.9
EMAT = (0.9 x 30) + ((1 - 0.9) x (30 + 110))
= 27 + (0.1 x 140)
= 27 + 14
= 41 ns
Effective Memory Access Time (EMAT) is 41 ns.
Want to optimize paging performance for your business applications?
Question No: 45 (Marks: 03)
Differentiate between the deadlock and starvation strategies in terms of process handling.
Deadlock:
- Multiple processes blocked indefinitely
- Each waits for resources held by others
- Prevention, avoidance, detection, and recovery strategies
Starvation:
- One process denied resources for extended period
- Other processes continuously access shared resources
- Priority scheduling, round robin, and fair resource allocation strategies
Main difference:
- Deadlock: Multiple processes blocked
- Starvation: One process denied resources
Question No: 46 (Marks: 03)
Explain the mounting of the file system, also differential between remote mounts and
Local mounts.
Remote mounts are done on a remote system on which data is transmitted over a
telecommunication line. Local mounts are mounts done on your local system.
*Mounting a File System:*
Mounting a file system is the process of attaching a file system to a directory (called
the mount point) on a computer, making its files and directories accessible to users
and applications.
*Local Mount:*
- Occurs on the same computer system
- File system resides on local storage (hard drive, SSD)
- Faster data access and lower latency
- Example: Mounting a USB drive or internal hard drive
*Remote Mount:*
- Occurs on a remote computer system
- File system accessed over a network connection (telecommunication line)
- Data transmitted through protocols like NFS (Network File System), SMB (Server
Message Block)
- Slower data access and higher latency due to network dependence
- Example: Mounting a network drive or cloud storage
*Key differences:*
- Location: Local (same system) vs. Remote (different system)
- Storage: Local storage vs. Network storage
- Performance: Local (faster) vs. Remote (slower)
- Access: Local (direct) vs. Remote (network-dependent)
Question No: 47 (Marks: 05)
What are the benefits of micro kernel approach? Write down any two benefits.
Two benefits of Microkernel approach:
1. Enhanced Security:
- Smaller kernel size reduces attack surface
- Easier to test and verify kernel components
- Improved isolation between system components
1. Flexibility and Portability:
- Easier to modify or replace kernel components
- Supports multiple operating systems and architectures
- Simplifies addition of new features and device drivers
Question No: 48 (Marks: 05)
See the following resource allocation graph. Does it contain deadlock? Also identify the
processes that create cycle in this graph.
Question No: 49 (Marks: 05)
In Contiguous memory allocation by using overlays, we can run the process larger than
the amount of memory allocated to it. Suppose we have following,
Available main memory: 150k
Code size: 200k
How can we run the above code using overlays with the help of a two-pass compiler?
To run a process larger than available memory using overlays:
*Overlays:* Divide code into smaller modules (overlays) that fit in available memory.
*Two-Pass Compiler:*
Pass 1:
- Compile entire code
- Identify non-essential modules (overlays)
Pass 2:
- Load essential modules into available memory (150k)
- Load non-essential modules (overlays) as needed, replacing unused modules
*Steps to run 200k code in 150k memory:*
1. Divide code into overlays (e.g., 3 modules of 50k, 50k, and 100k)
Module 1 (50k): Essential functions
Module 2 (50k): Less frequently used functions
Module 3 (100k): Rarely used functions
1. Load Module 1 (50k) and required data into memory
1. When Module 2 is needed:
- Swap out unused portion of Module 1 (or other non-essential code)
- Load Module 2 (50k) into memory
1. When Module 3 is needed:
- Swap out unused portions of Module 1 and 2
- Load Module 3 (100k) into memory, potentially using virtual memory or disk swapping
*Benefits:*
- Run larger programs in smaller memory
- Efficient use of memory
*Limitations:*
- Increased complexity
- Performance overhead due to overlay swapping
Want to optimize memory usage for your business applications?
Question No: 50 (Marks: 05)
Assume a logical address space of 32 pages of 512 words, each mapped into a physical
memory of 64 frames. You are required to calculate following parameters.
No. of bits needed for p = ?
No. of bits neede for f = ?
No. of bits needed for d = ?
Logical address size (bits) = ?
Physical address size (bits) = ?