0% found this document useful (0 votes)
7 views8 pages

Q. 3

Uploaded by

mehfoozpathan75
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)
7 views8 pages

Q. 3

Uploaded by

mehfoozpathan75
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/ 8

b) Explain different components of operating system.

Ans. List of System Components:


1. Process Management
2. Main Memory Management
3. File Management
4. VO System Management
5.Secondary Storage Management

1.Process Management:
A program is a set of instructions. When CPU is allocated to a
program, it can start its A
program in execution is a
execution.
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 VO 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 system responsible for the following
operating activities in

connection with process management:


Creation and deletion of user and system processes.
Suspension and resumptionof 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, rangingin 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 VO 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:
22516
ect: Operating System Subject Code:

Keeping track of which parts memory are currently being used


andby 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 on the disk (secondary storage), which


files

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


connection withmanagement:
file

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. WO device Management
Input/ Output device management provides an environmnent for the
better interaction between system and the IO devices (such as

printers, scanners, tape drives etc.). To interact with VO 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 of laser pulses (in regard with laser printer).
series
The VO subsystem consists of several components:
A memory management component that includes buffering,
caching, spooling

A general devicedriver interface


Drivers for specific hardware devices
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.

Management
3. File

A is a collected
file 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 theiruse. These directories may contain files and other


directions.

The operating system responsible for the following activities in

connection with management:


file

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. WO device Management
Input / Output device management provides an environment for the
better interaction between system and the VO devices (such as

printers, scanners, tape drives etc.). To interact with VO devices in an


manner, the operating
effective 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 VO 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)
(ISOEC -27001 - 2005 Certified)

SUMMER– 2024 EXAMINATION


MODEL ANSWER
22516
ect: Operating System Subject Code:

5. Secondary-StorageManagement

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.
Atempt any THREE of the following:
a
Define Process. Draw a Process Control Block and explain the

information in PCB
Ans. Process: A process is defined as, a program under execution, which

competes for the CPUtime and other resources.

A process is a program in execution. Process is also called as job, task

and unit of work.

Process
Pointer
State

Process Number

Program Counter

CPU Registers

Memory Alocations

Event Information

Listof Open Files

Fig: Process Control Block

MAHARASHTRA STATE BOARD OF TECHNICALEDUCATI


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

SUMMER– 2024 EXAMINATION


MODEL ANSWER

ect: Operating System Subject Code:

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
isprovided 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 intemally 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


process priority, pointers to scheduling queues, and any other

scheduling parameters.

7. Memory Mauagement Iniormation; This information may

include such infonnation 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.
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.

JO Status Information: This information includes the list of VO


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.
Attempt any THREE of the following:
a) Compare between Time sharing operating system and
multiprogramming operative system.

Page

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


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

SUMMER–2024 EXAMINATION
MODEL ANSWER
2251
ct: Operating System Subject Code:

Ans. Time sharing operating Multiprogramming


system operating system
In this time sharing Operating Multiprogramming operating
system many users/processessystem 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.

Timesharingsystem minimizes Multiprogramming system


response time. maximizes processor use.
Example: Windows NT. Example: Mac OS.
Explain with diagram single level directory structure and two
level directory structure with its advantagesand disadvantages.
Ans.
Single Level Directory Structure:

This is the simplest directory structure. All the files are stored in the
same directory which is easy to support and understand. But a unique
name must be assigned to each file.
If the number of files in the directory increases, it may become
difficult to remember names of all files.

Advantage:
Less time required to search the file, because all files are

stored in same directory.

Single level directory structure is easy to implement and


maintain.

Single level directory structure, the operations like creation,

searching, deletion, updating are very easy and faster

P
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATIO
(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

SUMMER- 2024 EXAMINATION


MODEL ANSWER
22
ect: Operating System Subject Code:

Disadvantages
Not suitable for a large number of files and more than one
user.

Because of single directory files, files require unique file

names.

Difficult to remember names of all the files as the number of

files increases. MS-DOS OS allows only ll character file

name where as UNIX allows 255 character.

cat bo test data mal cont hexrecords


directory
files
(a)
Root
directory
Fle 1 Fle
5)
Fle 3)Fe 4)
(b)
Single Level DirectoryStructure

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.


Root
directory

User
A B User User

Fle 1 Fe 2 Fle 1 File 2 Fle 3 File 4

Two Level Directory Structure

Advantages:
It solves isolation. ie. data of one user is separated from other
user.

Searching is alsoefficient 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.

You might also like