0% found this document useful (0 votes)
51 views6 pages

Osy w22 Odd

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)
51 views6 pages

Osy w22 Odd

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/ 6

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

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

WINTER – 2022 EXAMINATION WINTER – 2022 EXAMINATION


MODEL ANSWER MODEL ANSWER
Subject: Operating System Subject Code: 22516 Subject: Operating System Subject Code: 22516

Important Instructions to examiners: CPU idle time and same time, effectively
1) The answers should be examined by key words and not as word-to-word as given in the increasing increasing CPU and
model answer scheme. throughput as much system throughput.
2) The model answer and the answer written by candidate may vary but the examiner may as possible.
try to assess the understanding level of the candidate. Execution When one job or In a multiprocessing
3) The language errors such as grammatical, spelling errors should not be given more process completes its system, multiple
Importance (Not applicable for subject English and Communication Skills. execution or switches processes can operate
4) While assessing figures, examiner may give credit for principal components indicated in to an I/O task in a simultaneously by
the figure. The figures drawn by candidate and model answer may vary. The examiner multi-programmed allocating the CPU for a
may give credit for anyequivalent figure drawn. system, the system fixed amount of time.
5) Credits may be given step wise for numerical problems. In some cases, the assumed
momentarily
constant values may vary and there may be some difference in the candidate’s answers
suspends that
and model answer.
process. It selects
6) In case of some questions credit may be given by judgement on part of examiner of another process from
relevant answer based on candidate’s understanding.
the process
7) For programming language papers, credit may be given to any other program based on
scheduling pool
equivalent concept.
(waiting queue) to
8) As per the policy decision of Maharashtra State Government, teaching in English/Marathi
run.
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 CPU In a multiuser In a single-user
second semesters) write answers in Marathi or bilingual language (English +Marathi), the Switching environment, the environment, the CPU
Examiner shall consider the same and assess the answer based on matching of concepts CPU switches switches between the
with model answer. between processes of various
programs/processes programs.
Q. Sub Answer Marking quickly.
No Q.N. Scheme Timing It takes maximum It takes minimum time to
1. Attempt any FIVE of the following: 10 time to execute the execute the process.
a) Differentiate between Multi programmed and Multitasking operating 2M process.
system (Any two points)
Ans. Features Multiprogramming Multitasking b) List any four services provided by O.S. 2M
Any two Ans.  User Interface
Basic It allows multiple A supplementary of the relevant  Program Execution ½ M each
points, for any 4
programs to utilize multiprogramming 1M each  I/O Operation services
the CPU system also allows for  File system Manipulation
simultaneously. user interaction.  Communication
Mechanis Based on the context Based on the time-  Error Detection
m switching sharing mechanism.
 Resource Allocation
mechanism.
Objective It is useful for It is useful for running  Accounting
reducing/decreasing multiple processes at the  Protection and security

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

WINTER – 2022 EXAMINATION WINTER – 2022 EXAMINATION


MODEL ANSWER MODEL ANSWER
Subject: Operating System Subject Code: 22516 Subject: Operating System Subject Code: 22516

interactive computer system which provides direct communication The operating system responsible for the following activities in
between the user and the system. A time-sharing system allows many Relevant connection with process management:
users to share the computer resources simultaneously. The time- Explanation  Creation and deletion of user and system processes.
4M
sharing system provides the direct access to many users where CPU  Suspension and resumption of processes.
time is divided among all the users on scheduled basis. The operating  A mechanism for process synchronization.
system allocates a time slice to each user. When this time is expired,  A mechanism for process communication.
it passes control to the next user on the system. The time allowed is  A mechanism for deadlock handling.
extremely small and the users are given the impression that each of 2. Main-Memory Management
them has their own CPU and they are the sole owner of the CPU. In Main memory is a large array of words or bytes, ranging in size from
this time slice each user gets attention of the CPU. The objective of hundreds of thousands to billions. Each word or byte has its own
time-sharing system is to minimize response time of process. address. Main memory is a repository of quickly accessible data
Example: The concept of time-sharing system is shown in figure: 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:
 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
In above figure, the user 5 is active but user 1, user 2, user 3, and user and out of memory. 3. Allocating and deallocating memory space
4 are in waiting state whereas user 6 is in ready status. as needed.
b) Describe any two components of O.S. 4M 3. File Management
Ans. List of System Components: A file is a collected of related information defined by its creator.
1. Process management Description Computer can store files on the disk (secondary storage), which
2. Main memory management of any two provide long term storage. Some examples of storage media are
components magnetic tape, magnetic disk and optical disk. Each of these media
3. File management of OS
4. I/O system management has its own properties like speed, capacity, and data transfer rate and
2M each
5. Secondary storage management access methods. A file system normally organized into directories to
ease their use. These directories may contain files and other
1.Process Management: directions.
A program is a set of instructions. When CPU is allocated to a The operating system responsible for the following activities in
program, it can start its execution. A program in execution is a connection with file management:
process. A word processing program run by a user on a PC is a  The creation and deletion of files.
process. A process needs various system resources including CPU  The creation and deletion of directions.
time, memory, files and I/O devices to complete the job execution.  The support of primitives for manipulating files and directions.
These resources can be given to the process when it is created or  The mapping of files onto secondary storage.
allocated to it while it is running.  The backup of files on stable storage media.

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

WINTER – 2022 EXAMINATION WINTER – 2022 EXAMINATION


MODEL ANSWER MODEL ANSWER
Subject: Operating System Subject Code: 22516 Subject: Operating System Subject Code: 22516

 Turnaround time: -The time interval from the time of Running: When CPU is available, system selects one process from
submission of a process to the time of completion of that process main memory and executes all the instructions from that process. So,
is called as turnaround time. It is the sum of time period spent when a process is in execution, it is in running state. In single user
waiting to get into the memory, waiting in the ready queue, system, only one process can be in the running state. In multiuser
executing with the CPU, and doing I/O operations. system, there can be multiple processes which are in the running
state.
 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 Waiting State: When a process is in execution, it may request for I/O
loaded into the main memory. A process waits in ready queue till resources. If the resource is not available, process goes into the
CPU is allocated to it. waiting state. When the resource is available, the process goes back to
ready state.
3. Attempt any THREE of the following: 12
a) Draw and explain process state diagram. 4M Terminated State:
Ans. Different process states are as follows: When the process completes its execution, it goes into the terminated
1. New Process state. In this state the memory occupied by the process is released.
2. Ready state b) Describe conditions for deadlock prevention. 4M
diagram By ensuring that at least one of below conditions cannot hold, we can
3. Running Ans.
2M
4. Waiting prevent the occurrence of a deadlock. Any four
Explanation
conditions
5. Terminated 2M
1M each
1.Mutual Exclusion:
The mutual-exclusion condition must hold for non-sharable
resources. Sharable resources do not require mutually exclusive
access, thus cannot be involved in a deadlock.

2.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
New: When a process enters into the system, it is in new state. In this to it.
state a process is created. In new state the process is in job pool.
3.No Preemption:
Ready: When the process is loaded into the main memory, it is ready If a process that is holding some resources requests another resource
for execution. In this state the process is waiting for processor that cannot be immediately allocated to it, then all resources currently
allocation. being held are preempted. That is these resources are implicitly

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

WINTER – 2022 EXAMINATION WINTER – 2022 EXAMINATION


MODEL ANSWER MODEL ANSWER
Subject: Operating System Subject Code: 22516 Subject: Operating System Subject Code: 22516

c) Compare between Long term and short term scheduler. (Any 4M


Ans. Any four four points)
Parameter Command Line Graphic User points 1M Any four
Ans.
Interface(CLI) Interface(GUI) each points 1M
Sr. Long Term Scheduler Short Term Scheduler each
Definition Interaction is by Interaction with devices is by No
typing commands graphics and visual
components and icons 1 It is job scheduler It is CPU scheduler

Understan Commands need to Visual indicators and icons 2 It selects processes from job It selects processes from
ding be memorized are easy to understand pool and loads them into ready queue which are ready
memory for execution to execute and allocates
Memory Less memory is More memory is required as CPU to one of them
required for storage visual components are
involved. 3 Access job pool and ready Access ready queue and
queue CPU
Working Use of keyboard for Use of mouse for interaction
Speed commands makes makes it slow 4 It executes much less It executes frequently. It
CLI quicker. frequently. It executes when executes when CPU is
Resources Only keyboard Mouse and keyboard both memory has space to available for allocation
used can be used accommodate new process.

Accuracy High Comparatively low 5 Speed is less than short term Speed is fast
scheduler
Flexibility Command line Structure and design can
interface does not change with updates 6 It controls the degree of It provides lesser control
change, remains multiprogramming over degree of
same over time multiprogramming
b) Write any four systems call related to file management. 4M 7 It chooses a good process It chooses a new process for
Ans. System calls related to file management are:
Any 4
that is a mix-up of a processor quite frequently.
1. create new file
2. delete existing file system calls input/output bound and CPU
1M each bound.
3. open file
4. close file
5. create directories d) Solve given problem by using SJF and FCFS scheduling 4M
6. delete directories algorithm using Gantt chart. Calculate the average waiting time
7. read, write, reposition in file for each algorithm
8. getfile attributes
9. set file attributes

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

WINTER – 2022 EXAMINATION WINTER – 2022 EXAMINATION


MODEL ANSWER MODEL ANSWER
Subject: Operating System Subject Code: 22516 Subject: Operating System Subject Code: 22516

iii) Task scheduler


1. Assign processor to task ready for execution
2. Executing predefined actions automatically whenever a certain set
of condition is met.
(Any two relevant uses shall be considered)
b) Writer the outputs of following commands 6M
(i) Wait 2385018
(ii) Sleep 09
(iii) PS –u Asha
Ans. i) Wait command waits until the termination of specified process ID
2385018 2M for each
5. Attempt any TWO of the following: 12 ii) Sleep command is used to delay for 9 seconds during the execution correct
a) Write two uses of following O.S. tools 6M output
of a processi.e. it will pause the terminal for 9 seconds.
(i) Device Management iii) ps command with -u is used to display data/processes for the
(ii) Performance monitor 2 uses of
specific user Asha.
(iii) Task Scheduler each tool
2M c) Given a page reference string with three (03) page frames. 6M
Ans. i) Device management: Calculate the page faults with ‘Optimal’ and ‘LRU’ page
 Managing all the hardware or virtual devices of computer system. replacement algorithm respectively.
 Allow interaction with hardware devices through device driver. ‘7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1
 Used to install device and component-level drivers as well as Ans. (Representation of frame can be in any order) Calculate
associated software. i) Optimal page fault
 Allocate devices to the process as per process requirement and with
priority. Ref 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1 relevant
diagram-
 Deallocate devices either temporarily or permanently depending F1 7 7 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 7 7 3M each
on condition. F2 0 0 0 0 0 0 4 4 4 0 0 0 0 0 0 0 0 0 0
 Keeping track of all device’s data and location.
F3 1 1 1 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1
 Monitoring device status like printers, storage drivers and other
devices. Fault F F F F F F F F F
 Used to enforce the predetermined policies and decides which Total page faults- 9
process receives the device when and for how long.
ii) Performance monitor ii) LRU
1. Monitor various activities on a computer such as CPU or memory Ref 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
usage. F1 7 7 7 2 2 2 2 4 4 4 0 0 0 1 1 1 1 1 1 1
2. Used to examine how programs running on their computer affect
F2 0
0 0 0 0 0 0 0 3 3 3 3 3 3 0 0 0 0 0
computer’s performance
F3 1 1 1 3 3 3 2 2 2 2 2 2 2 2 2 7 7 7
3. It is used to identify performance problems or bottleneck that
Fault F F F F F F F F F F F F
affect operating system or installed applications.
4. Used to observe the effect of system configuration changes. Total page faults-12

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

WINTER – 2022 EXAMINATION


MODEL ANSWER
Subject: Operating System Subject Code: 22516

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.

2. Tree structure:-
In this directory structure user can create their own sub-directories
and organize their files. The tree has a root directory and every file
has a unique path name. A directory contains a set of files or
subdirectories. All directories have the same internal format. One bit
in each directory entry defines the entry as a file (0) or as a
subdirectory (1). Each process has a current directory. Current
directory contains files that are currently required by the process.
When reference is made to a file, the current directory is searched. If
a file needed that is not in the current directory, then the user usually
must either specify a path name or change the current directory.

Page 21 / 21

You might also like