CS2254 Operating Systems Question Bank
CS2254 Operating Systems Question Bank
QUESTION BANK
UNIT-I
/ c
programs for each job in the batch. Once job is submitted to system, the user cannot
interact with the program until they operate.
: /
5. What is the advantage of Multiprogramming?
t p
Multiprogramming increases CPU utilization by organizing jobs so that the CPU
always has one to execute. Several jobs are placed in the main memory and the processor
h t
is switched from job to job as needed to keep
Several jobs advancing while keeping the peripheral devices in use.
1
[Link]
8. Define time sharing system.
Time-sharing system is a logical extension of multiprogramming the cpu
execute multiple jobs by switching among them, but the switches occur so frequently
that the users can interact with each program while it is running. The OS that
implements time-sharing uses short term scheduling and memory sharing to support
multiple virtual machines.
k /
The system which consists of more than one processor are termed as
multiprocessor systems. They are also known as parallel systems or tightly coupled
systems.
. t
[Link] Symmetric multiprocessor systems
e
11. Distinguish between symmetric and asymmetric multiprocessor systems
b Asymmetric multiprocessor systems
1
t u
Here each processor runs an identical copy of Here each processor is assigned a
s e
the operating system and these copies specific task. A
communicate with one another as needed. master processor look to master
: /
that all processor are peers and no master The master processor schedules and
slave relationship exists between processor. allocates work to the slave
t p
Ex: Encore version of Unix for Multimax processors.
h t
computer Ex:Sun OS version
2
[Link]
14. Define network operating systems?
A network OS is a OS that provides features such as file sharing access across
the network and includes communication scheme that allows different processes on
different computers to exchange messages. A computer running a network OS acts
autonomously from all other computer on the network and is able to communicate
with other networked computers.
k
17. Distinguish between hard real-time system and soft real-time system? /
[Link] Hard real-time system . t
Soft real-time system
1 Hard real-time system has
defined, fixed time-constraints.
e
well Soft real-time system have less
b
stringent timing constraints.
t u
2
s e
Processing must be done within the They do not
defined constraints or the system will scheduling.
support deadline
fail.
/ c
: /
p
18. What is a system calls?
t
h t
System calls provide the interface between a process and the operating system.
They are grouped roughly as
Process control
Information maintenance
File management
Communication
Device management
3
[Link]
20. What is virtual machine?
An OS creates the illusion that the process has its own processes with its own
memory by sharing system resources and machine implementing this technique are called
as virtual machines.
UNIT II
1. Define process?
A process is more than a program code, which is sometime known as the text
section. IT also includes the current activity, as represented by the value of the program
counter and the processor’s registers.
device queue. t u
Device Queue: The list of processes waiting for particular I/O device is called a
6. Define schedulers? s e
/ c
A process migrates between the various scheduling throughout its lifetime. The
: /
operating system must select, for scheduling purposes, processes from these queues in
some fashion. The selection process is carried out by the appropriate scheduler.
t p
7. What are the types of scheduler?
h t
Long term scheduler or job scheduler selects processes from the pool and load
them into the memory for execution.
Short term scheduler or CPU scheduler, select among the processes that are ready
to execute and allocates the CPU to one of them.
/ c
process enters a wait state. Waiting processes may never change state, because the
resources they are requested are held by other waiting processes. This situation is called
deadlock.
: /
t p
14. What is the sequence of operation by which a process utilizes a resource?
h t
Under the normal mode of operation, a process may utilize a resource in only the
following sequence:
Request: If the request cannot be granted immediately, then the requesting process
must wait until it can acquire the response.
Use: The process can operate on the resource.
Release: The process releases the resource
6
[Link]
16. Define ‘Safe State”?
A state is safe if the system allocates resources to each process in some order and
still avoid deadlock.
k /
state to ensure that a circular wait condition can never exist. The resource allocation state
is defined by the number of available and allocated resources, and the maximum demand
of the processes.
. t
19. What are the benefits of multithreaded programming?
b e
Responsiveness
Resource sharing
t u
Economy
s
Utilization of multiprocessor architecture
e
/
20. Define deadlock detection diction?
c
: /
If a system does not employ either a deadlock-prevention or a deadlock avoidance
provide: t p
algorithm, then a deadlock situation may occur. In this environment, the system must
h t
An algorithm that examines the state of the system to determine whether a
deadlock has occurred
An algorithm to recover from the deadlock.
7
[Link]
23. Define busy waiting and spinlock.
When a process is in its critical section, any other process that tries to enter
its critical section must loop continuously in the entry code. This is called as busy waiting
and this type of semaphore is also called a spinlock, because the process
while waiting for the lock.
24. What are the requirements that a solution to the critical section problem
must satisfy?
The three requirements are
Simultaneously in a system: t u
A deadlock situation can arise if the following four conditions hold
a. Mutual exclusion
s e
b. Hold and wait
c. No pre-emption / c
d. Circular wait
: /
t p
27. What is a resource-allocation graph?
Deadlocks can be described more precisely in terms of a directed
h t
graph called a system resource allocation graph. 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.
UNIT-III
8
[Link]
2) Define logical address and physical address.
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 to as physical address.
t p
to it, overlays are used. The idea of overlays is to keep in memory only those instructions
and data that are needed at a given time. When other instructions
h t
are needed, they are loaded into space occupied previously by instructions
that are no longer needed.
8) Define swapping.
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.
9) What are the common strategies to select a free hole from a set of available holes?
The most common strategies are
a. First fit b. Best fit c. Worst fit
9
[Link]
11). What do you mean by first fit?
First fit allocates the first hole that is big enough. Searching can either
start at the beginning of the set of holes or where the previous first-fit search
ended. Searching can be stopped as soon as a free hole that is big enough is
found.
/ c
we can use the virtual-memory techniques discussed so far to treat file I/O as routine
memory access. This approach is known as memory mapping.
: / UNIT-4
t
1). What is virtual memory?
p
h t
Virtual memory is a technique that allows the execution of processes
that may not be completely in memory. It is the separation of user logical
memory from physical memory. This separation provides an extremely large virtual
memory, when only a smaller physical memory is available.
10
[Link]
4). What is a pure demand paging?
When starting execution of a process with no pages in memory, the operating
system sets the instruction pointer to the first instruction of the process, which is on a
non-memory resident page, the process immediately faults for the page. After this page
is brought into memory, the process continues to execute, faulting as necessary until
every page that it needs is in memory. At that point, it can execute with no more faults.
This schema is pure demand paging.
b e
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
u
frame can be used to hold the page for which the process faulted.
t
s e
8) What are the various page replacement algorithms used for page replacement?
page replacement
page replacement / c
page replacement
: /
approximation page replacement
t p
based page replacement
buffering algorithm.
h t
9. What are the major problems to implement demand paging?
The two major problems to implement demand paging is developing
a. Frame allocation algorithm b. Page replacement algorithm
11
[Link]
11. List the various file attributes.
A file has certain other attributes, which vary from one operating system to
another, but typically consist of these: Name, identifier, type, location, size,
Protection, time, date and user identification
k /
. t
14. What are the different accessing methods of a file?
The different types of accessing a file are: b e
t u
n the file is accessed sequentially
particular order.
s e
(ISAM) etc.
/ c
[Link] is Directory?
: /
The device directory or simply known as directory records information-
t p
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.
h t
16. What are the most common schemes for defining the logical structure of a
directory?
The most common schemes for defining the logical structure of a directory
-Level Directory
-level Directory
-Structured Directories
-Graph Directories
12
[Link]
17. Define UFD and MFD.
In the two-level directory structure, each user has her own user file
directory (UFD). Each UFD has a similar structure, but lists only the files of a
single user. When a job starts the system’s master file directory (MFD) is searched. The
MFD is indexed by the user name or account number, and
each entry points to the UFD for that user.
UNIT V
-organization module
k /
2) What are the structures used in file-system implementation?
. t
Several on-disk and in-memory structures are used to implement a file
system
a. On-disk structure include b e
Boot control block
t u
Partition block
b. In-memory structure include
s e
In-memory partition table
In-memory directory structure / c
System-wide open file table
Per-process open table : /
t p
3). What are the functions of virtual file system (VFS)?
h t
It has two functions
a. 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.
b. 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.
13
[Link]
6). What are the advantages of Contiguous allocation?
The advantages are
a. Supports direct access b. Supports sequential access
c. Number of disk seeks is minimal.
k /
9). How can the index blocks be implemented in the indexed allocation scheme?
The index block can be implemented as follows
a. Linked scheme . t
b. Multilevel scheme
c. Combined scheme b e
10) Define rotational latency and disk bandwidth. t u
s e
Rotational latency is the additional time waiting for the disk to rotate the desired
/ c
sector to the disk head. The disk bandwidth is the total number of
bytes transferred, divided by the time between the first request for service and
/
the completion of the last transfer.
:
p
11). How free-space is managed using bit vector implementation?
t
h t
The free-space list is implemented as a bit map or bit vector. Each block is
represented by 1 bit. If the block is free, the bit is 1; if the block is
allocated, the bit is 0.
14
[Link]
14). Define spooling.
A spool is a buffer that holds output for a device, such as printer, that
cannot accept interleaved data streams. When an application finishes printing,
the spooling system queues the corresponding spool file for output to the
printer. The spooling system copies the queued spool files to the printer one
at a time.
. t
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.
b e
17. What is sector sparing?
t u
s e
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
c
of the spare sectors. This scheme is known as sector sparing or forwarding.
/
: /
t p
h t
15
[Link]
16 MARK QUESTIONS
s e
14. Explain about the methods used to prevent deadlocks
/ c
15. Write in detail about deadlock avoidance
16. Explain the Banker’s algorithm for deadlock avoidance
: /
17. Explain about contiguous memory allocation
18. Write about the techniques for structuring the page table
t p
19. Explain the basic concepts of segmentation. User view of program
20. What is demand paging and what is its use?
h t
21. Explain the various page replacement strategies. Page replacement-basic
scheme With diagram
22. What is thrashing and explain the methods to avoid thrashing?
23. What are files and explain the access methods for files?
24. Explain the schemes for defining the logical structure of a directory
25. Explain the allocation methods for disk space. Contiguous allocation advantage,
disadvantage & diagram Linked allocation advantage, disadvantage & diagram
Indexed allocation advantage, disadvantage & diagram
26. Explain the various disk scheduling techniques FCFS scheduling
27. Write notes about disk management and swap-space management. Disk
formatting- low level formatting
16
[Link]