Operating-Systems Question Paper Operating - Systems Question Paper
Operating-Systems Question Paper Operating - Systems Question Paper
Question Bank
Vision of Institution
To build Jeppiaar Engineering College as an Institution of Academic Excellence in Technical
education and Management education and to become a World Class University.
Mission of Institution
To equip students with values, ethics and life skills needed to enrich their lives and
M3
enable them to meaningfully contribute to the progress of society
M4 To prepare students for higher studies and lifelong learning, enrich them with the
practical and entrepreneurial skills necessary to excel as future professionals and
contribute to Nation’s economy
M3 To produce engineers with good professional sKills, ethical values and life skills for the
betterment of the society.
PEO3 Apply ethical Knowledge for professional excellence and leadership for the
betterment of the society.
PEO4 Develop life-long learning skills needed for better employment and
entrepreneurship
OBJECTIVES:
OS – iOS and Android – Architecture and SDK Framework, Media Layer, Services Layer, Core
OS Layer, File System.
TOTAL : 45 PERIODS
TEXT BOOK :
INDEX
UNIT NO TEXT/ REFERENCE BOOK PAGE
NO
UNIT -I Abraham Silberschatz, Peter Baer Galvin and Greg Gagne,
―Operating System Concepts‖, 9th Edition, John Wiley and Sons 4-98
Inc., 2012.
UNIT -II Abraham Silberschatz, Peter Baer Galvin and Greg Gagne,
―Operating System Concepts‖, 9th Edition, John Wiley and Sons 103-422
Inc., 2012.
UNIT -III Abraham Silberschatz, Peter Baer Galvin and Greg Gagne,
―Operating System Concepts‖, 9th Edition, John Wiley and Sons 455-572
Inc., 2012.
UNIT -IV Abraham Silberschatz, Peter Baer Galvin and Greg Gagne,
―Operating System Concepts‖, 9th Edition, John Wiley and Sons 575-688
Inc., 2012.
UNIT -V Abraham Silberschatz, Peter Baer Galvin and Greg Gagne,
―Operating System Concepts‖, 9th Edition, John Wiley and Sons 695-795
Inc., 2012.
UNIT I
OPERATING SYSTEMS OVERVIEW
Computer System Overview-Basic Elements, Instruction Execution, Interrupts, Memory
Hierarchy, Cache Memory, Direct Memory Access, Multiprocessor and Multicore Organization.
Operating system overview-objectives and functions, Evolution of Operating System.-Computer
System Organization-Operating System Structure and Operations- System Calls, System
Programs, OS Generation and System Boot.
PART A
Blooms
S.
Question CO Taxanomy
No.
Level
1 What are the objectives of operating system?
(AU: April/May 2010) (AU: May/June 2012)
(April/May 2017)
Ans: An operating system is a program that
manages the computer hardware. it act as an C212.1 BTL-1
intermediate between a users of a computer and the
computer hardware. It controls and coordinates the
use of the hardware among the various application
programs for the various users.
So, both DMA and cache are used for increasing the
speed of memory access.
user interaction is
there won’t be any user
involved in the
interactions
processing
14 Define: process
Ans: A process is a program in execution. It is an
active entity and it includes the process stack, C212.1 BTL-1
containing temporary data and the data section
contains global variables.
16 What is scheduler?
Ans: A process migrates between the various
scheduling queues through out its life time. The OS C212.1 BTL-1
must select processes from these queues in some
fashion. This selection process is carried out by a
scheduler.
29
Summarize the functions of DMA.
Ans: Direct memory access (DMA) is a method that
allows an input/output (I/O) device to send or
receive data directly to or from the main memory, C212.1 BTL-2
bypassing the CPU to speed up memory operations.
The process is managed by a chip known as a DMA
controller (DMAC).
• Free-space management.
• Storage allocation.
• Disk scheduling
Ans:Program execution
Communications
Error detection
devices.
Ans:Increased throughput
C212.1 BTL-1
Economy of scale
Increased reliability
Ans:
Process Control
C212.1 BTL-1
File-management
Device-management
Information maintenance
Communications
Ans:
C212.1 BTL-1
User Mode
Monitor Mode
Ans:
Ans:
Operating System
Computer Hardware
PARTB&C
Refer page no 464 – 466 from text book “Abraham C212.1 BTL-1
Silberschatz, Peter Baer Galvin and Greg Gagne,
“Operating System Concepts”, 9th Edition, John
Wiley and Sons Inc., 2012”.
(Apr/May 2018)
Refer page no 53-56 from text book “Abraham
Silberschatz, Peter Baer Galvin and Greg Gagne,
“Operating System Concepts”, 9th Edition, John
Wiley and Sons Inc., 2012”.
UNIT II
PROCESS MANAGEMENT
10 What is a thread?
Ans: A thread otherwise called a lightweight
process (LWP) is a basic unit of CPU utilization, it
comprises of a thread id, a program counter, a C212.2 BTL-1
register set and a stack. It shares with other threads
belonging to the same process its code section, data
section, and operating system resources such as open
files and signals.
Kernel threads:-
Kernel threads are supported directly by the
operating system .Thread creation, scheduling and
management are done by the operating system.
Therefore they are slower to Creating & manage
compared to user threads. If the thread performs a
blocking system call, the kernel can schedule
another thread in the application for execution
13 What is the use of fork and exec system calls? C212.2 BTL-1
• Switching context
• Switching to user mode
• Jumping to the proper location in the user
program to restart that program.
20 What are the various scheduling criteria for CPU
scheduling?
Ans: The various scheduling criteria are,
C212.2 BTL-1
• CPU utilization
• Throughput
• Turnaround time
• Waiting time
• Response time
21 What are the requirements that a solution to the
critical section problem must satisfy?
Ans: The three requirements are C212.2 BTL-1
• Mutual exclusion
• Progress
• Bounded waiting
22 Define: Critical section problem.
Ans: Consider a system consists of 'n' processes.
Each process has segment of code called a critical
section, in which the process may be changing C212.2 BTL-1
common variables, updating a table, writing a file.
When one process is executing in its critical section,
no other process can allowed executing in its critical
section.
boolean rv = target;
target = true;
return rv;
C212.2 BTL-1
}
• Swap
boolean temp = a;
a = b;
b = temp;
25 What is a semaphore?
Ans: A semaphore 'S' is a synchronization tool
which is an integer value that, apart from
initialization, is accessed only through two standard C212.2 BTL-1
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 Define Deadlock.
Ans: A process requests resources; if the resources
are not available at that time, the process enters a
wait state. Waiting processes may never again C212.2 BTL-1
change state, because the resources they have
requested are held by other waiting processes. This
situation is called a deadlock.
Ans: Job Queue: As process enters the system they C212.2 BTL-1
are put into job queue.
39 Define schedulers?
No preemption
Circular Wait
PART B&C
1 Suppose that the following processes arrive for
execution at the times indicated. Each process will
run the listed amount of time. In answering the
questions, use non-preemptive scheduling and
base all decisions on the information you have at
the time the decision must be made. (Nov/Dec
2018)
Process Arrival Time Burst Time
P1 0.0 8
C212.2 BTL-1
P2 0.4 4
P3 1.0 1
UNIT III
STORAGE MANAGEMENT
PART A
S. Question CO Blooms
No. Taxano
my
Level
1 What is the difference between user-level instructions and
privileged instructions? (April/May 2017)
Ans: A non-privileged (i.e. user-level) instruction is an
instruction that any application or user can execute. A privileged C212.3 BTL-1
instruction, on the other hand, is an instruction that can only be
executed in kernel mode. Instructions are divided in this manner
because privileged instructions could harm the kernel.
Ans: In certain situations the page tables could become large C212.3 BTL-1
enough that by paging the page tables, one could simplify the
memory allocation problem (by ensuring that everything is
allocated as fixed-size pages as opposed to variable-sized
chunks) and also enable the swapping of portions of page table
that are not currently used.
Logical Physical
1. An address seen by
memory unit that is, the one
loaded into the memory
address register of the
1. An address generated memory is referred to as
by CPU is referred to us a physical address.
logical address.
(May/June 2015)
Ans: The LDT is supposed to contain memory segments which
are private to a specific program, while the GDT is supposed to
contain global segments.
12 Define Overlays.
Ans: To enable a process to be larger than the amount of
memory allocated to it, overlays are used. The idea of overlays
is to keep in memory only those instructions and data that are C212.3 BTL-1
needed at a given time.
When other instructions are needed, they are loaded into space
occupied previously by instructions that are no longer needed.
13 Define swapping.
Ans: A process needs to be in memory to be executed. However
a process can be swapped temporarily out of memory to a C212.3 BTL-1
backing store and then brought back into memory for continued
execution. This process is called swapping.
1. When the user is paying for management costs, and the costs
are cheaper for a time-sharing system than for a single-user
computer. C212.3 BTL-1
Ans:
Protection bits that are associated with each frame accomplish C212.3 BTL-1
memory protection in a paged environment. The protection bits
can be checked to verify that no writes are being made to a read-
only page.
Paging?
Ans:
The two major problems to implement demand paging is
developing,
Ans:
C212.3 BTL-1
When the allocated memory may be slightly larger than the
requested memory, the difference between these two numbers is
internal fragmentation.
Ans:
Compaction is a solution to external fragmentation. The C212.3 BTL-1
memory contents are shuffled to place all free memory together
in one large block. It is possible only i f relocation is dynamic,
and is done at execution time.
Ans:
Paging is a memory management scheme that permits the
C212.3 BTL-1
physical -address space of a process to be non-contiguous. In
the case of paging, physical memory is broken into fixed-sized
blocks called frames and logical memory is broken into blocks
of the same size called pages.
Ans:
When the bit is set to valid, this value indicates that the
C212.3 BTL-1
associated page is in the process’s logical address space, and is
thus a legal page. If the bit is said to invalid, this value indicates
that the page is not in the process’s logical address space. Using
the valid-invalid bit traps illegal addresses.
Ans:
Segmentation is a memory management scheme that supports
the user view of memory. A logical address space is a collection
of segments. The logical address consists of segment number
and offset. If the offset is legal, it is added to the segment base
to produce the address in physical memory of the desired byte.
Ans:
All addresses need to be adjusted upward by 250.So the
adjusted addresses would be 300, 328, 400, 402, and 40
Ans:
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 C212.3 BTL-1
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.
Ans:
C212.3 BTL-1
An algorithm is evaluated by running it on a particular string of
memory references and computing the number of page faults.
The string of memory reference is called a reference string
Ans:
This memory holds those pages that are not present in main C212.3 BTL-1
memory. The secondary memory is usually a high speed disk. It
is known as the swap device, and the section of the disk used for
this purpose is known as swap space.
Ans:
If no frame is free is available, find one that is not currently
C212.3 BTL-1
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.
Ans:
FIFO page replacement
Ans:
C212.3 BTL-1
Best fit allocates the smallest hole that is big enough. The entire
list has to be searched, unless it is sorted by size. This strategy
produces the smallest leftover hole.
Ans:
First fit allocates the first hole that is big enough. Searching can C212.3 BTL-1
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.
b. How many bits are there in the physical address? C212.3 BTL-1
Ans:
a. Logical address: 16 bits
PART B&C
1 Explain about given memory management techniques. (i)
Partitioned allocation (ii) Paging and translation look-aside
buffer. (Nov/Dec 2015) (Apr/May 2017)
C212.3 BTL-5
Refer page no 360-371 from text book “Abraham Silberschatz,
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
Identify the no.of page faults would occur for the following
replacement algorithms, assuming one, two, three, four, five,
six, or seven frames? Remember all frames are initially empty,
so your first unique pages will all cost one fault each.
14 What is thrashing and explain the methods to avoid thrash C212.3 BTL-1
UNIT IV
I/O SYSTEMS
Mass Storage Structure- Overview, Disk Scheduling and Management; File System Storage-
File Concepts, Directory and Disk Structure, Sharing and Protection; File System
Implementation- File System Structure, Directory Structure, Allocation Methods, Free Space
Management; I/O Systems.
PART A
Blooms
S.
Taxano
No Question CO
my
.
Level
1 Distinguish file from dictionary. (Apr/May2017)
Ans:
C212.4 BTL-4
A file is any kind of computer document whereas a directory is a
collection of files and folders.
Ans:
A virtual file system (VFS) or virtual file system switch is an
abstraction layer on top of a more concrete file system. The
purpose of a VFS is to allow client applications to access
different types of concrete file systems in a uniform way. A VFS
can, for example, be used to access local and network storage
devices transparently without the client application noticing the
difference.
9 What is a file?
Ans:
C212.4 BTL-1
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.
Reading a file
Repositioning within a file
Deleting a file
Truncating a file
Access rights
12 What are the different accessing methods of a file?
C212.4 BTL-1
Ans:
13 Define Directory.
Ans:
Two-level Directory
Tree-Structured Directories
Acyclic-Graph Directories
General Graph Directory
In the two-level directory structure, each user has her own user
file directory (UFD). Each UFD has a similar structure, but lists C212.4 BTL-1
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.
Ans:
Have an index in memory; the index gives the key and the disk
location of its corresponding record. Scan the index to find the
record you want, and then access it directly.
ISAM is Indexed sequential access method in which the file is C212.4 BTL-5
stored in sorted order. ISAM has a master index file, indicating
in what part of another index file the key you want is; the
secondary index points to the file records. In both cases, a binary
search is used to locate a record.
Methods of allocating disk space which are widely in use are C212.4 BTL-1
a. Contiguous allocation
b. Linked allocation
c. Indexed allocation
File-organization module
Basic file system
I/O control
Devices
Rotational latency is the additional time waiting for the disk to C212.4 BTL-1
rotate the desired 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.
The free-space list is implemented as a bit map or bit vector. C212.4 BTL-1 &
BTL-4
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.
Advantages: It is relatively simple and its efficiency in finding
the first free block or n consecutive free blocks on the disk.
Ans:
Ans:
C212.4 BTL-1
A pathname is the path from the root through all subdirectories
to a specified file. In a two-level directory structure a user name
and a file name define a path name.
Ans:
C212.4 BTL-1
The most general scheme to implement identity-dependent
access is to associate with each file and directory an access
control unit.
Ans:
Ans:
Effective access time = (1-p) *ma + p*page fault time C212.4 BTL-5
= (1-p) *100+p*25000000
= 100-100p+25000000*p
= 100 + 24999900p
Ans:
C212.4 BTL-1
For some page replacement algorithms, the page fault rate may
increase as the number of allocated frames increases
Ans:
Ans:
Spatial locality
Temporal locality.
Ans:
Ans:
No external fragmentation
Ans:
SCAN Scheduling
C-SCAN Scheduling
LOOK scheduling
Ans:
Ans:
C212.4 BTL-1
Sequentially - Print the content of the file.
Ans:
C212.4 BTL-1
There would be multiple paths to the same file, which could
confuse users or encourage mistakes. (Deleting a file with one
path deletes the file in all the other).
50 Why must the bit map for file allocation be kept on mass
storage rather than in main memory?
Ans:
C212.4 BTL-1
In case of system crash (memory failure ), the free-space list
would not be lost as it would be if the bit map had been stored in
main memory
PART B
1 Explain about directory structure? (Apr/May 2015) (Apr/May
C212.4 BTL-5
2017)
2 What are files and explain the access methods for files?
(Apr/May 2017)
Refer page no 379 – 382 from text book “Abraham Silberschatz, C212.4 BTL-1
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
Refer page no 484 – 491 from text book “Abraham Silberschatz, C212.4 BTL-5
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
Refer page no 498 – 502 from text book “Abraham Silberschatz, C212.4 BTL-5
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
10 What are the various disk space allocation methods. Explain in BTL–1
C212.4 & BTL-
detail. (Apr/May 2018) 5
11 Consider a file system where a file can be deleted and the disk
space reclaimed while the links to that file still exist. What
BTL-1 &
problems may occur if a new file is created in the same storage C212.4 BTL-4
area or with the same absolute path name? How these problem
be avoided? (Nov/Dec 2015)
14 Write briefly about file attributes, operations, types and structure C212.4 BTL-5
UNIT V
CASE STUDY
PART A
Blooms
S. Taxano
Question CO
No. my
Level
1 What are the features of Linux file system? (Apr/May 2017)
Ans:
• Specifying paths
C212.5 BTL-1
• Partition, drives/devises and Directories
• Mounting and Unmounting
• Case sensitivity
• File Extensions
• Hidden files
FAT can place the parts of the file wherever they fit. File names
can be up to 255 characters and file extensions longer than 3
characters. Easy to recover file names that have been deleted.
FAT is also useful for cross-platform compatibility.
Ans:
Linux Kernel modules has three component,
C212.5 BTL-1
Module management
Driver registration
Conflict resolution mechanism
Ans:
A mechanism that allows different device drivers to, reserve C212.5 BTL-1
hardware resources and to protect those resources from
accidental use by another driver.
Linux provides a ventral conflict resolution mechanism.
Ans:
Ans:
C212.5 BTL-4
• Full virtualization
Paravirtualization
• Hardware-assisted virtualization
16 Define Hypervisor.
Ans:
C212.5 BTL-1
A hypervisor or virtual machine monitor (VMM) is computer
software, firmware or hardware that Creatings and runs virtual
machines. A computer on which a hypervisor runs one or more
Ans:
There are two types of hypervisors: Type 1 and Type 2. Type 1 C212.5 BTL-1
hypervisors run directly on the system hardware. They are often
referred to as a "native" or "bare metal" or "embedded"
hypervisors in vendor literature. Type 2 hypervisors run on a
host operating system.
18 Define XEN.
Ans:
Ans:
• Better utilization of computer hardware.
• More securable and manageable than one kernel running C212.5 BTL-1
many applications.
• Reduce complexity of hardware.
• Consumes less power and less space.
• Requires less maintenance
Extended life for installed software.
20 Illustrate the key features of VMware server virtualization.
Ans:
• High Availability (HA) C212.5 BTL-2
• Fault Tolerance (FT)
• vMotion
• Storage vMotion
• Distributed Resource Scheduler (DRS)
21 Explain guest operating system.
Ans: A guest OS is the software installed on either a virtual
C212.5 BTL-2
machine (VM) or partitioned disk that describes an operating
system that is different than the host operating system.
Ans: "Demand zero" memory is a sections of memory that exist C212.5 BTL-1
only as virtual memory, without existing anywhere as physical
memory nor backed anywhere on disk.
Ans:
C212.5 BTL-2
i) Character Devices ii) Block Devices iii) Network
interfaces
Ans:
Ans:
Ans:
C212.5 BTL-1
DNS server or Domain Name Server is used to map the internet
names to an IP address. The system distributes data and the
naming of hosts hierarchically in a domain name space.
Ans:
32
What is handle? How does a process obtain a handle? C212.5 BTL-1
(Apr/May 2018)
Ans: A handle is an abstract reference to a resources.
Ans:
C212.5 BTL-1
Data Stripping means splitting the bits of each byte across
multiple disks .It is also called as Bit –level Striping.
Ans:
C212.5 BTL-1
Linux System composed of three main modules. They are:
Ans:
(ii).Driver Registration.
Ans:
C212.5 BTL-1
A Process is the basic context within which all user-requested
activity is serviced within the Operating system.
Ans:
C212.5 BTL-1
Process Personalities are primarily used by emulation libraries to
request that system call be compatible with certain versions of
UNIX.
Ans:
C212.5 BTL-1
It is the kernel's main cache for block-oriented devices such as
disk drives and is the main mechanism through which I/O to
these devices is performed.
Ans:
C212.5 BTL-1
Kernel is responsible for maintaining all the important
abstractions of the operating system including such things as
virtual memory and processes.
Ans:
Ans:
C212.5 BTL-1
The module management allows modules to be loaded into
memory and to talk to the rest of the kernel.
Ans:
C212.5 BTL-1
Driver Registration allows modules to tell the rest of the kernel
that a new driver has become available
Ans:
C212.5 BTL-1
This mechanism allows different device drivers to reserve
hardware resources and to protect those resources from
accidental use by another driver.
Ans:
C212.5 BTL-1
Device drivers include (i) Character devices such as printers,
terminals (ii) Block devices including all disk drives) and
network interface devices.
Ans:
PART B&C
1 Explain about Linux kernel and virtualization with neat sketch.
(Apr/May 2017) (Nov/Dec 2016)
Refer page no 703 – 705 from text book “Abraham Silberschatz, C212.5 BTL-2
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
Refer page no 804 – 809 from text book “Abraham Silberschatz, C212.5 BTL-2
Peter Baer Galvin and Greg Gagne, “Operating System
Concepts”, 9th Edition, John Wiley and Sons Inc., 2012”.
Answer: When there are few other users, the task is large, and
the hardware is fast, timesharing
makes sense. The full power of the system can be brought to
bear on the user’s
C212.5 BTL-1
problem. The problem can be solved faster than on a personal
computer. Another case
occurs when lots of other users need resources at the same time.
(Nov/Dec 2018)
Refer: https://www.passeidireto.com/arquivo/1000684/os6---
solutions-manual-/17