0% found this document useful (0 votes)
40 views53 pages

Ilovepdf Merged

The document is a model answer for the Summer 2024 examination on Operating Systems by the Maharashtra State Board of Technical Education. It includes important instructions for examiners, a marking scheme, and various questions along with model answers covering topics such as types of operating systems, process management, resource management, and interprocess communication. The document emphasizes assessing candidates' understanding rather than exact wording and allows for bilingual answers in certain cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views53 pages

Ilovepdf Merged

The document is a model answer for the Summer 2024 examination on Operating Systems by the Maharashtra State Board of Technical Education. It includes important instructions for examiners, a marking scheme, and various questions along with model answers covering topics such as types of operating systems, process management, resource management, and interprocess communication. The document emphasizes assessing candidates' understanding rather than exact wording and allows for bilingual answers in certain cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Important Instructions to examiners:


1) The answers should be examined by key words and not as word-to-word as given in the
model answer scheme.
2) The model answer and the answer written by candidate may vary but the examiner may
try to assess the understanding level of the candidate.
3) The language errors such as grammatical, spelling errors should not be given more
Importance (Not applicable for subject English and Communication Skills.
4) While assessing figures, examiner may give credit for principal components indicated in
the figure. The figures drawn by candidate and model answer may vary. The examiner
may give credit for any equivalent figure drawn.
5) Credits may be given step wise for numerical problems. In some cases, the assumed
constant values may vary and there may be some difference in the candidate’s answers
and model answer.
6) In case of some questions credit may be given by judgement on part of examiner of
relevant answer based on candidate’s understanding.
7) For programming language papers, credit may be given to any other program based on
equivalent concept.
8) As per the policy decision of Maharashtra State Government, teaching in English/Marathi
and Bilingual (English + Marathi) medium is introduced at first year of AICTE diploma
Programme from academic year 2021-2022. Hence if the students in first year (first and
second semesters) write answers in Marathi or bilingual language (English +Marathi), the
Examiner shall consider the same and assess the answer based on matching of concepts
with model answer.

Q. Sub Answer Marking


No Q.N. Scheme
1. Attempt any FIVE of the following: 10
a) List different types of operating system 2M
Ans.  Batch Operating System
 Multi-ProgrammingOperating System Any four
types 1/2M
 Time Shared Operating System each
 Multiprocessor System
 Distributed System
 Real Time Operating System
 Mobile Operating System
b) State any four services provided by an operating system 2M
Ans.  User Interface Any four
services
 Program Execution 1/2M each
 I/O Operation

Page 1 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

 File System Manipulation


 Communication
 Error Detection
 Resource Allocation
 Accounting
 Protection and Security
c) Draw process state diagram 2M
Ans.
Correct
diagram 2M

d) State two features of non-preemptive scheduling 2M


Ans.  Once CPU is allocated to the process, the process keeps the CPU
until it releases the CPU either by terminating or by switching to Any two
the waiting state. relevant
features 1M
 A process switches from running state to waiting state or running to each
terminated state.
 Low scheduling overhead.
 Simple to implement and manage.
 Less responsive in terms of priority for urgent task.
e) Define following terms: 2M
i. Memory compaction
ii. Fragmentation Correct
Ans. i. Memory compaction: definition
1M each
The process of shuffling the memory contents so as to place all free
memory together in one large block is known as memory compaction.

ii. Fragmentation:
When processes are loaded and removed from memory, the free
memory space is broken into little pieces which is known as
fragmentation.

Page 2 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

f) Write syntax of PWD command and explain its use with the help 2M
of suitable example.
Ans. Syntax: $ pwd
PWD command is used to print (display) current working directory. Syntax 1M

Use &
Example: $ pwd example 1M
Above example displays absolute pathname.
Output: /home/poly
g) List any four file operations. 2M
Ans.  Creating a file
 Writing a file Any four
operations
 Reading a file 1/2M each
 Repositioning within a file
 Deleting a file
 Appending new information to the end of the file
 Renaming an existing file.
 Truncating a file
 Creating copy of a file, copy file to another I/O device such as
printer or display
2. Attempt any THREE of the following: 12
a) Explain Resource management of an operating system. 4M
Ans.  Resource Management in Operating System is the process to
manage all the resources efficiently like CPU, memory, Any
relevant
input/output devices, and other hardware resources among the explanation
various programs and processes running in the computer. 4M
 Computer's resources are limited and several users or programs
may need to utilize the same resources—such as memory and
CPU—at the same time.
 Operating system has to manage and ensure that all processes get
the resources they need to execute, without any problems like
deadlocks.
 Operating systems use various scheduling algorithms to ensure
that each process gets its fair share of CPU time.
 Operating systems use virtual memory techniques to manage
memory efficiently.
 Operating systems use file system management techniques to
manage disk space efficiently.
 File system management allows the operating system to create,

Page 3 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

delete, and modify files and directories in Secondary Storage


Device.
 Operating systems use various network management techniques to
manage network bandwidth efficiently.
b) Explain different components of operating system. 4M
Ans. List of System Components:
1. Process Management Any two
2. Main Memory Management components
with
3. File Management relevant
4. I/O System Management explanation
5. Secondary Storage Management 2M each

1.Process Management:
A program is a set of instructions. When CPU is allocated to a
program, it can start its execution. A program in execution is a
process. A word processing program run by a user on a PC is a
process. A process needs various system resources including CPU
time, memory, files and I/O devices to complete the job execution.
These resources can be given to the process when it is created or
allocated to it while it is running.
The operating system responsible for the following activities in
connection with process management:
 Creation and deletion of user and system processes.
 Suspension and resumption of processes.
 A mechanism for process synchronization.
 A mechanism for process communication.
 A mechanism for deadlock handling.

2. Main-Memory Management
Main memory is a large array of words or bytes, ranging in size from
hundreds of thousands to billions. Each word or byte has its own
address. Main memory is a repository of quickly accessible data
shared by the CPU and I/O devices. The central processor reads
instructions from main memory during the instruction fetch cycle and
both reads and writes data from main memory during the data fetch
cycle. The main memory is generally the only large storage device
that the CPU is able to address and access directly.
The operating system responsible for the following activities in
connection with main memory s management:

Page 4 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

 Keeping track of which parts of memory are currently being used


and by whom.
 Deciding which processes (or parts thereof) and data to move into
and out of memory.
 Allocating and deallocating memory space as needed.

3. File Management
A file is a collected of related information defined by its creator.
Computer can store files on the disk (secondary storage), which
provide long term storage. Some examples of storage media are
magnetic tape, magnetic disk and optical disk. Each of these media
has its own properties like speed, capacity, and data transfer rate and
access methods. A file system normally organized into directories to
ease their use. These directories may contain files and other
directions.
The operating system responsible for the following activities in
connection with file management:
 The creation and deletion of files.
 The creation and deletion of directions.
 The support of primitives for manipulating files and directions.
 The mapping of files onto secondary storage.
 The backup of files on stable storage media.

4. I/O device Management


Input / Output device management provides an environment for the
better interaction between system and the I/O devices (such as
printers, scanners, tape drives etc.). To interact with I/O devices in an
effective manner, the operating system uses some special programs
known as device driver. The device drivers take the data that
operating system has defined as a file and then translate them into
streams of bits or a series of laser pulses (in regard with laser printer).
The I/O subsystem consists of several components:
 A memory management component that includes buffering,
caching, spooling
 A general device driver interface
 Drivers for specific hardware devices

Page 5 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

5. Secondary-Storage Management
The computer system provides secondary storage to back up main
memory. Secondary storage is required because main memory is too
small to accommodate all data and programs, and the data that it
holds is lost when power is lost. Most of the programs including
compilers, assemblers, word processors, editors, and formatters are
stored on a disk until loaded into memory. Secondary storage consists
of tapes drives, disk drives, and other media.
The operating system is responsible for the following activities in
connection with disk management:
 Free space management
 Storage allocation
 Disk scheduling.
c) Describe message passing system of interprocess communication 4M
(IPC)
Ans. Message Passing: In this model, communication takes place by Relevant
explanation
exchanging messages between cooperating processes. It allows
3M
processes to communicate and synchronize their action without
sharing the same address space. It is particularly useful in a Correct
distributed environment when communication process may reside on diagram 1M
a different computer connected by a network. Communication
requires sending and receiving messages through the kernel.
The processes that want to communicate with each other must have a
communication link between them. Between each pair of processes
exactly one communication link exists.

Page 6 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

d) What is CPU Scheduler? Explain the preemptive and non- 4M


preemptive type of scheduling
Ans. CPU Scheduler: When the CPU becomes idle, the CPU scheduler selects
CPU
one of the processes in the ready queue for execution. The CPU scheduler
scheduler
selects a process from the processes in memory that are ready to execute 2M
and allocates the CPU to that process.
Relevant
Pre-emptive scheduling: - Once the CPU is allocated to a process, the CPU explanation
is forcefully removed from that process due to occurrence of interrupt or of
completion of I/O request by the requesting process. In this scheduling, a Preemptive
process changes its status from running state to ready state or waiting state 1M
to ready state. &
non-
preemptive
Non-Preemptive scheduling: - Once the CPU is allocated to a process, the
1M
process keeps the CPU until it releases the CPU by terminating or by
switching to the waiting state. Control of CPU is with the process to which
it is allocated.In this scheduling, a process changes its status from running
to waiting or running to terminate.

3. Attempt any THREE of the following: 12


a) Define Process. Draw a Process Control Block and explain the 4M
information in PCB
Ans. Process: A process is defined as, a program under execution, which
competes for the CPU time and other resources. Define
A process is a program in execution. Process is also called as job, task process
1M
and unit of work.
Diagram of
PCB with
correct
naming /
block
1M

Any 4
blocks of
information
in PCB
2M

Fig: Process Control Block

Page 7 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Following are the blocks in PCB:


1. Process Number: Each process is identified by its process
number, called Process Identification Number (PID). Every process
has a unique process-id through which it is identified. The process-id
is provided by the OS. The process id of two processes could not be
same because process-id is always unique.

2. Priority: Each process is assigned a certain level of priority that


corresponds to the relative importance of the event that it services
process priority is the preference of the one process over other
process for execution. Priority may be given by the user/system
manager or it may be given internally by OS. This field stores the
priority of a particular process.

3. Process State: This information is about the current state of the


process. The state may be new, ready, running, and waiting, halted,
and so on.

4. Program Counter: The counter indicates the address of the next


instruction to be executed for this process.

5. CPU Registers: The registers vary in number and type, depending


on the computer architecture. They include accumulators, index
registers, stack pointers, and general-purpose registers, plus any
condition-code information. Along with the program counter, this
state information must be saved when an interrupt occurs, to allow
the process to be continued correctly afterward.

6. CPU Scheduling Information: This information includes a


process priority, pointers to scheduling queues, and any other
scheduling parameters.

7. Memory Management Information: This information may


include such information as the value of the base and limit registers,
the page tables, or the segment tables, depending on the memory
system used by the operating system.

Page 8 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

8. Accounting Information: This information includes the amount of


CPU and real time used, time limits, account numbers, job or process
numbers, and so on.

9. I/O Status Information: This information includes the list of I/O


devices allocated to the process, a list of open files, and so on.

10. File Management: It includes information about all open files,


access rights etc.

11. Pointer: Pointer points to another process control block. Pointer


is used for maintaining the scheduling list.
b) Define deadlock. State the conditions necessary for deadlock. 4M
Ans. Deadlock: Deadlock is a situation when two or more processes get
locked and cannot processed further because of inter-dependability. Define
deadlock
In real world, deadlocks can arise when two persons wait for phone 1M
calls from one another.
OR State any 3
Deadlock is defined as, "a situation where a set of processes are conditions
blocked because each process is holding a resource and waiting for necessary
for deadlock
another resource acquired by some other process".
3M
Necessary Conditions to Deadlock:
Mutual Exclusion: At least one resource is held in a non-sharable
mode, that is only one process at a time can use the resource. If
another process requests that resource, the requesting process must be
delayed until the resource has been released. Each resource is either
currently assigned to exactly one process or is available.

Hold and Wait: There must exist a process that is holding at least
one resource and is waiting to acquire additional resources that are
currently being held by another process. Process currently holding
resources granted earlier can request new resources.

No Pre-emption: Resources cannot be pre-empted; i.e. resource can


only be released voluntarily by the process holding it, after the
process has completed its task. Resources previously granted cannot
be forcibly taken away from a process. They must be explicitly
released by the process holding them.

Page 9 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Circular Wait: There exist a set (P0, P1, ----- Pn) of waiting
processes such that P0 is waiting for a resource which is held by P1,
P1 is waiting for a resource which is held by P2. Pn-1 is waiting for
resources which are held by Pn and Pn is waiting for a resource which
is held by P0. Thus there must be a circular chain of two or more
processes, each of which is waiting for a resource held by the next
member of the chain.

c) Explain the following terms with respect to memory 4M


management:
i) Dynamic relocation Each term
ii) Swapping explanation
2M
Ans. i) Dynamic Relocation
When a program gets swapped out to a disk memory, then it is not
always possible that when it is swapped back into main memory then
it occupies the previous memory location, since the location may still
be occupied by another process. We may need to relocate the process
to a different area of memory. Thus there is a possibility that program
may be moved in main memory due to swapping.

ii) Swapping
Swapping is mechanism in which a process can be swapped
temporarily out of main memory (or move) to secondary storage
(disk) and make that memory available to other processes. At some
later time, the system swaps back the process from the secondary
storage to main memory.

Fig: swapping in memory management

Page 10 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

d) With suitable diagram, explain how contiguous file allocation is 4M


performed?
Ans. • The contiguous allocation method requires each file to occupy a Any
set of contiguous addresses on the disk. Disk addresses define a relevant
Diagram
linear ordering on the disk. Contiguous allocation of a file is 1M
defined by the disk address of the first block and its length. If the
file is ‘n’ blocks long and starts at location ‘b’, then it occupies Explanation
blocks b, b+1, b+2, - - - - - b+n-1. The directory entry for each 3M
file indicates the address of the starting block and the length of
the area allocated for this file.
• Contiguous allocation supports both sequential and direct access.
• For direct access to block ‘i’ of a file, which starts at block ‘b’,
we can immediately access block b+i. The difficulty with
contiguous allocation is finding space for a new file.
• For direct access to block ‘i’ of a file, which starts at block ‘b’,
we can immediately access block b+i.
• The difficulty with contiguous allocation is finding space for a
new file.
• If file to be created are ‘n’ blocks long, we must search free space
list for ‘n’ free contiguous blocks.

4. Attempt any THREE of the following: 12


a) Compare between Time sharing operating system and 4M
multiprogramming operative system.

Page 11 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Ans. Time sharing operating Multiprogramming Any 4


system operating system correct
points 1M
In this time sharing Operating Multiprogramming operating each
system many users/processes system allows to execute
are allocated with computer multiple processes by
resources in respective time monitoring their process states
slots. and switching in between
processes.
Processors time is shared with Processor and memory
multiple users that’s why it is underutilization problem is
called as time sharing operating resolved and multiple
system. programs runs on CPU that’s
why it is called
multiprogramming.
In this process, two or more In this, the process can be
users can use a processor in executed by a single
their terminal. processor.
Time sharing OS has fixed time Multi-programming OS has no
slice. fixed time slice.
Time sharing system minimizes Multiprogramming system
response time. maximizes processor use.
Example: Windows NT. Example: Mac OS.

b) Explain any four types of system call. 4M


Ans. 1.Process and Job Control Explanation
 A running program needs to be able to halt its execution either of any 4
system calls
normally (end) or abnormally (abort). If the program discovers an 1M each
error in its input and wants to terminate abnormally, it may also
want to define an error level.
 A process or job executing one program may want to load and
execute another program. This allows the control card interpreter
to execute program as directly by the control cards of the user job.
If we create a new job or process, we should able to control its
execution.
 We may also want to terminate a job or process that we created
(terminate process). If we find that it is incorrect or no longer
needed we need waiting time to finish execution (wait time).
Another set of system calls are helpful in debugging a program.

Page 12 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Example of Process related system call:


a. End, Abort.
b. Load, Execute.
c. Create process, Terminate process.
d. Ready process, Dispatch process.
e. Suspend process, Resume process.
f. Get process attributes, Set process attributes.
g. Wait for Time.
h. Wait event, Signal event.
i. Change priority of process.

2.File Management
 We can identify several common system calls dealing with files.
We first need to be able to create and delete files such a system
call requires the name of the file and perhaps some of its
attributes.
 Once, the file is created, we need to open it and use it. We may
also read, write and reposition. Finally we need to close the file,
indicating that we are no longer using it.
Example of file related system call:
a. Create file, Delete file
b. Open a file, Close a file.
c. Create directory.
d. Read, Write, Reposition.
e. Get file attributes, Set file attributes.
f. Create a link.
g. Change working directory.

3.Device Management
 Files can be thought of as abstract or virtual devices. Thus many
of the system calls for files are also needed for devices.
 If there are multiple users of the system however we must first
request the device to ensure that we have exclusive use of it. After
we are finished with the device, we must release it. These
functions are similar to the open/close system calls for files.
 Once, the device has been requested we can read, write and
reposition the device just as with files.

Page 13 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

System call related to device management:


a. Request device, Release device.
b. Read, Write, Reposition.
c. Get device attributes, set device attributes.

4. Information Maintenance
 Many system calls exist simply for the purpose of transferring
information between the user program and the operating system.
For example most systems have a system call to return the current
time and date.
 Other system calls may return information about the system such
as the number of current users, the version number of the
operating system, the amount of free memory or disk space and so
on.
 In addition the operating system keeps information about all of its
jobs and processes and there are system calls to access this
information. Generally, there are also calls to reset it. (get process
attributes and set process attributes).
Information Maintenance related system call:
a. Get Time or Date, Set Time or Date.
b. Get system Data, Set system Data.
c. Get process, File or Device attributes.
d. Set process, File or Device attributes.
5. Communication
 There are two models of inter-process communication, the
message-passing model and the shared memory model.
 Message-passing uses a common mailbox to pass messages
between processes
 Shared memory use certain system calls to create and gain access
to regions of memory owned by other processes
Communication related system calls:
a. Establish a connection.
b. Send, receive messages.
c. Terminate a connection

c) Describe how context switch is executed by operating system 4M


Ans. • When CPU switches to another process, the system must save the Diagram
state of the old process and load the saved state for the new 1M
process. This task is known as a context switch.

Page 14 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

• CPU switching from one process to another process is called a


context switch. Explanation
3M
• Context switch times are highly dependent on hardware support.
Its speed varies from machine to machine, depending on the
memory speed, the number of registers that must be copied and
the existence of special instructions.
• This enables multiple processes to share a single CPU. The
context switch is an essential feature of a multitasking operating
system.
• When the process is switched, the following information is stored:
• Program Counter
• Scheduling Information
• Base and limit register value
• Currently used register
• Changed State
• I/O State
• Accounting

Fig: Context Switching


d) Compare Short Job First (SJF) and Shortest Remaining Time 4M
(SRTN) scheduling algorithm (any four points)
Ans. Any 4
Short Job First (SJF) Shortest Remaining Time correct
(SRTN) points 1M
It is a non-preemptive It is a preemptive algorithm. each
algorithm.
It involves less overhead than It involves more overheads
SRJF. than SJF.

Page 15 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

It leads to comparatively lower It leads to increased


throughput. throughput as execution time
is less.
It minimizes the average It may or may not minimize
waiting time for each process. the average waiting time for
each process.
It involves lesser number of It involves higher number of
context switching. context switching.
Short processes are executed Shorter processes run fast and
first and then followed by longer processes show poor
longer processes. response time.

e) Describe variable partitioning with the help of suitable example 4M


Ans. • In variable memory partitioning the partitions can vary in number
and size. In variable memory partitioning the amount of memory Explanation
allocated is exactly the amount of memory a process requires. 2M
• The operating system keeps a table indicating which parts of Any
memory are available and which are occupied. Initially all relevant
memory is available for user programs and is considered as one Example
large block of available memory, a hole. 2M
• When a job arrives and needs memory, we search for a hole large
enough for this job. If we find one, we allocate only as much as is
needed, keeping the rest available to satisfy future requests.

For example, assume 256K memory available and a resident monitor


of 40K. This situation leaves 216K for user programs.

Page 16 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

5. Attempt any TWO of the following: 12


a) Explain the use of following OS tools: 6M
i) Device Manager
ii) Task Scheduler
Ans. i) Device Manager use:
1. Managing all the hardware or virtual devices of computer system.
Any 2 uses
2. Allow interaction with hardware devices through device driver. of Device
3. Used to install device and component-level drivers as well as Manager
associated software. 1½ M each
4. Allocate devices to the process as per process requirement and
priority.
5. Deallocate devices either temporarily or permanently depending
on condition. Any 2 uses
6. Keeping track of all device’s data and location. of Task
7. Monitoring device status like printers, storage drivers and other Scheduler
devices. 1½ M each
8. Used to enforce the predetermined policies and decides which
process receives the device when and for how long.

ii) Task scheduler use:


1. Used to automate the execution of programs, scripts, and various
tasks at specific intervals or specific events.
2. Used to select the next jobs to be admitted into the system and the
next process to run.
3. Schedules tasks on CPU. Which task to run first, which has high
priority, which has low latency is decided by schedulers.

Page 17 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

4. Schedulers aim to provide fair access to system resources among


competing processes or users.
5. Task schedulers strive to maximize the overall throughput of the
system by executing tasks in a manner that minimizes idle time
and maximizes the number of tasks completed within a given
timeframe.
b) Explain user level thread and Kernel level thread with its 6M
advantages and disadvantages
Ans. User Level Thread For each
Thread
 In a user thread, all of the work of thread management is done by
explanation
the application and the kernel is not aware of the existence of 1M
threads.
 The thread library contains code for creating and destroying
threads, for passing message and data between threads, for 1 advantage
of each 1M
scheduling thread execution and for saving and restoring thread
contexts.
 The application begins with a single thread and begins running in
that thread. 1 Dis-
 User level threads are generally fast to create and manage. advantage
of each
1M
Advantages of user level thread over Kernel level thread:
1. Thread switching does not require Kernel mode privileges.
2. User level thread can run on any operating system. (Diagram
3. Scheduling can be application specific. optional)
4. User level threads are fast to create and manage.

Disadvantages of user level thread:


1. Limited Parallelism: Since user-level threads are managed within
the context of a single process, they are not well-suited for
applications that need to take full advantage of multi-core
processors or for applications that require parallel execution
across different processes.
2. Blocking: If a user-level thread blocks due to I/O or other reasons,
all threads in the same process can be blocked, leading to poor
utilization of resources.
3. No True Parallelism: User-level threads cannot execute in true
parallel on multi-core systems since they are managed by a single
kernel-level thread

Page 18 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

4. It is not appropriate for a multiprocessor system.

Kernel Level Threads


 In Kernel level thread, thread management done by the Kernel.
 There is no thread management code in the application area.
 Kernel threads are supported directly by the operating system.
 Any application can be programmed to be multithreaded.
 All of the threads within an application are supported within a
single process.
 The Kernel maintains context information for the process as a
whole and for individual threads within the process.
 Scheduling by the Kernel is done on a thread basis.
 The Kernel performs thread creation, scheduling and management
in Kernel space.
 Kernel threads are generally slower to create and manage than the
user threads.

Advantages of Kernel level thread:


1. Kernel can simultaneously schedule multiple threads from the
same process on multiple process.
2. If one thread in a process is blocked, the Kernel can schedule
another thread of the same process.
3. Kernel routines themselves can multithreaded.

Disadvantages:
1. Kernel threads are generally slower to create and manage than the
user threads.
2. Transfer of control from one thread to another within same process
requires a mode switch to the Kernel.

Page 19 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

c) Consider the string: 6M


0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7 with frame size 3 and 4,
calculate page fault in both the cases using FIFO algorithm
Ans. Note: Representation of frame can be in any order
FIFO : FIFO
implementat
i)Frame Size=3 ion with
frame size 3
3M

OR

Total Page Faults :16 FIFO


implementat
ii)Frame Size=4 ion with
frame size 4
3M

OR

Total Page Faults :08


6. Attempt any TWO of the following: 12
a) What is the average turnaround time for the following process 6M
using :
i) FCFS scheduling algorithm
ii) SJF non preemptive scheduling algorithm
iii) Round Robin Scheduling algorithm

Page 20 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Process Arrival time Burst time


P1 0 8
P2 1 4
P3 2 1
For each
Ans. Note :Any time slice can be considered by student for Round Robin algorithm:
e.g. 2, 3, 4 etc Gantt Chart
1M
i) Gantt Chart FCFS
Correct
turnaround
P1 P2 P3 time
calculation
0 8 12 13 1M each

Turnaround Time =Completion Time - Arrival Time


P1=8-0=8
P2=12-1=11
P3=13-2=11
Average turnaround time=Turnaround time of all processes /
Number of processes
= (8+11+11) /3
=10 ms / Units

ii) Gantt Chart SJF non-preemptive

P1 P3 P2

0 8 9 13

Turnaround Time =Completion Time - Arrival Time


P1=8-0=8
P2=13-1=12
P3=9-2=7
Average turnaround time=Turnaround time of all processes /
Number of processes
= (8+12+7) /3
= 9 ms/ Units

Page 21 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

iii) Gantt Chart Round Robin

Consider Time Quantum= 2 Units

P1 P2 P3 P1 P2 P1 P1

0 2 4 5 7 9 11 13

Turnaround Time =Completion Time - Arrival Time


P1=13-0=13
P2=9-1=8
P3=5-2=3
Average turnaround time=Turnaround time of all processes /
Number of processes
= (13+8+3) /3
= 8 ms / Units
(OR)

Consider Time Quantum= 3 Units

P1 P2 P3 P1 P2 P1

0 3 6 7 10 11 13

Turnaround Time =Completion Time - Arrival Time


P1=13-0=13
P2=11-1=10
P3=7-2=5
Average turnaround time=Turnaround time of all processes /
Number of processes
= (13+10+5) /3
= 9.33 ms/ Units
b) Explain bit map vector and linked list free space management 6M
techniques with its advantages and disadvantages
Ans. 1 )Bitmap Vector: Bitmap
Vector
The free-space list is implemented as a bit map or bit vector.
explanation
1M
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.

Page 22 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

For example, consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12,


13 are free and the rest of the blocks are allocated. Any 1
Advantage
The free-space bit map would be : 0011110011111100 1M,

Any 1
Disadvantag
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 e 1M

0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0

1=Free block 0= Allocated block Linked List


explanation
1M
The main advantage of this approach is its relative simplicity and its
efficiency in finding the first free block or n consecutive free blocks
on the disk. Any 1
Advantage
Advantages of Bit Map vector method 1M
1. Simple and easy to understand.
2. Consumes less memory. Any 1
3. It is efficient to find free space. Disadvantag
Disadvantages of the Bit Map vector method e 1M
1. The operating system goes through all the blocks until it finds
a free block.
(diagram is
2. It is not efficient when the disk size is large. optional)

2) Linked List
In this approach, the free disk blocks are linked together i.e. a free
block contains a pointer to the next free block. The block number of
the very first disk block is stored at a separate location on disk and is
also cache in memory. In this approach, link all the disk blocks
together, keeping a pointer to the first free block. This block contains
a pointer to the next free disk block, and so on.

Page 23 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Advantages of linked list:


1. Files can be extended, no fragmentation problems.
2. Sequential Access is easy: just chase links.
3. No extra space for the free list.
4. Starting and ending of the file can be easily found out by the
linked list.
Disadvantages of linked list:
1. Cannot be effectively used for direct access method.
2. Random access is virtually impossible. Lots of seeking, even
in sequential access.
3. Pointers which are required need additional memory space.
4. It is not reliable as the blocks are scattered on the disk
anywhere.
c) Explain with diagram single level directory structure and two 6M
level directory structure with its advantages and disadvantages.
Ans. Single Level Directory Structure: Single level
This is the simplest directory structure. All the files are stored in the directory
same directory which is easy to support and understand. But a unique structure
name must be assigned to each file. explanation
If the number of files in the directory increases, it may become 1M,
difficult to remember names of all files.
Advantage:
 Less time required to search the file, because all files are Any 1
stored in same directory. Advantage
 Single level directory structure is easy to implement and 1M
maintain.
 Single level directory structure, the operations like creation,
searching, deletion, updating are very easy and faster

Page 24 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Disadvantages
 Not suitable for a large number of files and more than one
Any 1
user. disadvantag
 Because of single directory files, files require unique file e 1M
names.
 Difficult to remember names of all the files as the number of Two level
files increases. MS-DOS OS allows only 11 character file directory
structure
name where as UNIX allows 255 character. explanation
1M

Any 1
Advantage
1M

Any 1
disadvantag
e 1M

Two-level directory structure: -In the two-level structures, each


user has its own user file directory (UFD). The UFD lists only files of
a single user. System contains a master file directory (MFD) which is
indexed by user name or account number. Each entry in MFD points
to the UFD for that user.

When a user refers to a particular file, only his own UFD is searched.
Different users can have files with the same name, as long as all the
file names within each UFD are unique.

When we create a file for a user, operating system searches only that
user’s UFD to find whether same name file already present in the
directory. For deleting a file again operating system checks the file
name in the user’ UFD only.

Page 25 / 26
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER – 2024 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

Advantages:
 It solves isolation. i.e. data of one user is separated from other
user.
 Searching is also efficient in this type of structure.
 Every user accesses his own directory and files.
 There is no problem of files with same names in different
directories.
Disadvantages:
 Two users can not share data or communicate with each other.
 It is difficult to search the files with same names in different
directories.

Page 26 / 26
lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2023 EXAMINATION


MODEL ANSWER

Subject: Operating Systems Subject Code: 22516

Important Instructions to examiners:


1) The answers should be examined by key words and not as word-to-word as given
in the model answer scheme.
2) The model answer and the answer written by candidate may vary but the examiner
may try to assess the understanding level of the candidate.
3) The language errors such as grammatical, spelling errors should not be given more
Importance (Not applicable for subject English and Communication Skills.
4) While assessing figures, examiner may give credit for principal components
indicated in the figure. The figures drawn by candidate and model answer may
vary. The examiner may give credit for anyequivalent figure drawn.
5) Credits may be given step wise for numerical problems. In some cases, the
assumed constant values may vary and there may be some difference in the
candidate’s answers and model answer.
6) In case of some questions credit may be given by judgement on part of examiner
of relevant answer based on candidate’s understanding.
7) For programming language papers, credit may be given to any other program
based on equivalent concept.
8) As per the policy decision of Maharashtra State Government, teaching in
English/Marathi and Bilingual (English + Marathi) medium is introduced at first year
of AICTE diploma Programme from academic year 2021-2022. Hence if the
students in first year (first and second semesters) write answers in Marathi or
bilingual language (English +Marathi), the Examiner shall consider the same and
assess the answer based on matching of concepts with model answer.

Q. Sub Answer Marking


No Q.N. Scheme

1. Attempt any FIVE of the following: 10


a) Define real time operating system, along with any two applications of it. 2M
Ans. Real Time operating system is a special-purpose operating system
used in computers that has well defined fixed time constraints for Definition
processing any task. 1M,
OR Any two
Real-time operating systems (RTOS) are used in environments where application
s
a large number of events, mostly external to the computer system,
1/2M each
must be accepted and processed in a short time or within certain
deadlines.
OR Any relevant Definition

Applications: (any other relevant application shall be considered)

Page 1 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

1. Flight Control System


2. Simulations
3. Industrial control
4. Military applications
5. Airline Traffic Control System
6. Airline Reservation System
7. Defence application systems like RADAR
8. Heart Pacemaker
9. Network Multimedia Systems
10. Missile Guidance system
11. Weather Forecasting
12. Online Transaction system
13. Network and Multimedia Systems
14. Ticket Reservation System
15. Command Control Systems
16. Medical Critical Care Systems.

b) List any four services provided by operating system. 2M


Ans.  User Interface Any four
1/2M each
 Program Execution
 I/O Operation
 File system Manipulation
 Communication
 Error Detection
 Resource Allocation
 Accounting
 Protection and security
c) Draw neat labelled process state diagram along with the correct 2M
directions of arrows

Page 2 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Ans.
Correct
diagram
2M

d) Define CPU bound program and I/O bound program 2M


Ans. CPU bound program: If execution of a program is highly dependent
on the CPU then it is known as CPU bound program.
Each
OR
definition
If a task does a lot operations using CPU, it's called a CPU-bound task.
1M
I/O bound program: If execution of a program is dependent on the
input-output system and its resources, such as disk drives and
peripheral devices then it is known as I/O bound program.
e) Define paging and segmentation 2M
Ans. Paging is a memory management scheme that permits the physical
address space of process to be noncontiguous. Logical memory is Correct
divided into blocks of same size called as pages. definition
OR 1M each
Paging is a storage mechanism used in OS to retrieve processes from
secondary storage to the main memory as pages.
OR
The process of retrieving processes in the form of pages from the
secondary storage into the main memory is known as paging.

Segmentation is a memory management scheme that permits


dividing logical address space into multiple segments.
OR
Segmentation divides the Computer’s physical memory and
program’s address space into segments.

Page 3 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

f) What is the use of PS command? Write long forms of UID, PID in 2M


the output of this command.
Ans. ps command: It is used to display the characteristics of a process. Use of ps
This command is used to list the processes associated with a user at a command
1M
particular terminal.
UID - (Owner) User-id full form
of each
PPID - Parent Process-id 1/2M
g) List any four file operations. 2M
Ans.  Creating a file Any four
 Writing a file operations
 Reading a file 1/2M each
 Repositioning within a file
 Deleting a file
 Appending new information to the end of the file
 Renaming an existing file.
 Truncating a file
 Creating copy of a file, copy file to another I/O device such as
printer or display
2. Attempt any THREE of the following: 12
a) Describe multiprocessor OS with its advantages (any two) 4M
Ans.  Multiprocessor systems are also known as parallel systems or
tightly coupled systems. Descriptio
n of
 These systems have two or more processors in close multiproce
communication and they share computer resources such as bus, ssor OS-
clock, memory and peripheral devices. 3M

 The whole task of multiprocessing is managed by the operating Any two


system, which allocates different tasks to be performed by the advantages
1/2M each
various processors in the system.
 Applications designed for the use in multiprocessing are said to
be threaded, which means that they are broken into smaller
routines that can be run independently.
 Multiple CPUs are linked together so that a job can be divided
and executed more quickly. When a job is completed, the results
from all CPUs are compiled to provide the final output.

Page 4 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

CPU CPU CPU

MEMORY PERIPHERALS

OR

Note: Any other relevant advantage shall be considered


Advantages
 Increased reliability: Due to the multiprocessing system,
processing tasks can be distributed among several processors. This
increases reliability as if one processor fails; the task can be given
to another processor for completion.
 Increased throughout: As several processors increase, more
work can be done in less time.
 The economy of Scale: As multiprocessors systems share
peripherals, secondary storage devices, and power supplies, they
are relatively cheaper than single-processor systems.
 Reduce Cost
b) Write down the responsibilities of the following components of 4M
OS
i) Memory Management Responsibi
ii) File Management lities of
Ans. i) Memory Management: each
manageme
 Keeping track of which parts of memory are currently being used
nt
and by whom. 2M

Page 5 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

 Deciding which processes (or parts thereof) and data to move into
and out of memory.
 Allocating and deallocating memory space as needed.
 Managing swap spaces, which store inactive pages of memory.
 Implementing policies for memory allocation.

File Management:
 The creation and deletion of files.
 The creation and deletion of directory
 The support of primitives for manipulating files and directions.
 The mapping of files onto secondary storage.
 The backup of files on stable storage media.
 Adding and editing the data in files.
 Moving files from one location to another.
 Store, arrange, or accessing files on a disk or other storage
locations.
c) Explain shared memory method of IPC using neat labelled 4M
diagram
Ans. Inter-process communication: Cooperating processes require an Explanatio
Inter- process communication (IPC) mechanism that will allow them n
to exchange data and information. 3M,
diagram
1M

 In this, all processes who want to communicate with other


processes can access a region of the memory residing in an
address space of a process creating a shared memory segment.
 All the processes using the shared memory segment should attach
to the address space of the shared memory. All the processes can
exchange information by reading and/or writing data in shared
memory segment.

Page 6 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

 The form of data and location are determined by these processes


who want to communicate with each other.
 These processes are not under the control of the operating system.
 The processes are also responsible for ensuring that they are not
writing to the same location simultaneously.
 After establishing shared memory segment, all accesses to the
shared memory segment are treated as routine memory access and
without assistance of kernel.
d) Explain following terms with respect to scheduling 4M
i) CPU utilization
ii) Throughput
iii) Turnaround time
iv) Waiting time
Ans.  CPU utilization: In multiprogramming the main objective is to Each term
keep CPU as busy as possible. CPU utilization can range from 0 1M
to 100 percent.
 Throughput: It is the number of processes that are completed per
unit time. It is a measure of work done in the system.Throughput
depends on the execution time required for any process.
 Turnaround time: The time interval from the time of submission
of a process to the time of completion of that process is called as
turnaround time. It is the sum of time period spent waiting to get
into the memory, waiting in the ready queue, executing with the
CPU, and doing I/O operations.
 Waiting time: It is the sum of time periods spent in the ready
queue by a process. When a process is selected from job pool, it is
loaded into the main memory. A process waits in ready queue till
CPU is allocated to it.

3. Attempt any THREE of the following: 12


a) Explain following commands with their syntax 4M
i) kill
ii) Sleep
iii) Wait
iv) Exit

Page 7 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Ans. i)kill Each


Syntax: kill pid command
Kill command is used to stop execution of particular process by Syntax
sending an interrupt signal to the process ½M

Explanatio
ii)Sleep n½M
Syntax: sleep NUMBER[SUFFIX]
The sleep command pauses the execution for specified time in
command.

iii)Wait
Syntax: wait [pid]
Wait command waits for running process to complete and return the
exit status.

iv) Exit
Syntax: exit
used to quit the shell
(OR)
Syntax: exit[n]
The terminal window will close and return a status of n
b) What is deadlock? Discuss any one method of deadlock 4M
prevention
Ans. A deadlock is a situation where a set of processes are blocked
because each process is holding a resource and waiting for another Deadlock
resource acquired by some other process. definition
Methods for deadlock prevention (Any 1) 1M
1. Eliminate Mutual Exclusion:
The mutual-exclusion condition must hold for non-sharable Any 1
method
resources.
3M
Mutual section from the resource point of view is the fact that a
resource can never be used by more than one process simultaneously
which is fair enough but that is the main reason behind the deadlock.
If a resource could have been used by more than one process at the
same time then the process would have never been waiting for any
resource.Read-only files are a good example of a sharable resource. If
several processes attempt to open a read-only file at the same time,
they can be granted simultaneous access to the file.

Page 8 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

A process never needs to wait for a sharable resource.Sharable


resources, in contrast, do not require mutually exclusive access and
thus cannot be involved in a deadlock

2. Eliminate Hold and Wait:


One way to avoid this Hold and Wait is when a process requests a
resource; it does not hold any other resources. One protocol that can
be used requires each process to request and be allocated all its
resources before it begins execution. Another protocol that can be
used is, to allow a process to request resources only when the process
has none. A process may request some resources and use them.
Before it requests any additional resources, it must release all the
resources that are currently allocated to it.

3. Eliminate No Preemption:
If a process that is holding some resources requests another resource
that cannot be immediately allocated to it, then all resources currently
being held are preempted. That is this resources are implicitly
released. The preempted resources are added to the list of resources
for which the process is waiting. Process will be restarted only when
all the resources i.e. its old resources, as well as the new ones that it is
requesting will be available.Preemption ensures that resources are
efficiently utilized and prevents deadlocks caused by the hold and
wait condition.

4. Eliminate Circular Wait:


Circular-wait condition never holds is to impose a total ordering of all
resource types, and to require that each process requests resources in
an increasing order of enumeration.
Let R = {R1, R2, ..., Rn} be the set of resource types. We assign to
each resource type a unique integer number, which allows us to
compare two resources and to determine whether one precedes
another in our ordering. Formally, define a one-to-one function F: R
_ N, where N is the set of natural numbers.
c) Describe concept of free space management technique using bit 4M
map method

Page 9 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Ans. Bit Map:


The free-space list is implemented as a bit map or bit vector. Correct
Each block is represented by 1 bit. If the block is free, the bit is 1; if Explanatio
the block is allocated, the bit is 0. n 4M
For example, consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12,
13 are free and the rest of the blocks are allocated.
The free-space bit map would be : 0011110011111100
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0

1=Free block 0=Allocated block

The main advantage of this approach is its relative simplicity and its
efficiency in findingthe first free block or n consecutive free blocks
on the disk.
d) Draw the diagram of linked file allocation method and explain it. 4M
Linked Allocation:
Ans. This allocation is on the basis of an individual block. Each block
contains a pointer to the next block in the chain. Correct
Diagram
 In this scheme, each file is a linked list of disk blocks which need 2M
not be contiguous. The disk blocks can be scattered anywhere on
the disk. Explanatio
n 2M
 The directory contains a pointer to the first and the last blocks of
the file.

 Creating a file is easy. We simply create a new entry in the device


directory. A write to a file removes first free block from free space
list and write to it. This new block is then linked to the end of the
file. To read a file, we simply read block by following the pointers
from block to block.

 There is no external fragmentation with linked allocation.

Page 10 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

 Space is required for the pointers, 1.5% of disk is used for the
pointers and not for information. If a pointer is lost or damaged or
bug occurs in operating system or disk hardware failure occur, it
may result in picking up the wrong pointer.

 This method cannot support direct access.

 This method is used only for a sequential access files

 This method requires more space to store pointers

 So instead of blocks, clusters are used for allocation but this


creates internal fragmentation.

4. Attempt any THREE of the following: 12


a) Compare between CLI based OS and GUI based OS (Any four 4M
points)

Page 11 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Ans. Any 4
COMMAND LINE GRAPHIC USER points 1M
INTERFACE (CLI) INTERFACE (GUI) each

Definition Interaction is by Interaction with


typing commands devices is by graphics
and visual components
and icons

Understanding Commands need to Visual indicators and


be memorized icons are easy to
understand

Memory Less memory is More memory is


required for storage required as visual
components are
involved.

Working Use of keyboard for Use of mouse for


Speed commands makes interaction makes it
CLI quicker and slow
faster

Resources Only keyboard Mouse and keyboard


used both can be used

Accuracy High Comparatively low

Menu In CLI, there are no While in GUI, menus


menus provided. are provided

Flexibility Command line Structure and design


interface does not can change with
change, remains updates
same over time

Example DOS, UNIX Windows, Linux

Page 12 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

b) What are the different types of system calls? Give examples of 4M


Ans. each
Types of System Calls: Listing of
1.Process Control Types 2M
2.File management
3.Device Management Example
4.Information Maintenance of any two
system
5.Communication:
calls
1. System calls for Process Control: 2M
● Create/ Terminate process
● Load/Execute Process.
● End/Abort process.
● Ready process/Dispatch process.
● Suspend process/Resume Process.
● Get/Set Process Attributes.
● Wait event, signal event
● Allocate and deallocate memory
2. System call for File management:
● create new file, delete existing file
● open, close file
● Create and delete directories
● read, write, reposition
● get/set file attributes
3. System call for Device Management:
● request device, release device
● read, write, reposition
● get/set device attributes
● logically attach or detach devices
4. System call for Information Maintenance:
● get/set time or date
● get/set system data
● get/set process, file, or device attributes
5. System Communication:
● create, delete communication connection
● send, receive messages
● transfer status information
● attach or detach remote devices

Page 13 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

c) Explain working of CPU switch from process to process with neat 4M


labelled diagram.
Ans. A CPU switch from process to process is referred as context switch.
A context switch is a mechanism that store and restore the state or Explanatio
context of a CPU in Process Control block sothat a process execution n
can be resumed from the same point at a later time. When 2M
thescheduler switches the CPU from one process to another process,
Diagram
the context switch savesthe contents of all process registers for the 2M
process being removed from the CPU, in its process control block.
Context switch includes two operations such as state save and state Relevant
restore. State save operation stores the current information of running Explanatio
process into its PCB. State restoreoperation restores the information n shall be
of process to be executed from its PCB. Switching the CPU from one considered
process to another process requires performing state save operation
for thecurrently executing process (blocked) and a state restore
operation for the process ready for execution. This task is known as
context switch.

Page 14 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

d) Solve given problem by using FCFS scheduling algorithm. Draw 4M


correct Gantt chart and calculate average waiting time and
average turnaround time
Process Arrival Burst
Time Time
P0 0 10
P1 1 29
P2 2 3
P3 3 7
P4 4 12

Gantt Chart
Ans.
Gantt
chart
2M,
FCFS
Waiting time Average
P0=0 waiting
P1= (10-1) = 9 time
P2= (39-2) = 37 calculation
P3= (42-3) = 39 1M,
P4= (49-4) = 45
Average Waiting time = Waiting time of all processes / Number of
processes Average
= (0+9+37+39+45)/5 = 26 ms turnaroun
Turnaround Time d time
calculation
P0=10
1M
P1=39-1=38
P2=42-2=40
P3=49-3=46
P4=61-4=57
Average Turnaround time = Turnaround time of all processes /
Number of processes
= (10+38+40+46+57)/5
= 191/5
= 38.2 ms

Page 15 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

e) Which hole is taken for next segment request for 8 KB in a 4M


swapping system for First fit, Best fit and Worst fit.

First Fit: Allocate the Best Fit: Allocate the Worst fit: Allocate
Ans. first free block to the smallest free block the largest free block Any
new process that is big enough to to the new process Correct
accommodate new representat
OS process OS ion 4M
4 KB OS 4 KB
<FREE> 1 4 KB 9 KB
KB 9 KB <FREE>
8 KB 20 KB 12 KB
16 KB 8 KB
20 KB
16 KB <FREE> 0 16 KB
8 KB KB 8 KB
2 KB 8 KB 2 KB
6 KB 2 KB 6 KB
6 KB

OR
First Fit: Allocate the Best Fit: Allocate the Worst fit: Allocate
first free block to the smallest free block the largest free block
new process that is big enough to to the new process
accommodate new
process
OS OS OS
4 KB 4 KB 4 KB
9 KB 9 KB 9 KB
20 KB 20 KB 20 KB
16 KB 16 KB 16 KB
8 KB 8 KB 8 KB
2 KB 2 KB 2 KB
6 KB 6 KB 6 KB

Page 16 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

5. Attempt any TWO of the following: 12


a) Write two uses of the following operating system tools: 6M
i) Security Policy
ii) User Management
iii) Performance Monitor
Ans. i) Security Policy:
-As OS security policies and procedures cover a large area, there are Each tool
following techniques to addressing them: with any 2
 Installing and updating anti-virus software valid uses
2M
 Ensure the systems are patched or updated regularly
$ yum updates
$yum check-update
 Implementing user management policies to protect user
accounts and privileges.
 Installing a firewall and ensuring that it is properly set to
monitor all incoming and outgoing traffic.

- Use Secure SSH: Telnet and rlogin protocols uses plain text, not
encrypted format which is the security breaches. SSH is a secure
protocol that use encryption technology during communication with
server. Never login directly as root unless necessary. Use “sudo” to
execute commands.
$ vi /etc/ssh/sshd_config
$ PermitRootLogin no #disable root login
$AllowUsers username # Allow only specific users
$ Protocol 2 #use SSH protocol 2 version

Lock and Unlock Features: They are very useful, instead of


removing an account from the system, you can lock it for an week or
a month. To lock a specific user, you can use the follow command.
$ passwd -1 accountname

Turn Off IPv6: If you are not using a IPv6 protocol, then you should
disable it because most of the applications or policies not required
IPv6 protocol and currently it doesn’t required on the server. Go to
network configuration file and add followings lines to disable it.
# vi /etc/sysconfig/network
NETWORKING_IPV6=no
IPV6INIT=no

Page 17 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Enables Iptables (Firewall): It is highly recommended to enable


Linux firewall to secure unauthorised access of your servers. Apply
rules in iptables to filters incoming, outgoing and forwarding packets.
We can specify the source and destination address to allow and deny
in specific udp/tcp port number.
Use Strong Password Policy: Passwords are always a security
problem because humans are. People often cannot be bothered to
come up with a lot of different passwords, so they use the same ones
in different places or combinations that are easy to remember, like
“password” or “abcde”. Basically, a gift to hackers. Make it a
requirement that any password must contain both upper and lower
case, be a mix of numbers, letters and symbols and you’ll be way
safer.
ii) User Management:
-As the administrator, it is your job to create and manage the accounts
for all required users.
-User management includes everything from creating a user to
deleting a user on your system and also assigning the passwords to
created users using “passwd” command.
Following are the Linux command line tools for managing users and
groups:
1. useradd.
2. usermod.
3. userdel.
iii) Performance Monitor
It is really very tough job for every System or Network administrator
to monitor and debug Linux System Performance problems every
day.
 The top command used to display all the running and active
real-time processes in ordered list and updates it regularly. It
display CPU usage, Memory usage, Swap Memory, Cache
Size, Buffer Size, Process PID, User, Commands and much
more. It also shows high memory and CPU utilization of a
running processes.
 Linux vmstat command used to display statistics of virtual
memory, kernel threads, disks, system processes, I/O blocks,
interrupts, CPU activity and much more.

Page 18 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

b) Differentiate between process and thread (any two Points). Also 6M


discuss the benefits of multithreaded programming.
Ans.
Process Thread
Definition A process is a A thread is a lightweight
program under process that can be Differentia
execution i.e. an active managed independently te - any 2
program. by a scheduler. valid
Running Processes run in Threads within the same points
mechanism separate memory process run in a shared 2M
spaces. memory space.
Benefits
Process is heavy It is a lightweight process 4M
Concept weight and any and a segment of a
program is in process.
execution.
PCB The process has its Thread has Parents’ PCB,
own Process Control its own Thread Control
Block, Stack, and Block, and Stack and
Address Space. common Address space.

Context Context switching Context switching


Switching between the process between threads of the
is more expensive same process is less
expensive

Dependency Processes are Threads are dependent


independent.
Controlling Process is controlled Threads are controlled by
by the operating programmer in a program
system.

Benefits of multithreaded programming:


The benefits of multithreaded programming can be broken down into
four major categories:
Responsiveness:
Multithreading an interactive application may allow a program to
continue running even if part of it is blocked or is performing a
lengthy operation, thereby increasing responsiveness to the user. For

Page 19 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

instance, a multithreaded Web browser could allow user interaction in


one thread while an image was being loaded in another thread.

Resource sharing:
Processes may only share resources through techniques such as
shared memory or message passing. Such techniques must be
explicitly arranged by the programmer. However, threads share the
memory and the resources of the process to which they belong by
default. The benefit of sharing code and data is that it allows an
application to have several different threads of activity within the
same address space.

Economy:
Allocating memory and resources for process creation is costly.
Because threads share the resources of the process to which they
belong, it is more economical to create and context-switch threads.
Empirically gauging the difference in overhead can be difficult, but in
general it is much more time consuming to create and manage
processes than threads. In Solaris, for example, creating a process is
about thirty times slower than is creating a thread, and context
switching is about five times slower.

Scalability:
The benefits of multithreading can be greatly increased in a
multiprocessor architecture, where threads may be running in parallel
on different processors. A single-threaded process can only run on
one processor, regardless how many are available. Multithreading on
a multi-CPU machine increases parallelism.

c) Find out the total number of page faults using: 6M


i. Least Recently used Page Replacement
ii. Optimal Page Replacement
Page replacement algorithms of memory management, if the
pages are coming in the order:
70120304230321201701

Page 20 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Ans. i) LRU:
Considering frame size is 3: LRU
3M

Total Page faults using LRU Page Replacement/Fault=12

ii) Optimal:
Considering Frame size is 3:

Optimal
3M

Total Page faults using Optimal Page Replacement/Page Fault=09


6. Attempt any TWO of the following: 12
a) How pre-emptive scheduling is better than non pre-emptive 6M
scheduling by solving following problem using SJF (Solve it by
using pre-emptive SJF and non-pre-emptive SJF also).

Reason
2M

Pre-
Following are the reason, why pre-emptive scheduling is better emptive
Ans. than non pre-emptive scheduling: SJF
 Preemptive scheduling is quite flexible because critical processes 2M
are allowed to access the CPU because they come in the ready
queue and no matter which process is currently running. Non- NonPre-
preemptive scheduling is tough because if an essential process is emptive
assigned to the ready queue, the CPU process is not be SJF
2M
interrupted.

Page 21 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

 Preemptive scheduling allows a process to be interrupted in the


midst of its execution, taking the CPU away and allocating it to
another process. Non-preemptive scheduling ensures that a
process relinquishes control of the CPU only when it finishes
with its current CPU burst.

Page 22 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

b) List free space management technique with the help of neat 6M


diagram, explain any one technique in detail.
Ans. A file system is responsible to allocate the free blocks to the file Listing
therefore it has to keep track of all the free blocks present in the disk. free space
There are mainly two approaches by using which, the free blocks in manageme
the disk are managed. nt
Following are the free space management technique: 1M
1) Bitmap
Explanatio
2) Linked List n
3) Grouping 3M
Bit Vector
The first method that we will discuss is the bit vector method. Also Diagram
known as the bit map, this is the most frequently used method to 2M
implement the free space list. In this method, each block in the hard
disk is represented by a bit (either 0 or 1). If a block has a bit 0 means
that the block is allocated to a file, and if a block has a bit 1 means
that the block is not allocated to any file, i.e., the block is free.
For example, consider a disk having 16 blocks where block numbers
2, 3, 4, 5, 8, 9, 10, 11, 12, and 13 are free, and the rest of the blocks,
i.e., block numbers 0, 1, 6, 7, 14 and 15 are allocated to some files.
The bit vector for this disk will look like this-

We can find the free block number from the bit vector using the
following method-
Block number = (Number of bits per word )* (number of 0-value
words) + (offset of first bit)
We will now find the first free block number in the above example.
The first group of 8 bits (00111100) constitutes a non-zero word since
all bits are not 0. After finding the non-zero word, we will look for
the first 1 bit. This is the third character of the non-zero word. Hence,
offset = 3.
Therefore, the first free block number = 8 * 0 + 3 = 3.
Linked List:
Another method of doing free space management in operating
systems is a linked list. In this method, all the free blocks existing in
the disk are linked together in a linked list. The address of the first

Page 23 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

free block is stored somewhere in the memory. Each free block


contains a pointer that contains the address to the next free block. The
last free block points to null, indicating the end of the linked list.
For example, consider a disk having 16 blocks where block numbers
3, 4, 5, 6, 9, 10, 11, 12, 13, and 14 are free, and the rest of the blocks,
i.e., block numbers 1, 2, 7, 8, 15 and 16 are allocated to some files. If
we maintain a linked list, then Block 3 will contain a pointer to Block
4, and Block 4 will contain a pointer to Block 5.

Grouping: The third method of free space management in operating


systems is grouping. This method is the modification of the linked list
method. In this method, the first free block stores the addresses of the
n free blocks. The first n-1 of these blocks is free. The last block in
these n free blocks contains the addresses of the next n free blocks,
and so on.
For example, consider a disk having 16 blocks where block numbers
3, 4, 5, 6, 9, 10, 11, 12, 13, and 14 are free, and the rest of the blocks,
i.e., block numbers 1, 2, 7, 8, 15 and 16 are allocated to some files.
If we apply the Grouping method considering n to be 3, Block 3 will
store the addresses of Block 4, Block 5, and Block 6. Similarly, Block
6 will store the addresses of Block 9, Block 10, and Block 11. Block
11 will store the addresses of Block 12, Block 13, and Block 14. This
is also represented in the following figure

Page 24 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

c) Draw and explain directory structure of a file system in terms of 6M


single level, two level and tree structure.
Ans. A directory is a container that is used to contain folders and files. Relevant
Following are the logical structures of a directory: explanatio
1) Single level n shall be
2) Two level considered
3) Tree structure
Single
level
Single-level directory: Diagram
The single-level directory is the simplest directory structure. 1M
In it, all files are contained in the same directory, which makes it Explanatio
easy to support and understand. n 1M
Single level directory has a significant limitation, however, when
the number of files increases or when the system has more than one
user. Since all the files are in the same directory, they must have Two Level
a unique name. If two users call their dataset test, then the unique Diagram
name rule violated. 1M
Explanatio
•Simple operations like file creation, search, deletion, and updating
n 1M
are possible with a single-level directory structure.
•The single-level directory is easier to understand in practical life.
•Two file names cannot be the same. In case two files are given the Tree Level
same name, the previous one is overridden. Diagram
•If the number of files is very large, searching a particular file is 1M
very inefficient.
•Segregation of important and unimportant files is not possible. Explanatio
•The single-level directory is not useful for multi-user systems. n 1M

Fig:Single level Directory Structure

Page 25 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

Two-level directory:
As we have seen, a single level directory often leads to confusion of
files names among different users. The solution to this problem is to
create a separate directory for each user.
In the two-level directory structure, each user has their own user
files directory (UFD). The UFDs have similar structures, but each
lists only the files of a single user. System’s master file directory
(MFD) is searched whenever a new user id is created.
 Searching is very easy.
 There can be two files with the same name in two different user
directories. Since they are not in the same directory, the same
name can be used.
 Grouping is easier.
 A user cannot enter another user’s directory without permission.
 Implementation is easy.
 It does not allow users to create subdirectories.

Fig: Two Level Directory structure

Tree Structure/ Hierarchical Structure:


Tree directory structure of operating system is most commonly used
in our personal computers. User can create files and subdirectories
too, which was a disadvantage in the previous directory structures.
This directory structure resembles a real tree upside down, where
the root directory is at the peak. This root contains all the
directories for each user. The users can create subdirectories and
even store files in their directory.

Page 26 / 27

Downloaded by Yash Patil ([email protected])


lOMoARcPSD|38558715

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating Systems Subject Code: 22516

A user do not have access to the root directory data and cannot
modify it. And, even in this directory the user do not have access to
other user’s directories. The structure of tree directory is given
below which shows how there are files and subdirectories in each
user’s directory.
•The root directory is highly secured, and only the system
administrator can access it. We can see how there can be
subdirectories inside the user directories. A user cannot modify the
root directory data. Also, a user cannot access another user's
directory.
•Allows subdirectories inside a directory.
•Searching is easy.
•Allows grouping.
•Segregation of important and unimportant files is easy.
•As one user cannot enter another user’s directory, this restricts
sharing of files.
•Too many subdirectories may make the search complicated.
•Users cannot modify the root directory’s data.

Fig: Tree Structure/ Hierarchical Structure

Page 27 / 27

Downloaded by Yash Patil ([email protected])

You might also like