Cs3451-Ios QS Bank
Cs3451-Ios QS Bank
DEPT OF CSE
1
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
PART – A
1. List and briefly define the four main elements of a computer? [R]
Processor – Controls the operation of the computer & performs its data processing functions
Main memory – Stores data & programs.it is volatile.
I/O modules – Move data between the computer & its external environment such as disks, communication
equipment & terminals.
System Bus – Provides for communication among processors, main memory & I/O modules.
2. Define the two main categories of processor register? [R]
Two categories are
User- visible registers: - It Enable the machine or assembly language programmer to minimize main memory
references by optimizing register use.
Control & Status registers: - Registers used by the processor to control the operation of the processor.
3. In general terms, what are the four distinct actions that machine instruction can specify? [An]
Processor – Memory
Processor –I/O
Data Processing
Control
4. What is an Interrupt? [R]
Interrupt are provided primarily as way to improve processor utilization.
It is a mechanism by which other modules( I/O, Memory) may interrupt the normal sequencing of the
processor.
Classes of interrupts:-
Program
Timer
I/O
Hardware failure
3
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
8. What is the distinction b/w spatial locality & temporal locality? [An]
Temporal locality refers to the reuse of specific data and/or resources within relatively small time durations.
Spatial locality refers to the use of data elements within relatively close storage locations.
Sequential locality, a special case of spatial locality, occurs when data elements are arranged and accessed linearly,
e.g., traversing the elements in a one- dimensional array.
9. Define Locality of Reference [R]
Locality of reference, also known as the principle of locality, is the phenomenon of the same value or related
storage locations being frequently accessed.
There are two basic types of reference locality.
o Temporal locality refers to the reuse of specific data and/or resources within relatively small time durations.
o Spatial locality refers to the use of data elements within relatively close storage locations.
o Sequential locality, a special case of spatial locality, occurs when data elements are arranged and accessed linearly,
e.g., traversing the elements in a one- dimensional array.
10. What is an operating system? (NOV/DEC 2013) [R]
An operating system is a program that manages the computer hardware. it act as an intermediate between a
user‘s of a computer and the computer hardware. It controls and coordinates the use of t h e hardware among the
various application programs for the various users.
5
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Inter process Communication
I/O Device Management
Information Processing & Maintenance
6
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
3. When a user is travelling and doesn't have laptop to carry around, they can connect remotely to a time-shared
system and do their work.
27. Do timesharing differ from Multiprogramming? If so, How?(APR/MAY 2015) [An]
Time Sharing: here, OS assigns some time slots to each job. Here, each job is executed according to the allotted
time slots.
Job1: 0 to 5 Job2: 5 to 10 Job3: 10 to 15
Multi-Tasking: in this operating system, jobs are executed in parallel by the operating system. But, we
can achieve this multi-tasking through multiple processors (or) multicore CPU only.
CPU1: Job1 CPU2: Job2 CPU3: Job3
28. Why API s need to be used rather than system calls?(APR/MAY 2015) [An]
System calls are much slower than APIs (library calls) since for each system call, a context switch has to occur to
load the OS (which then serves the system call).Most details of OS interface hidden from programmer by API Managed by
run-time support library (Set of functions built into libraries included with compiler.)
29. Describe the actions taken by a thread library to context switch between user- level threads. [An]
The user-level threads are known only within a given process. To context switch, we only need to save the thread-
specific context: the program counter, CPU registers, and the thread-specific stack pointer
30. What is the purpose of system programs? (May/Jun 2016) [R]
System programs can be thought of as bundles of useful system calls. They provide basic functionality to users so
that users do not need to write their own programs to solve common problems.
31. What are the advantages of peer-to-peer systems over client-server systems? (May/Jun 2016) [R]
It is easy to install and so is the configuration of computers on this network, all the resources and contents are
shared by all the peers, unlike server-client architecture where Server shares all the contents and resources.
P2P is more reliable as central dependency is eliminated. Failure of one peer doesn‘t affect the functioning of other
peers. In case of Client –Server network, if server goes down whole network gets affected.
7
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
There is no need for full-time System Administrator. Every user is the administrator of his machine. User can
control their shared resources.
The over-all cost of building and maintaining this type of network is comparatively very less.
32. Compare and contrast DMA and cache memory. (Nov/Dec 2015) [An]
DMA is a hardware device that can move to/from memory without using CPU instructions.
For instance, a hardware device (lets say, your PCI sound device) wants audio to play back. You can either:
Write a word at a time via a CPU mov instructions.
Configure the DMA device. You give it a start address, a destination, and the number of bytes to copy. The transfer
now occurs while the CPU does something else instead of spoon feeding the audio device.
DMA can be very complex (scatter gather, etc), and varies by bus type and system.
33. Write the difference between Batch systems and Time sharing systems. (Nov/Dec 2015) [An]
A batch is a sequence of jobs. This batch is submitted to batch processing operating systems, and output would
appear some later time in the form of a program or as program error. To speed up processing similar jobs are
batched together.
The major task of batch operating systems is to transfer control automatically from one job to next. Here the
operating is always in the memory.
Time sharing or multi-tasking is a logical execution of multiprogramming. Multiple jobs are executed by the CPU
switching between them. Here the computer system provides on line communication between the user and the
system.
Here the CPU is never idle. Time shared operating system allows many users to share the computer simultaneously.
Time sharing systems requires some sort of memory management and protection.
34. How does an interrupt differ from a trap or what is the difference between trap and interrupt? (NOV/DEC 2016)
[An] (APR/MAY 2018)
An interrupt handler is called to deal with the cause of the interrupt; control is then returned to the interrupted
context and instruction. A trap is a software-generated interrupt. An interrupt can be used to signal the completion of an
I/O to obviate the need for device polling.
35. What are the disadvantages of multiprocessor systems? (NOV/DEC 2016) [R]
If one processor fails then it will affect in the speed
Multiprocessor systems are expensive.
Complex OS is required.
It's more complex.
It requires context switching which slightly impacts
36. Consider memory systems with a cache access time of 10 ns and a memory access time of 110 ns-assume the
memory access time includes the time to check the cache. if the effective access time is 10 % greater than the
cache access time, What is the hit ration H? (APR/MAY 2017) [E]
8
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
37. What are the objectives of operating systems? (APR/MAY 2017) [R] (NOV/DEC 2017) [R]
An OS is a program that controls the execution of application programs and acts as an interface between
applications and the computer hardware. Objectives of OS: Convenience: An OS makes a computer more convenient to
use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.
38. What is SYS GEN and system boot ?[R] (NOV/DEC 2017) (NOV/DEC 2021)
SYS GEN :It is the Short for SYStem GENeration, sysgen is a utility that enables an operating system to configure
hardware and software setups properly.
System Boot:
Booting the system is done by loading the kernel into main memory, and starting its execution.
The CPU is given a reset event, and the instruction register is loaded with a predefined memory location,
where execution starts.
39. Mention the purpose of system calls.[R] (APR/MAY 2018)
System calls allow user-level processes to request services of the operating system.
If a file system requires the creation or deletion of files.
Reading and writing from files also require a system call.
Creation and management of new processes.
Network connections also require system calls. This includes sending and receiving packets.
Access to a hardware devices such as a printer, scanner etc. requires a system call.
40. What is dual mode operation and what is the need of it?(APRIL/MAY 2019) In monitor mode, the CPU can
use all instructions and access all areas of memory.
In user mode, the CPU is restricted to unprivileged instructions and a specified area of memory. User code should
always be executed in user mode and the OS design ensures that it is.
41. Distinguish between Multicore and Multiprocessor. (NOV/DEC 2021)
Multicore systems have a single processor with multiple processing units. These processing units are termed cores.
On the other hand, multiprocessor systems have two or more processors. A multiprocessor system is much more
reliable than a multicore system but a multiprocessor system has a complex configuration compared to a multicore
system. Both multicore processors and multiprocessors are used to speeding up the computing process of the system.
PART – B &C
1. Explain Operating System Structure and components. [R] (APRIL/MAY 2010, NOV/DEC 2013)
2. Discuss multiprocessor systems in detail. [U] (MAY/JUNE 2013)
3. Explain in detail the types of system calls provided by a typical operating system.
4. Explain the purpose of system calls and discuss the calls related to device management and communications in brief.
[An] (MAY/JUNE 2014) 9
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
5. Explain the concepts of virtual machines, their implementation and benefits in details.[An] (MAY/JUNE 2014)
6. What is a virtual machine? List out the advantages of virtualization. Explain the creation of a Virtual machine with
a architecture diagram [An] (NOV/DEC 2013)
7. Write short notes on operating system services and components. [U] (MAY/JUNE 2012)
8. Write in detail about the real time system and multiprocessor system. [U]
9. Explain the various types of System calls with an example for each?[U] (APR/MAY 2015)
10. Discuss about the functionality of system boot with respect to operating system. [An] (APR/MAY 2015)
11. Discuss about the evolution of virtual machines. Also explain how virtualization could be implemented in
operating systems. [Ap] (APR/MAY 2015)
12. Sketch the structure of Direct Memory Access in detail. [U] (APR/MAY 2015)
13. (i) With neat sketch discuss computer system overview
(ii) Enumerate the different operating system structure and explain with neat sketch.
2021) ii)What is function of DMA operation? Explain with neat diagram. (6)
28. (i) Discuss in detail about the varies memory hierarchies with neat block diagram. (7)
(ii) Discuss about the functionality of system boot with respect to operating system. (6) (NOV/DEC
2021)
UNIT-2
PART – A
1. Define Process?[R]
A Process can be thought of as a program in execution. A process will need certain resources such as CPU time, memory,
files & I/O devices to accomplish its task.
Draw & briefly explain the process states?[U] or Name and draw five different process states with proper definition.
(NOV/DEC 2017)
2. What is process control block? List out the data field associated with PCB. (APR/MAY2015)[R]
Each process is represented in the operating system by a process control block also called a task control block. (PCB) also
called a task control block.
Process state
Process number
Program counter
CPU registers
Memory limits
11
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
List of open files
Accounting information
o A process is independent if it cannot affect or be affected by the other processes executing in the system.
o A process that does not share data with any other process is independent. Cooperating process:
o A process is co-operating if it can affect or be affected by other processes executing in the system.
o Any process that shares data with any other process is cooperating.
5. What are the benefits of multithreaded programming? [R]
The benefits of multithreaded programming can be broken down into four major categ ories
Responsiveness
Resource sharing
Economy scalability
6. What is a thread?[R]
A thread otherwise called a lightweight process (LWP) is a basic unit of CPU uti lization, it comprises of a
thread id, a program counter, a register set and a stack. It shares with otherthreads belonging to the same process its code
section, data section, and opera ting system resources such as open files and signals.
• Deferred cancellation: The target thread can periodically check if it should terminate, allowing the target thread
an opportunity to terminate itself in an orderly fashion.
18. Define PThreads[R]
PThreads refers to the POSIX standard defining an API for thread creation and synchronization. This is a
specification for thread behavior, not an implementation.
19. What is critical section problem?[R]
14
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Consider a system consists of 'n' processes. Each process has segment of code called a critical section, in which the
process may be changing common variables, updating a table, writing a file. When one process is executing in its critical
section, no other process can be allowed to execute in its critical section.
21. What are the requirements that a solution to the critical section problem must satisfy?[R]
The three requirements are
Mutual exclusion
Progress & Bounded waiting
15
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
The general structure:
do {
entry section
critical section
exit section
remainder section
} while(1);
24. Give two hardware instructions and their definitions which can be used for implementing mutual
exclusion.[An]
TestAndSet
boolean TestAndSet (boolean &target)
{
boolean rv = target; target =
true;
return rv;
}
Swap
void Swap (boolean &a, boolean &b)
{
boolean temp = a;
a = b;
b = temp;
}
25. What is semaphore? Mention its importance in operating system. (APRIL/MAY 2010, NOV/DEC 2012)[R]
A semaphore 'S' is a synchronization tool which is an integer value that, apart from initialization, is accessed
only through two standard atomic operations; wait and
signal. Semaphores can be used to deal with the n-process critical section problem. It can be also used to solve
various Synchronization problems.
26. How the mutual exclusion may be violated if the signal and wait operations are not executed automatically
(MAY/JUNE 2014)[An]
A wait operation atomically decrements the value associated with a semaphore. If two wait operations are executed on a
semaphore when its value is1, if the two operations are not performed atomically, then it is possible that both operations
might proceed to decrement the semaphore value, thereby violating mutual exclusion
27. Define CPU scheduling.[R]
CPU scheduling is the process of switching the CPU among various processes. CPU scheduling is the basis of multi
programmed operating systems. By switching the CPU among processes, the operating system can make the computer more
productive.
28. What is preemptive and non-preemptive scheduling? [An] (NOV/DEC 2008
,APRIL/MAY2010, MAY /JUNE 2012)
Under non preemptive scheduling once the CPU has been allocated to a process, the process keeps the CPU until it
releases the CPU either by terminating or switching to the waiting state.
16
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Preemptive scheduling can preempt a process which is utilizing the CPU in between its execution and give the CPU
to another process.
29. What is a Dispatcher?[R]
The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler. This
function involves:
Switching context.
Switching to user mode.
Jumping to the proper location in the user program to restart that program.
When a process switches from the running state to the waiting state, such as for an I/O request or invocation of the
wait ( ) system call.
When a process switches from the running state to the ready state, for example in response to an interrupt.
When a process switches from the waiting state to the ready state, say at completion of I/O or a return
from wait ( ).
When a process terminates.
A process requests resources; if the resources are not available at that time, the process enters a wait state. Waiting
processes may never again change state, because the
resources they have requested are held by other waiting processes. This situation is called a deadlock.
36. What is the sequence in which resources may be utilized?[R]
Under normal mode of operation, a process may utilize a resource in the following sequence:
Request: If the request cannot be granted immediately, then the requesting process must wait until it can
acquire the resource.
Use: The process can operate on the resource.
Release: The process releases the resource.
37. What are conditions under which a deadlock situation may arise? (MAY/JUNE 2009 , MAY/JUNE 2012,
MAY/JUNE 2013) (NOV/DEC 2013) [R]
17
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
A deadlock situation can arise if the following four conditions hold simultaneously in a system:
a. Mutual exclusion
b. Hold and wait
c. No pre-emption
d. Circular wait
38. What is a resource-allocation graph? [R]
Resource allocation graph is directed graph which is used to describe deadlocks. This graph consists of a set of
vertices V and a set of edges E. The set of vertices V is partitioned into two different types of nodes; P the set consisting of
all active processes in the system and R the set consisting of all resource types in the system.
39. Define request edge and assignment edge. [R]
A directed edge from process Pi to resource type Rj (denoted by Pi → Rj) is called as request edge; it signifies that
process Pi requested an instance of resource type Rj and is currently waiting for that resource. A directed edge from
resource type Rj to process Pi (denoted by Rj → Pi) is called an assignment edge; it signifies that an instance of
resource type has been allocated to a process Pi.
40. What are the methods for handling deadlocks? (APRIL/MAY 2011)[R]
The deadlock problem can be dealt with in one of the three ways:
1. Use a protocol to prevent or avoid deadlocks, ensuring that the system will never enter a deadlock state.
2. Allow the system to enter the deadlock state, detect it and then recover.
3. Ignore the problem all together, and pretend that deadlocks never occur in the system.
41. How real-time Scheduling does differs from normal scheduling? (NOV/DEC 2012) [R]
In a normal Scheduling, we have two types of processes. User process & kernel Process. Kernel processes have
time constraints. However, user processes do not have time constraints.
In a RTOS, all process are Kernel process & hence time constraints should be strictly followed. All process/task
(can be used interchangeably) are based on priority and time constraints are important for the system to run correctly.
42. What do you meant by short-term scheduler (NOV/DEC 2010) [R]
The selection process is carried out by the short-term scheduler or CPU scheduler.
The scheduler selects the process form the process in memory that is ready to execute and allocates the CPU to the
process.
43. What is the concept behind strong semaphore and spinlock? (NOV/DEC 2015) [R]
A spinlock is one possible implementation of a lock, namely one that is implemented by busy waiting ("spinning").
A semaphore is a generalization of a lock (or, the other way around, a lock is a special case of a semaphore). Usually, but not
necessarily, spinlocks are only valid within one process whereas semaphores can be used to synchronize between different
processes, too.
A semaphore has a counter and will allow itself being acquired by one or several
threads, depending on what value you post to it, and (in some implementations)
depending on what its maximum allowable value is.
43. What is the meaning of the term busy waiting? (May/Jun 2016) [R]
Busy waiting means that a process is waiting for a condition to be satisfied in a tight loop without relinquish the
processor. Alternatively, a process could wait by relinquishing the processor, and block on a condition and wait to be
awakened at some appropriate time in the future.
44. Distinguish between CPU-bounded and I/O bounded processes (NOV/DEC 2016) [An]
CPU Bound means the rate at which process progresses is limited by the speed of the CPU. A task that performs
calculations on a small set of numbers, for example multiplying small matrices, is likely to be CPU bound.
I/O Bound means the rate at which a process progresses is limited
18 by the speed of the I/O subsystem. A task that processes
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
data from disk, for example, counting the number of lines in a file is likely to be I/O bound.
45. What resources are required to create threads (NOV/DEC 2016) [R]
When a thread is created, the thread does not require any new resources to execute the thread shares the resources
like memory of the process to which they belong. The benefit of code sharing is that it allows an application to have several
different threads of activity all within the same address space.
46. ”Priority inversion is a condition that occurs in real time systems where a low priority process is starved
because higher priority processes have gained hold of the CPU”-Comment on this statement. (APR/MAY 2017) [An]
Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a
lower priority task effectively "inverting" the relative priorities of the two tasks. This violates the priority model that high
priority tasks can only be prevented from running by higher priority tasks and briefly by low priority tasks which will
quickly complete their use of a resource shared by the high and low priority tasks.
47. Differentiate single threaded and multi-threaded processes. (APR/MAY 2017) [An]
S.No. Multithreaded Programming Single Threaded Programming
1 In this type of programming multiple threads run at the In this type of programming a single thread runs at a
same time time.
2 Multi-threaded model doesn‘t use event loop with polling Single threaded model uses a process event loop with
polling
3 CPU time is never wasted. CPU time is wasted.
4 Idle time is minimum. Idle time is more.
5 It results in more efficient programs. It results in less efficient programs.
6 When one thread is paused due to some reason, other When one thread is paused, the system waits until this
threads run as normal. thread is resumed.
48. Elucidate mutex locks with its procedure. (NOV/DEC 2017)
Mutex is a program object that allows multiple program threads to share the same resource, such as file access, but
not simultaneously. When a program is started a mutex is created with a unique name. After this stage, any thread that needs
the resource must lock the mutex from other threads while it is using the resource. The mutex is set to unlock when the data
is no longer needed or the routine is finished. In mutex locks approach, in the entry section of code, a LOCK is acquired over
the critical resources modified and used inside critical section, and in the exit section that LOCK is released. As the resource
is locked while a process executes its critical section hence no other process can access it.
49. What are the benefits of synchronous and asynchronous communication? (APR/MAY 2018)
Benefits of synchronous communication:
Synchronous communication enables flexibility and offer higher availability.
There‘s less pressure on the system to act on the information or immediately respond in some way.
Also, one system being down does not impact the other system. For example, emails –thousands of emails can
be sent without having to revert back..
Benefits of Asynchronous communication:
Asynchronous message passing allows more parallelism.
Since a process does not block, it can do some computation while the message is in transit.
In the case of receive, this means a process can express its interest in receving messages on multiple ports
simultaneously.
50. Give a programming example in which multithreading does not provide better performance than single-
threaded solutions. (APR/MAY 2018)
Multi-threading does not perform well for any sequential program. For example; program to calculate an individual
tax return. Another example where multithreading does not work good would be shell program like ―Korn‖ shell.
51. Give the queuing diagram representation of process scheduling. (APR/MAY 2019)
19
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
52. List out the benefits and challenge of thread handling. (APR/MAY 2019)
Benefits
Responsiveness.
Resource sharing
Economy
Scalability.
Challenges
Dividing activities
Balance
Data splitting
Data dependency
Testing and debugging
PART-B&C
1) Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First and Round Robin (time slice = 2)
scheduling algorithms with Gantt charts for the four Processes given. Compare their average turnaround and waiting time.
[E] (NOV/DEC 2012)
Process Arrival Time Waiting Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
2) Discuss how scheduling algorithms are selected for a system. What are the criteria considered? Explain the
different evaluation Methods.[An] (MAY/JUNE 2014)
3) Write in detail about several CPU scheduling algorithms. [An] (APRIL/MAY2011)
4) What is critical section? Specify the requirements for a solution to critical section problem. [An] (NOV/DEC
2012)
5) How monitors help in process synchronization. [An] (NOV/DEC 2009)
6) Write in detail about deadlock avoidance. [U] (NOV/DEC 2009)
7) Write in detail about deadlock recovery. [U] (APRIL/MAY2011)
8) Explain the Banker algorithm for deadlock avoidance in detail with an example. [Ap]
1. Draw 4 Gantt charts illustrating the execution of these processes using FCFS, SJF Priority and RR (Time Slice = 1)
scheduling
2. What is the turnaround time of each process for each of the scheduling?
3. Calculate the waiting time for each of the process [E] (MAY/JUNE2012) (NOV/DEC2015)
10) Consider the following questions based on the banker‘s algorithm: [E]
(MAY/JUNE 2012)
Process Allocation Max Available
P0 A B C D A B C D A B C D
P1 0 0 1 2 0 0 1 2 1 5 2 0
P2 1 0 0 0 1 7 5 0
P3 1 3 5 4 2 3 5 6
P4 0 6 3 2 0 6 5 2
P5 0 0 1 4 0 6 5 6
(1) Define safety algorithm.
(2) What is the content of the matrix Need?
(3) Is the system in a safe state?
(4) If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted immediately?
11) (i) What is meant by critical section problem? Propose a solution based on bakery algorithm.
(ii) Consider the following snapshot of a system:
P0 – P4 are 5 processes present and A, B, C, D are the resources. The maximum need of a Process and the allocated
resources details are given in the table.
Answer the following based on banker‘s algorithm.
(1) What is the content of NEED matrix?
(2) Is the system in a safe state?
(3) If a request from process P0 arrives for (0, 2, 0) can the request be granted immediately. [E]
Allocation Max Available
A B C A B C A B C
P0 0 1 0 7 5 3 3 3 2
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
12) Discuss the threading issues which are considered with multithreaded programs.
15) Show how wait () and signal () semaphore operations could be implemented in multiprocessor environments using the
test and set instruction. The solution should exhibit minimal busy waiting. Develop pseudo code for implementing the
operations. [An] (APR/MAY 2015)
16) Discuss about the issues to be considered in the multithreaded program. [An]
(APR/MAY 2015)
17) (i) Explain thread and SMP management.
(ii) Illustrate Semaphores with neat example.
(iii) The operating system contains 3 resources, the number of instance of each resource type are 7, 7, 10.
The current resource allocation state is as shown below:
Process Current Allocation Maximum Need
R1 R2 R3 R1 R2 R3
P1 2 2 3 3 6 8
P2 2 0 3 4 3 3
P3 1 2 4 3 4 4
18) Is the current allocation in a safe state? [E] (NOV/DEC 2015) [An] (MAY/JUNE 2016)
22
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
20) (i) Is it possible to have concurrency but not parallelism? Explain.
(ii) Consider a system consisting of four resources of the same type that are shared by three processes, each of which needs
at most two resources. Show that the system is deadlock free.
(i) Describe the actions taken by a kernel to context-switch between processes.
(ii) Provide two programming examples in which multithreading does not provide better performance than a single-
threaded solution. [An] (MAY/JUNE 2016)
23
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
19) (i) Give an example of a situation in which ordinary pipes are more suitable than named pipes and an example of a
situation in which named pipes are more suitable than ordinary pipes. (8) (NOV/DEC 2016) [An]
(ii) Describe the differences among short-term, medium-term, and long term scheduling [U](8)
(NOV/DEC 2016)
20) (i) Explain why interrupts are not appropriate for implementing synchronization primitives in multiprocessor
systems[An] (8) (NOV/DEC 2016)
(i) What are the different thread libraries used? Explain any one with example [An](8) (NOV/DEC 2016)
21) Consider the following set of processes, with the length of the CPU-burst time in given ms:
Process Burst Time Arrival Time
P1 8 0.00
P2 4 1.001
P3 9 2.001
P4 5 3.001
P5 3 4.001
Draw four Gantt charts illustrating the execution of these processes using FCFC,SJF, Priority and RR (Quantum=2) scheduling.
Also calculate waiting time and turnaround time for each scheduling algorithms [E]. (13) (APR/MAY 2017)
22) What is a race condition? Explain how a critical section avoids this condition. What are the properties which a data
item should possess to implement a critical section? Describe a solution to the Dining philosopher problem so that no
races arise. [An] (13) (APR/MAY 2017) (APR/MAY 2019).
23) i) What is a process ? Discuss components of process and various states of a process with the help of a process state
transition diagram. (8) [U](NOV/DEC 2017)
ii)Write the difference between user thread and kernel thread. (5)[An] (NOV/DEC 2017)
24) i) What is the average turnaround time for the following processes using
a) FCFS (3)
b) SJF non-preemptive. (3)
c) Preemptive SJF.(3) [U] (NOV/DEC 2017)
25) Describe the difference among short-term, medium-term and long term scheduling with suitable example. [An]
(APR/MAY 2018)
29) Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short
processes: [An] (APR/MAY 2018)
i) RR
ii) Multilevel feedback queues.
30) What do you mean by term synchronization? 'What is Semaphore? Explain how semaphore can used as
synchronization tool. Consider a coke machine that has 10 slots. The producer is the delivery person and the consumer is the
student using the machine- It uses the following three semaphores (15)[An](APR/MAY 2017)
semaphore mutex 24
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
semaphore fullBuffer /* Number of filled slots: */ semaphore emptyBuffer /*
Number of empty slots */
(i) Write pseudo code for delivery_person() and student()
(ii)What will be the initial values of the semaphores?
31) Write a solution that guarantees the mutual exclusion and has no deadlocks
32) What is deadlock? What are the necessary conditions for deadlock to occur? Explain the deadlock
prevention method
of handling deadlock. (15)[An] (APR/MAY 2017) Consider the following information about resources in a system.
(i) There are two classes of allocatable resource labeled R1 and R2
(ii) There are two instances of each resource
(iii) There are four processes labeled p1 through p4
(iv) There are some resource instances already allocated to processes as follows:
One instance of R1 held by p2, another held by p3
One instance of R2 held by p1, another held by p4
(v) Some processes have requested additional resources, as follows:-
p1 wants one instance of R1 .
p3 wants one instance of R2
(1) Draw the resource allocation graph for this system
(2) What is the state (runnable, waiting) of each process? For each process that is waiting indicate what it is waiting
for
(3) Is this system deadlocked? If so, state which processes are involved. If not, give an execution sequence that
eventually ends, showing resource acquisition and release at each step.
33) Consider the following system snapshot using data structures in the Banker‘s algorithm, with resources A, B, C
and D and process P0 to P4 : [E](NOV/DEC 2017)
25
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
}While (3');
}
void V (binary_semaphore *s) { S- >value =
0;
}
Write whether the implementation may or may not work if context switching is disabled in P.
(ii) Consider a situation where we have a file shared between many people. If one of the people tries editing the file, no
other person should be reading or writing at the same time, otherwise changes will not be visible to him/her. However if
some person is reading the file, then others may read it at the same time. [An](NOV/DEC 2017)
a) What kind of situation is this?
b) Consider the following problem parameters to solve this situation.
Problem parameters:
i) Draw Gantt charts that illustrate the execution of these processes using the scheduling algorithms FCFS (smaller
priority number implies higher priority) and RR (quantum = 1). (10)
ii) What is the waiting time of each process for each of the scheduling algorithms? (5)
25. Write the algorithm using test and set() instruction that satisfy all the critical section requirements . (5) (APR/MAY
2019)
26. Consider the following snapshot of a system:
P0-P4 are 5 processes present and A, B, C, D are the resources. The maximum need of a process and the allocated
resources details are given in the table.
Allocation Max Available
A B C D A B C D A B C D
P0 2 0 0 1 4 2 1 2 3 3 2 1
P1 3 1 2 1 5 2 5 2
P2 2 1 0 3 2 3 1 6
P3 1 3 1 2 1 4 2 4
P4 1 4 3 2 3 6 6 5
Answer the following based on banker‘s algorithm
26
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
1. Illustrate that the system is in safe state by demonstrating an order in which the process may complete?
2. If a request from a process p1 arrives for (1,1,0,0) can the request be granted immediately.
3. If the request from p4 arrives for (0,0,2,0) can the request be granted immediately?
(13) [E] (APR/MAY 2019)
39. (i) Consider the following set of processes with the length of CPU- burst time given in milliseconds.
Brust Priority Arrival
Process Time Time
P1 10 3 0
P2 1 1 1
P3 2 3 2
P4 1 4 1
P5 5 2 2
Draw the Gantt chart for the execution of these processes using FCFS, SJF, SRTS, pre- emptive and non-pre-emptive
priority, round robin with time slice of 2 ms. Find the average waiting and turnaround time using each of the methods. (10)
(ii)Explain Multi level queue and multi-level feedback queue scheduling with suitable example. (5) (APR/MAY 2019)
40. (i) Consider two processes, p1 and p2 where p1 = 50, t1 = 25, p2 = -75 and t2 = 30. Can these two processes be scheduled
using rate-monotonic scheduling and earliest deadline first scheduling. Illustrate your answer using Gantt charts. (10)
(ii) Explain in detail about paging in 32 bit and 64 bit architectures. (5) (APR/MAY 2019)
41. (i) Explain banker algorithm for deadlock avoidance with suitable example. (7)
(ii) A system has four processes and five resources. The current allocation and maximum need are as follows
(NOV/DEC 2021)
42. (i) What is critical section? Discuss in detail reader‘s writer‘s problem. (7) (NOV/DEC 2021)
UNIT-3
PART – A
28
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Paging requires more memory overhead to maintain the translation structures. Segmentation requires just two registers
per segment: one to maintain the base of the segment and the other to maintain the extent of the segment.
Paging on the other hand requires one entry per page, and this entry provides the physical address in which the page is
located
15. What do you mean by thrashing? (APR/MAY 2015) [R] (APR/MAY 2019)
29
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Thrashing is the coincidence of high page traffic and low CPU utilization.
16. How do you limit the effects of thrashing? [An]
To limit the effect of thrashing we can use local replacement algorithm. With Local replacement algorithm, if the
process starts thrashing, it cannot steal frames from another process and cause the latter to thrash as well. The problem is not
entirely solved. Thus the effective access time will increase even for the process that is not thrashing.
17. What do mean by page fault? [R]
Page fault is the situation in which the page is not available whenever a processor needs to execute it.
18. Differentiate between Global and Local page replacement algorithms. [An]
Allows a process to select a replacement frame from the Each process select form only its own set of allocated
set of all frames
The number of frames allocated to a process can The number of frames allocated to a process does
change since a process may happen to select only not change
frames allocated to other processes, thus increasing
the number of frames allocated to it.
A process cannot control its own page- fault rate A process can control its own page- fault rate
19. Define TLB. [R]
Translation Look-Aside Buffer, a table in the processors memory that contains information about the pages in
memory the processor has accessed recently
The TLB enables faster computing because it allows the address processing to take place independent of the normal
address-translation pipeline
20. Define Pre paging. [R]
It is an attempt to prevent the high level of initial paging. This strategy is to bring into memory at one time all the pages
the will be needed.
Example: - Solaris uses pre paging.
21. Define logical address and physical address. [R]
An address generated by the CPU is referred as logical address. An address seen by the memory unit that is the one
loaded into the memory address register of the memory is commonly referred as physical address
22. What is the main function of the memory-management unit?[R]
The runtime mapping from virtual to physical addresses is done by a hardware device called a memory
management unit (MMU).
23. What is difference between demands paging n pure demand paging? [R]
In demand paging, a page is not loaded into main memory until it is needed. In pure demand paging, even a single
page is not loaded into memory initially. Hence pure demand paging causes a page fault.
24. Define Copy-on-write. [R]
Copy-on-write finds its main use in virtual memory operating systems; when a process creates a copy of
itself, the pages in memory that might be modified by either the process or its copy are marked copy-on-write.
25. Define swapping. (NOV/DEC 2013) [R]
A process needs to be in memory to be executed. However a process can be swapped temporarily out of
memory to a backing store and then brought back into
memory for continued execution. This process is called swapping.
26. What are the common strategies to select a free hole from a set of available holes? [R]
The most common strategies are
A. First fit B. Best fit C. Worst fit
30
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
27. Define lazy swapper. [R]
Rather than swapping the entire process into main memory, a lazy swapper is used. A lazy swapper never
swaps a page into memory unless that page will be needed.
28. Define effective access time. [R]
Let p be the probability of a page fault (0£p£1). The value of p is expected to be close to 0; that is, there will be
only a few page faults. The effective access time is
Effective access time = (1-p) * ma + p* page fault time. ma: memory-access time
29. What is the basic approach of page replacement? [R]
If no frame is free is available, find one that is not currently being used and free it. A frame can be freed by
writing its contents to swap space, and changing the page table to indicate that the page is no longer in memory. Now the
freed frame can be used to hold the page for which the process faulted.
30. What is the various page replacement algorithms used for page replacement?[R]
FIFO page replacement
Optimal page replacement
LRU page replacement
LRU approximation page replacement
Counting based page replacement
Page buffering algorithm.
31. Differentiate between Global and Local page replacement algorithms. (NOV/DEC 2012)
Allows a process to select a replacement frame from the set Each process select form only its own set of allocated frames
of all frames, even if
The number of frames allocated to a process can change The number of frames allocated to a process does
since a process may happen to select only frames allocated not change
to other processes, thus increasing the number of frames
allocated to it.
A process cannot control its own page-fault rate A process can control its own page-fault rate
32. What are the major problems to implement demand paging? [R]
The two major problems to implement demand paging is developing
Frame allocation algorithm
Page replacement algorithm
Load a value from a memory address to a general-purpose register (User Level Instruction)
Set a new value in the program counter (PC) register (User Level Instruction)
Turn off interrupts (privilege Instruction)
44. Will optimal page replacement algorithm suffer from Belady‟s anamaly? Justify your answer (APR/MAY 2017)
[An]
In computer storage, Belady‘s anomaly is the phenomenon in which increasing the number of page frames results in
an increase in the number of page faults for certain memory access patterns. This phenomenon is commonly
experienced when using the first-in first-out (FIFO) page replacement algorithm.
45. Write about swapping. Let us assume the user process is of size 1MB and the backing store is a standard hard disk with
a transfer rate of 5MBPS. Calculate the transfer rate. [E] (NOV/DEC 2017)
Swapping: A process can be swapped temporarily out of memory to a backing store(SWAP OUT)and then brought
back into memory for continued execution(SWAP IN).
Let us assume the user process is of size 1MB & the backing store is a standard hard disk with a transfer rate of
5MBPS.
Transfer time = 1000KB/5000KB per second
= 1/5 sec = 200ms
1. Describe the hierarchical paging technique for structuring page tables. (8) [An]
(MAY/JUNE 2013)
2. What is the cause for thrashing? How does the system detect thrashing? Once it detects, what can the system do to
eliminate this problem? [An] (MAY/JUNE 2009)
3. Write in detail about Segmentation.[U] (NOV/DEC 2009)
5. Explain the segmentation with paging implemented in OS/2 32-bit IBM system. Describe the following
algorithms: [An] (APRIL/MAY2010)
a. First fit
b. Best Fit
c. Worst Fit
6. Explain how paging supports virtual memory. With a neat diagram explain how logical address is translated into
physical address. [An] (NOV/DEC 2012)
7. Explain the principles of segmented and paging implemented in memory with a diagram. [U] (NOV/DEC2013)
8. Explain the segmentation with paging implemented in MULTICS system. [U]
9. Explain the various page table structures in detail. [U]
(APRIL/MAY2011)(MAY/JUNE 2014)
10. Write short notes on LRU, FIFO and clock replacement strategies? [An]
(APRIL/MAY2010, APRIL/MAY2011)
11. Explain any four page replacement algorithms in detail? [An] (NOV/DEC 2009) (NOV/DEC 2013)
12.(i)Why page sizes are always powers of 2? (ii)Consider the following
segment table:
Segment Base Length
34
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
i. 0 0219 600
ii. 1 2300 14
13. What are the physical addresses for the following logical addresses? 0430
110
2500
400
4112 [E]
14. What is thrashing? Explain the working set model in detail. [An] (MAY/JUNE 2009)
15. Given memory partitions of 100KB, 500KB, 200KB, 300KB and 600KB(in order), how would each of the first-fit, best-
fit and worst-fit algorithms place processes of212KB, 417KB, 12KB and 426KB(in order)? Which algorithm makes the
most efficient use of memory? [Ap] (NOV/DEC 2008)
16.(i) Explain in briefly and compare, fixed and dynamic memory partitioning schemes.
(ii) Explain FIFO, optimal and LRU page replacement algorithms with an example reference Strings. Mention the merits
and demerits of each of the above algorithms.
[An] (NOV/DEC 2012)
19. Explain the concept of demand paging in detail with neat diagram.[U] (MAY/JUNE 2014)
20. Why are translation look-aside buffers important? Explain the details stored in a TLB table entry? [An] (MAY/JUNE
2014)
21. Consider the following page reference string : 1,2,3,4,2,1,5,6,1,2,3,7,6,3,2,1,2,3,6.How Many page faults would occur
for the LRU, FIFO, LFU and optimal page replacement algorithms, assuming two and five frames?
[E] (MAY/JUNE 2014)
22. Explain the concept of demand paging and the performance issue of short process Explain the issue of demand
paging [An] (NOV/DEC 2013)
23. With a neat sketch, explain how logical address is translated into physical address using paging mechanism? [An]
(APR/MAY 2015)
24. Write short notes on Memory Mapped Files. [U] (APR/MAY 2015) 25.(i) Consider the
following page reference string:
1,2,3,2,5,6,3,4,6,3,7,3,1,5,3,6,3,4,2,4,3,4,5,1
Indicate page faults and calculate total number of page faults and successful ratio for FIFO, optimal and LRU
35
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
algorithms. Assume there are four frames and initially all the frames are empty. [E]
(ii) Explain the effect of thrashing. [An] (NOV/DEC 2015)
27.(i) Describe a mechanism by which one segment could belong to the address space of two different processes.
(ii) Why are segmentation and paging sometimes combined into one scheme? Explain them in detail with example. [An]
(MAY/JUNE 2016)
28.(i) Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault
occurs.
(ii) Discuss situations in which the least frequently used (LFU) page replacement algorithm generates fewer page faults
than the least recently used (LRU) page replacement algorithms. Also discuss under that circumstances the opposite
holds good. [An] (MAY/JUNE 2016)
29.(i) What is the copy-on-write feature, and under what circumstances is its use beneficial? Why hardware support is
required to implement this feature? (8) [An] (NOV/DEC 2016)
(ii) Consider a system that allocates pages of different sizes to its processes. What are the advantages of such a paging
scheme? What modifications to the virtual memory system provide this functionality? (8) [U] (NOV/DEC 2016)
30.(i) Explain the difference between internal and external fragmentation (8) [An]
(NOV/DEC 2016)
(ii) Discuss situations in which the most frequently used (MFU) page replacement algorithm generates fewer page
faults than the least recently used (LRU) page-
replacement algorithm. Also discuss under what circumstances the opposite holds. (8)
[An] (NOV/DEC 2016)
33. Draw the diagram of segmentation memory management scheme and explain its principle.(13)
34. When do page faults occur ? Consider the reference string : [E] (NOV/DEC 2017)
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3. 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults and page fault rate occur for the FIFO, LRU and optimal replacement algorithms, assuming
one, two, three, four page frames?
35. Explain why sharing a reentrant module is easier when segmentation is used than when pure paging is used with
example.[U] (APR/MAY 2018)
36. Discuss situation under which the most frequently used page replacement algorithm generates fewer page faults than
the least recently used page replacement algorithm. Also discuss under which circumstances the opposite
holds.[U](APR/MAY 2018)
37. (i) Consider a computer system with 16 bit logical address and 4 KB page size. The system supports up to 1 MB of
physical memory. Assume that the actual process size is only 33 KB, page table base register contains 1000 and free frame
list contains 13,1,9,7,5,3,1,2,4,6,8.
Construct the physical and logical memory structures page table of the corresponding process.
Find the physical address of 13,256 and another logical address with page number 2 and offset of 128.
Discuss about the possible valid invalid bit and possible protection bits in page table.
28. With a neat diagram. discuss about a mechanism of paging scheme. (NOV/DEC 2021)
UNIT-4
PART-A
1) What is a file? [R]
A file is a named collection of related information that is recorded on secondary storage. A file contains either
programs or data. A file has certain "structure" based on its type.
2) List the various file attributes. (APRIL/MAY 2011, NOV/DEC 2012)(MAY/JUNE 2014)(APRIL/MAY 2015) [R]
A file has certain other attributes, which vary from one operating system to another, but typically consist of these:
Identifier
Name
Type
Location
Size
Protection
Time
Date
User identification
3) What are the various file operations? (NOV/DEC 2012, APRIL/MAY 2015) [R]
The six basic file operations are:
Creating a file
Writing a file
Reading a file
Repositioning within a file
Deleting a file
Truncating a file
4) What are all the information‟s associated with an open file? [R]
Several pieces of information are associated with an open file which may be:
37
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
File pointer
File open count
Disk location of the file
Access rights
5) What are the different accessing methods of a file? (APRIL/MAY 2010) [R]
The different types of accessing a file are:
Sequential access: Information in the file is accessed sequentially
Direct access: Information in the file can be accessed without any particular order. Other access methods:
Creating index for the file, indexed sequential access method (ISAM),etc.
6) What is Directory? [R]
The device directory or simply known as directory records information-such as name, location, size, and type for all
files on that particular partition. The directory can be viewed as a symbol table that translates file names into their directory
entries.
7) What are the operations that can be performed on a directory? [R]
The operations that can be performed on a directory are
Search for a file
Create a file
Delete a file
Rename a file
List directory
8) What are the most common schemes for defining the logical structure of a directory? [R] (MAY/JUNE
2012)
The most common schemes for defining the logical structure of directory
Single-Level Directory
Two-level Directory
Tree-Structured Directories
Acyclic-Graph Directories
General Graph Directory
It separates file-system-generic operations from their implementation defining a clean VFS interface. It allows
transparent access to different types of file systems mounted locally.
VFS is based on a file representation structure, called a vnode. It contains a numerical value for a network-wide
unique file .The kernel maintains one vnode structure for each active file or directory.
14) Define seek time and latency time. [R]
The time taken by the head to move to the appropriate cylinder or track is called seek time. Once the head is at right
track, it must wait until the desired block rotates under the read-write head. This delay is latency time.
15) What are the allocation methods of a disk space? [R]
Methods of allocating disk space which are widely in use are
Contiguous allocation
Linked allocation
Indexed allocation
17) What are the drawbacks of contiguous allocation of disk space? [R]
The disadvantages are
Suffers from external fragmentation.
Suffers from internal fragmentation.
Difficulty in finding space for a new file.
File cannot be extended.
Size of the file is to be declared in advance.
File Control Block (FCB) is a file system structure in which the state of an open file is maintained.
24) What are the two types of system directories? (MAY/JUNE 2012) [R} Device directory,
describing physical properties of files.
File directory, giving logical properties of the files.
25) What is meant by polling?(MAY/JUNE 2014) [R]
Polling is the process where the computer waits for an external device to check for its readiness. The computer does
not do anything else than checking the status of the device .Polling is often used with low-level hardware. Example: when a
printer connected via a parallel port the computer waits until the next character has been received by the printer. These
processes can be as minute as only reading 1 Byte. Polling is the continuous (or frequent) checking by a controlling device or
process of other devices, processes, queues, etc.
26) State any three disadvantages of placing functionality in a device controller, rather than in the kernel.
(MAY/JUNE 2014) [R]
Three advantages:-
35) What is the need for disk scheduling? (NOV/DEC 2012) [R]
In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is
increased causing the system to slow down.
Disk Scheduling Algorithms are used to reduce the total seek time of any request.
41
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
36) What is low-level formatting? [R]
Before a disk can store data, it must be divided into sectors that the disk controller can read and write. This
process is called low-level formatting or physical formatting. Low-level formatting fills the disk with a special data structure
for each sector. The data structure for a sector consists of a header, a data area, and a trailer.
37) What is the use of boot block? [R]
For a computer to start running when powered up or rebooted it needs to have an initial program to run. This
bootstrap program tends to be simple. It finds the operating system on the disk loads that kernel into memory and jumps
to an initial address to begin the operating system execution. The full bootstrap program is stored in a partition called the
boot blocks, at fixed location on the disk. A disk that has boot partition is called boot disk or system disk.
38) What is sector sparing? [R]
Low-level formatting also sets aside spare sectors not visible to the operating system. The controller can be told
to replace each bad sector logically with one of the
spare sectors. This scheme is known as sector sparing or forwarding.
39) What is seek time? (MAY /JUNE 2012) [R]
Seek time: the time to position heads over a cylinder (~8 msec on average).
40) What are storage area networks? (April/May 2011) [R]
A storage area network (SAN) is a dedicated network that provides access to consolidated, block level data storage.
SANs are primarily used to make storage devices, such as disk arrays, tape libraries, and optical jukeboxes, accessible to
servers so that the devices appear like locally attached devices to the operating system.
41) Write a brief note on RAID. (MAY/JUNE 2013) [R]
RAID (redundant array of independent disks; originally redundant array of inexpensive disks) is a way of storing
the same data in different places (thus, redundantly) on multiple hard disks. By placing data on multiple disks, I/O
(input/output) operations can overlap in a balanced way, improving performance. Since multiple disks increase the mean
time between failures (MTBF), storing data redundantly also increases fault tolerance.
42) What Characteristics determine the disk access speed? (MAY /JUNE 2012) [R]
Seek time
Rotational latency
Settle time
43) Give the importance of Swap space Management. [R] (NOV/DEC 2012, APR/MAY2010, NOV/DEC
2010)
Swap-space management: Swap-space management is low- level task of the operating system. The main goal for
the design and implementation of swap space is to provide the best throughput for the virtual memory system.
Swap-space use: The operating system needs to release sufficient main memory to bring in a process that is ready
to execute. Operating system uses this swap space in various ways. Paging systems may simply store pages that have been
pushed out of main memory. UNIX operating system allows the use of multiple swap spaces. These swap space are usually
put on separate disks, so the load placed on the I/O system by paging and swapping can be spread over the systems I/O
devices.
Swap-space location: Swap space can reside in two places:
1. Separate disk partition
2. Normal file system
44) Write three basic functions which are provided by the hardware clocks and timers. (APRIL/MAY 2011)
[R]
OSTickInit()
OSTimeSet() 42
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
OSTimeGet()
No external fragmentation.
43
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
48) What is double buffering? (NOV/DEC 2014) [R]
OS can use various kinds of buffering:
44
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
55) Why it is important to scale up system –bus and device speeds as CPU speed increases? (NOV/DEC 2016)[An]
Consider a system which performs 50% I/O and 50% computers. Doubling the CPU Performance on this system would
increase the total system performance by only 50%. Doubling both system aspects would increase performance by
100%.Generally,it is important to remove the current system bottleneck and to increase overall system performance
rather than blindly increasing the performance of individual system components.
56) Suppose that the disk rotates at 7200 rpm. What is the average rotational latency of the disk drive?
(APR/MAY 2017) [E]
Average disk access time=average seek time+ average rotational delay + transfer time + controller overhead.
The controller calculates the ECC and finds that the sector is bad. It reports this finding to the OS.
The next time that the system is rebooted ,a special command is run to tell the SCSI controller to replace the
bad sector with a spare.
After that, whenever the system requests logical block, the request is translated into the replacement
sector‘s address by the controller.
61) What is the advantage of bit vector approach in free space management ? [R] (APR/MAY 2018)
Advantages of bit vector approach:
Relatively simple
Efficient to find the first free blocks or n consecutive free blocks on the disk
45
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
provided, while others inspect the structures of the device and determine the type of file system. Typically, a mount point is
an empty directory.
63. What is SSD? (APR/MAY 2019)
The highest level, the operating system may maintain a cache of file-system data in main memory. In addition,
electronic RAM disks (also known as solid-state disks) may be used for high-speed storage that is accessed through the file-
system interface.
64. Enlist different types of file directory structure. (NOV/DEC 2021)
65. Is FAT file system advantageous? Justify. (NOV/DEC 2021)
PART-B&C
1) Explain the different disk scheduling algorithms with examples. [An] (APRIL/MAY 2010, MAY/JUNE 2012,
APRIL/MAY 2011, MAY/JUNE 2013) (MAY/JUNE 2014)
2) Explain and compare FCFS, SSTF, C-SCAN and C-LOOK disk scheduling algorithms with examples. [An] (NOV/DEC
2012)
3) Write short notes on disk management. [U] (NOV/DEC 2009)
4) Write short notes on file system in Linux. [U] (NOV/DEC 2009) (NOV/DEC 2014)
5) Write an elaborate note on RAID and RAID Levels. [U] (APRIL/MAY 2010, MAY/JUNE 2012,
NOV/DEC 2012, MAY/JUNE 2013)
6) Explain the services provided by Kernel I/O subsystem. [An] (APRIL/MAY 2010, APRIL/MAY 2011,
NOV/DEC2012, MAY/JUNE 2013)
7) Consider the following I/O scenarios on a single-user PC.
A mouse used with a graphical user interface.
A tape drive on a multitasking operating system (assume no device preallocation is available)
A disk drive containing user files.
A graphics card with direct bus connection, accessible through memory-mapped I/O For each of these I/O
scenarios, would you design the operating system to use
buffering, Spooling, caching, or a combination? Would you use polled I/O, or interruption driven I/O? [An]
8) Write short notes on
1. File types
2. File attributes
3. File operations [U]
9) Explain the file allocation methods. [U] (APRIL/MAY 2010)
10) Explain the role of Access Matrix for protection in files. [An] (APRIL/MAY 2010)
11) Write in detail the security measures taken in file system?
1. Write short notes on file system mounting
2. Write in detail about the various file organizations [An]
12) Explain the allocation of frames in detail. [An]
13) Explain directory subsystem [U] (APRIL/MAY 2011)
(i) Explain Linked File Allocation method (6)
(ii) Explain the issues in designing a file system. (8)
(ii) Explain the various file directory structures. (8) (NOV/DEC 2012)
14) (i) Explain the different file access methods in detail. (8) (MAY/JUNE 2014)
46
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
(ii) Describe the two level and acyclic graph schemes for defining the logical structure of a directory.
[An] (MAY/JUNE 2013)
15) Explain the Linked list and indexed file allocation methods with neat diagram. Mention their advantages and
disadvantages. (8) [An] (MAY/JUNE 2013)
16) What are the most common schemes for defining the logical structure of a directory? [An]
(MAY/JUNE 2014)
17) Write a brief note on the steps involved in DMA transfer [U] (MAY/JUNE 2014)
18) Explain the data structures supported by kernel I/O system [U] (MAY/JUNE 2014)
19) Write a brief note on tertiary storage devices [U] (MAY/JUNE 2014)
20) Explain different directory implementation methods [U](NOV/DEC 2013)
21) Why disk scheduling is necessary? Explain the different seek optimization techniques [An] (NOV/DEC
2013)
22) Explain about RAID structure in disk management with various RAID levels of organization in detail [An]
(Apr/May 2015)
23) Briefly discuss about the various directory structures. [An] (APR/MAY 2015)
24) Compare the functionalities of FCFS, SSTF, SCAN AND C-LOOK disk scheduling algorithms with an example for
each. [An] (APR/MAY 2015)
25) Write short notes on free space management. [U] (APR/MAY 2015, MAY/JUNE 2013)
26) (i) Discuss the functions of files and file implementation.
(ii) Explain free space management with neat example. [U] (Nov/Dec 2015)
27) On a disk with 200 cylinders, numbered 0 to 199, compute the number of tracks the disk arm must move to satisfy the
entire request in the disk queue. Assume the last request received was at truck 100. The queue in FIFO order contains
requests for the following tracks. 55, 58, 39, 18, 90, 160, 150, 38, 184. Perform the computation to find the seek time for the
following disk scheduling algorithms.
(i) FCFS (ii)SSTF
(iii) SCAN
(iv) C-SCAN
28) (i) Why it is important to balance file-system I/O among the disks and controllers on a system in a multitasking
environment?
(ii) Discuss the advantages and disadvantages of supporting links to files that cross mount points. [An] (MAY/JUNE
2016)
29) (i) Explain why logging metadata updates ensures recovery of a file system after a file-system crash.
(iii) Could a RAID level 1 organization achieve better performance for read requests than a RAID level 0
organizations? If so, how? [An] (MAY/JUNE 2016)
30) (i) Describe some advantages and disadvantages of using SSDs as a caching tier and as a disk-drive replacement
compared with using only magnetic disks. (8) [An] (NOV/DEC 2016)
(ii) Discuss how performance optimizations for file systems might result in difficulties in maintaining the consistency
of the systems in the event of computer crashes (8) [U] (NOV/DEC 2016)
31) (i) Distinguish between a STREAMS driver and a STREAMS module (8) [An] (NOV/DEC 2016)
(ii) Could a RAID level l organization achieve better performance for read requests than a RAID level 0 organization? If
so, how? Explain. (8) [An](NOV/DEC 2016)
47
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
32) (i) Discuss about the various file access methods (7) [U] (APR/MAY 2017)
(ii)With neat sketch explain about the Directory structure, File Sharing (6) [U]
(APR/MAY 2017)
33) (i) Explain about kernel I/O subsystem and transforming I/O to hardware operations (7) [U] (APR/MAY 2017)
34) (ii) On a disk with 1000 cylinders, numbers 0 to 999, Compute the number of tracks the disk arm must move to satisfy
the entire request in the disk queue. Assume the last received was at track 345 and the head is moving towards track 0.The
queue in FIFO order contains requests for the following tracks. 123,874,692,475,105 and 376.Find the seek length for the
following scheduling algorithm. (1) SSTF (2) LOOK (3) CSCAN [An] (APR/MAY 2017)
35) (i)In a variable partition scheme the operating system has to keep track of allocated and free space. Suggest a means of
achieving this. Describe the effects of new allocations and process terminations in your suggested scheme.(5) [An]
(NOV/DEC 2017)
(ii)What are different allocation methods in disk storage? Explain with neat sketch.(8)
36) Consider a disk queue with requests for I/O to blocks on cylinders 93,183, 37,122, 14, 124,
65, 67
If the disk head is start at 53, then find out the total head movement with respect to FCFS,SSTF, SCAN,C-SCAN and
LOOK scheduling.(13) [E] (NOV/DEC 2017)
37) What are the various disk space allocation methods? Explain any two in detail.
38) State and explain the FCFS, SSTF and SCAN disk scheduling with examples.
[U] (APR/MAY 2018)
39. Suppose that a disk drive has 5000 cylinders, numbered 0 through 4999. The drive is serving a request at cylinder 143.
The queue of pending requests, in FIFO order is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the head
position what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the
following disk-scheduling algorithms? FCFS, SSTF, SCAN, LOOK, C- SCAN C-LOOK. Explain the pros and cons of all
disks scheduling algorithms. (13) (APR/MAY 2019)
40. (i) Explain in detail the various allocation methods with their pros and cons. (8)
(ii) Brief the various procedures need to be followed ‗in disk management. (5)
(APR/MAY 2019)
41.(i) What do you mean by directory structure? Also discuss Tree-Structure Directories and Acyclic-Graph Directories. (7)
(NOV/DEC 2021)
(ii) Describe in details about file system implementation and file allocation method (6).
42. Suppose that a disk drive has 200 cylinder, numbered 0 to 199. The work queue is: 23,89,132,42,187. Determine the
total distance for the following disk scheduling algorithms
(i) SCAN (ii) LOOK (iii) C-SCAN (iv) C-LOOK
Work Queue : 23,89,132,42,187
There are 200 cylinder numbered from 0 – 199
The disk head stars at number 100. (NOV/DEC 2021)
UNIT-5
PART-A
A Linux distribution includes all the standard components of the Linux system, plus a set of administrative tools to
simplify the initial installation and subsequent upgrading of Linux and manage installation and removal of other packages on
48
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
the system.
2) What is the use of User mode? [R]
Under Linux, no user code is built into the kernel. Any operating-system-support code that does not need to run in
kernel mode is placed into the system libraries and runs in user mode.
3) What are the components of kernel mode[R]
1. The module-management system allows modules to be loaded into memory and to communicate with the
rest of the kernel.
2. The module loader and unloader, which are user-mode utilities, work with the module-management system to
load a module into memory.
3. The driver-registration system allows modules to tell the rest of the kernel that a new driver has become
available.
4. A conflict-resolution mechanism allows different device drivers to reserve hardware resources and to
protect those resources from accidental use by another driver.
4) What is process Identity? [R]
Each process has a unique identifier. The PID is used to specify the process to the operating system when an
application makes a system call to signal, modify, or wait for
the process. Additional identifiers associate the process with a process group (typically, a tree of processes forked by a single
user command and login session.
5) Define DNS[R]
The Domain Name System (DNS) provides host-name-to-network-address translations for the entire Internet.
Before DNS became widespread, files containing the same information were sent via e-mail or ftp between all networked
hosts.
6) What is virtualization? [R]
Virtualization, in computing, refers to the act of creating a virtual (rather than actual) version of something,
including but not limited to a virtual computer hardware platform, operating system (OS), storage device, or computer
network resources.
7) What is pluggable authentication modules [R]
The pluggable authentication modules (PAM) system is based on a shared library that can be used by any system
component that needs to authenticate users. An implementation of this system is available under Linux. PAM allows
authentication modules to be loaded on demand as specified in a system-wide configuration file. If a new authentication
mechanism is added at a later date, it can be added to the configuration file, and all system components will immediately be
able to take advantage of it. PAM modules can specify authentication methods, account restrictions, session setup functions,
and password-changing functions (so that, when users change their passwords, all the necessary authentication mechanisms
can be updated at once).
8) What is the use of firewall manager[R]
The firewall manager maintains a number of separate firewall chains and allows a skbuff to be matched against any
chain. Chains are reserved for separate purposes: one is used for forwarded packets, one for packets being input to this host,
and one for data generated at this host. Each chain is held as an ordered list of rules, where a rule specifies one of a number
of possible firewall-decision functions plus some arbitrary data for matching purposes.
FAT File System is best for cross-compatibility with other platforms. There are NTFS file system drivers for Linux,
but not really for Windows. FAT, however, can be read more or less transparently by both operating systems. There is also a
slight speed gain in FAT.
10) What is the responsibility of kernel in Linux operating system?[R]
Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It is consists of various
49
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level
hardware details to system or application programs.
11) Why Virtualization is required? (Nov/Dec 2015) [An]
Virtualization reduces the number of physical servers, reducing the energy required to power and cool them. Save
time. With fewer servers, you can spend less time on the manual tasks required for server maintenance. It's also much faster
to deploy a virtual machine than it is to deploy a new physical server.
12) Enumerate the requirements for Linux system administrator. Brief any one.
1. While specific knowledge is a boon, most hiring managers require that you possess basic knowledge about all aspects of
Linux. For example, a little knowledge about Solaris, BSD or various flavors of Linux never hurt anyone!
2. Knowledge in at least one of the upper tier scripting language is a must. You have options before you, for instance,
Python, Perl, Ruby or more, but you need to make yourself proficient in at least one of them.
3. Experience is welcome, but you at least need to have some hands-on experience of system management, system setup
and managing Linux or Solaris based servers as well as configuring them.
4. Knowledge in shell programming and architecture is valued very much in the job market. If you know Buorne or Korn
well, you can even score a high-paying salary with minimal experience.
5. Storage technologies like FC, NFS or iSCSI is great, while knowledge regarding backup technologies is a must for a
system administrator.
13) State the components of a Linux System? (May/Jun 2016)[R]
Kernel: The kernel is responsible for maintaining all the important abstractions of the operating system, including such
things as virtual memory and processes.
System libraries: The system libraries define a standard set of functions through which applications can interact with
the kernel. These functions implement much of the operating-system functionality that does not need the full privileges of
kernel code.
System utilities: The system utilities are programs that perform individual, specialized management tasks. Some system
utilities are invoked just once to initialize and configure some aspect of the system.
14) Define the function of Caching-only servers. (May/Jun 2016)[R]
All DNS servers cache answers to queries they receive from outside their own zone of authority. A cache-only
DNS server is not authoritative for any zone. Related Topics: DNS root servers: Root servers are critical to the function of a
DNS server that is directly connected to the Internet.
15) What is virtualization? (NOV/DEC 2016)[R]
In computing, virtualization refers to the act of creating a virtual (rather than actual) version of something,
including virtual computer hardware platforms, storage devices, and computer network resources.
16) What scheduling algorithm is used in linux operating system to schedule jobs?
(NOV/DEC 2016)[R]
The Completely Fair Scheduler (CFS) Algorithm is used in Linux operating system to schedule jobs.
17) Mention any two features of Linux file systems. (APR/MAY 2017)[U]
Portable
Open Source
Multi user
Multi Programming
18) Enlist the advantages of using kernel modules in Linux (APR/MAY 2017)[U]
50
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Loading and unloading a module is much more flexible and faster than recompiling a kernel and rebooting.
You can try different options each time you load a module. Most drivers that handle hardware will take options for
I/O addresses, IRQ or DMA numbers, plus more esoteric options like full or half duplex. When you have problems
getting a card to run correctly, the ability to try different options can save hours.
Makes it easier to maintain multiple machines on a single kernel base.
17) List the advantages of Linux OS.[U] (NOV/DEC 2017) Advantages of Linux
OS:
Low cost Stability
Performance
Security, Flexibility, Compatibility
19) List the advantages and disadvantage of writing an operating system in high level language such as C.[R]
(APR/MAY 2018)
The code can be written faster, is more compact, and is easier to understand and debug. In addition, improvements
in compiler technology will improve the generated code for the entire operating system by simple recompilation. Finally, an
operating system is far easier to port to move to some other hardware if it is written in a higher- level language
20) What is handle? How does a process obtain a handle? [U] (APR/MAY 2018)
The handle is an integer value in the operating system assigned to the associated process when the process was
started. The system uses this handle to keep track of process attributes. An application can obtain a handle to a process that
can be used as a parameter to many process-information and control functions.
21. Write short notes on driver registration in Linux. (APR/MAY 2019)
The driver registration allows modules to tell the rest of the kernel that a new driver has become available.
22. List out the methods used to recover from the deadlock. (APR/MAY 2019)
We can use a protocol to prevent or avoid deadlocks, ensuring that the system will never
enter a deadlocked state.
• We can allow the system to enter a deadlocked state, detect it, and recover.
• We can ignore the problem altogether and pretend that deadlocks never occur in the system.
44. What are the Components of a Linux System?
Every OS has component parts, and the Linux OS also has the following components parts:
Boot loader
OS Kernel
Background services
OS Shell
Graphics server
Desktop environment
Applications.
45. Which layer of iOS contains fundamental system services for apps?
The Core Services layer contains the fundamental system services that all applications use, The Core Services layer
provides an abstraction over the services provided in the Core OS layer. It provides fundamental access to iOS services and
consists of the following components:
51
M.A.M. SCHOOL OF ENGG. DEPT OF CSE
Collections
Address Book
Networking
File Access
SQLite
Core Location
Net Services
Threading
Preferences
URL Utilities
PART-B & C
(APR/MAY 2019)
24. (i) Explain in details about how process is managed and scheduled in linux?
(ii) Discuss about Inter Process Communication (IPC) in linux. (NOV/DEC 2021)
46. With frame work explain the working function of android operating system architecture. Compare the
feature of IoS and android. (13) (NOV/DEC 2021)
*************
53