0% found this document useful (0 votes)
4 views12 pages

Operating Systems

The document provides an overview of operating systems, detailing their role as an interface between users and hardware, and outlining key services such as information management, process management, and memory management. It discusses various operating systems, including Windows and Linux, their features, file systems, and allocation methods. Additionally, it covers concepts like multiprogramming, CPU scheduling, and the states of a process, emphasizing the importance of efficient resource management in computing.

Uploaded by

Pratik Tatkare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

Operating Systems

The document provides an overview of operating systems, detailing their role as an interface between users and hardware, and outlining key services such as information management, process management, and memory management. It discusses various operating systems, including Windows and Linux, their features, file systems, and allocation methods. Additionally, it covers concepts like multiprogramming, CPU scheduling, and the states of a process, emphasizing the importance of efficient resource management in computing.

Uploaded by

Pratik Tatkare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Operating Systems

Introduction

Operating system is a program,which act as an interface between user of a computer and computer
hardware.it provides an environment to run other programs also.it makes system convenient to use. It
also perform basis task like input and output management.i.e it helps in using hardware inefficient
manner.

Operating System Services


An operating system is software that acts as an intermediary between the
user and computer hardware. It is a program with the help of which we are
able to run various applications. It is the one program that is running all the
time. Every computer must have an operating system to smoothly execute
other programs.
Operating system(o/s)provides certain services to the program and to the users.there are following
three major types of services:

1.Information Management

2.Process Management

3.Memory Management

1.Information Management

It refers to a set of services used for storing,retrieving,modifying or removing the information on various
devices. It manages the organization of information in terms of directories and
files,allocating,deallocating the sector to various files ensuring right people have access to information
and driving various devices.
Some of the system calls in this category are as follow:

1.Create a file

2.Create directory

3.Open a file

4.close a file

5.Read data from file to buffer

6.Move the file pointer

7.Read and return files status

8.Create a link

9.Change working directory

10.Write data from buffer to file.

2.Process Management

If operating system supports multiple user then services under this are very important.in this regard
operating system has to keep track of all the completing process(running program),schedule
them,dispatch them one after another.but user should feel that he has the full control of the cpu.

Ex:

Let’s understand the process management in unique way. Imagine, our


kitchen stove as the (CPU) where all cooking(execution) is really happen and
chef as the (OS) who uses kitchen-stove(CPU) to cook different
dishes(program). The chef(OS) has to cook different dishes(programs) so he
ensure that any particular dish(program) does not take long
time(unnecessary time) and all dishes(programs) gets a chance to
cooked(execution) .The chef(OS) basically scheduled time for all
dishes(programs) to run kitchen(all the system) smoothly and thus
cooked(execute) all the different dishes(programs) efficiently.
Some of the system calls in this category are as follow:

1.Create a child process

2.Terminate a process

3.Wait for a child process to terminate

4.Change the priority of process


5.Block the process

6.Ready the process

7.Dispatch a process

8.Suspend a process

9.Resume a process

10.Delay a process

11.Fork a process

3.Memory Management

The Services provided under memory management are directed to keeping track of memory and
allocating,deallocating it to various process.the operating system keeps a list of free memory locations.
Before a program is loaded in memory from the disk, this module consults this free list,allocates the
memory to the process,depending upon program size and updates the list of free memory.

Some of the system calls in this category are as follow:

1.Allocates a chunk of memory to process

2.Free a chunk of memory from a process.

Overview of O/S

Operating system first developed by Microsoft was DOS.but it was a single user o/s.After DOS a
complete new system with graphical user interface was developed. It was window 3.1 later on window
95 an upgraded version of window was launched. After that window 98 a new version of window was
launced. If is multitasking and again GUI based o/s.Some of the main feature are:

1.Faster Oerating system

2.Easy to use.

Web integration

Multiple display support

Power management

Universal serial bus

3.More entertaining and fun

4.Help
Windows NT

It provides basic operating system services.

Object manager: It creates manages and deletes objects, which are processes.

Process manager: It creates ,terminates,suspends and resume processes,tasks,and thread

Virtual memory manager: it manages the memory for processes.it also allocates and free memory

Security references monitor: it enforce security policy and keeps treack of file access right basd on
ownership and permission for the user.

Local procedures call facility: it is used to pass messages between client systems and subsystem on one
system.

I/O subsystem: It handles devices and passes data to and receives data from the devices of all
subsystem.

Linux

The Linux Operating System is a type of operating system that is similar to


Unix, and it is built upon the Linux Kernel. The Linux Kernel is like the brain
of the operating system because it manages how the computer interacts with
its hardware and resources. It makes sure everything works smoothly and
efficiently. But the Linux Kernel alone is not enough to make a complete
operating system.
To create a full and functional system, the Linux Kernel is combined with a
collection of software packages and utilities, which are together called Linux
distributions.
These distributions make the Linux Operating System ready for users to run
their applications and perform tasks on their computers securely and
effectively. Linux distributions come in different flavors, each tailored to suit
the specific needs and preferences of users.
Developed by Linus Torvalds in 1991, the Linux operating system is a
powerful and flexible open-source software platform. It acts as the basis for a
variety of devices, such embedded systems, cell phones, servers, and
personal computers. Linux, that’s well-known for its reliability, safety, and
flexibility, allows users to customize and improve their environment to suit
specific needs. With an extensive and active community supporting it, Linux
is an appealing choice for people as well as companies due to its wealth of
resources and constant developments.
Features of Linux

1.Linux is network friendly

2.Linux is a multi-user

3.Linux is open

4.Linux is free

File system

File systems are a crucial part of any operating system, providing a


structured way to store, organize, and manage data on storage devices such
as hard drives, SSDs, and USB drives. Essentially, a file system acts as a
bridge between the operating system and the physical storage hardware,
allowing users and applications to create, read, update, and delete files in an
organized and efficient manner.
A file system is a method an operating system uses to store, organize, and
manage files and directories on a storage device.

Block
It is unit of data,which the operating system defines for the sake of
convenience.normally operating system also keeps all its data structure in
terms of blocks.
Operating system would view the disk as compairing of no.blocks.From
hardware point of view a disk consists of no. of sectors,but from the point of
view of the operating system it consists of no blocks where each block is
having one or more sectors. Due to this operating system has to translate a
block number into physical sector number.

Disk
It is main secondary device.various types of secondary devices are there like
floopy disk and hard disk. Hard disk can be considered as being made up
multiple floopy disks put one above the other.
Floppy disk
Hard disk

File
A collection of related information is termed as file,for each file created by
the operating system maintains a directory entry also called volume table of
contents
File operations
Create a file
Write a file
Reading a file
Rewind a file
Delete a file

Allocations Methods
The allocation methods define how the files are stored in the disk blocks.
1)Contiguous 2)noncontiguous
In this schema user estimate maximum file size that the file will grow
to,considering the future expansions and then request the operating system
to allocate those blocks at the time of creation of file.
Operating system normally uses blocks allocation list to manages the disk
spaces.
It alos gives you whether the block is free or allocated.it is more useful to
maintain two differerent tables:
1.Allocated blocks 2.Free blocks.
Methods
1.First fit: If suppose file requires 7 blocks,the os goes through block list and
allocates the entry blocks equal or more than 7
2.Best fit: for this method free blocks list is to be sorted by no of free blocks.it
would choose that entry which is the smallest amongst all the entries,which
are equal or bigger than required one.
3.Worst fit: it allocated free blocks that is equal to or larger than our
environment.

Non-contigouous Allocation
In this maximum size of file does not have to be predicted at the beginning.
The file can grows with time as per the needs. This reduce wastage of
spaces and operating system automatically allocates additional blocks as per
requirement without aborting program.
1.chained allocation
2.indexed allocation

Indexed allocation
In this scheme, a special block known as the Index block contains the
pointers to all the blocks occupied by a file. Each file has its own index block.
The ith entry in the index block contains the disk address of the ith file block.
The directory entry contains the address of the index block as shown in the
image:

File organization

A file consists of a number of records. Each record is made up of a number of


fields and each field consists of a number of characters. In order to produce
useful information by means of computerized data processing, it is very
necessary to organize data in systematic way. Methods of organizing data
are referred to as data structures. The most important structure is a vertical
hierarchy of data consisting of files, records, data items(or fields) and
characters with characters encoded in terms of bits. It will be seen that at
the top of the hierarchy is a file. When all records of the same record content
are gathered as a single collection of information, the collection is referred to
as file(or data set). The records in a file, in turn, are groupings of related
data items or fields and then specific data values.

For ease of access or reference, each record is allocated a key field, that is a
field by which it is identified.

Sequential File Organization:


This is the most common structure for large files that are typically processed in
their entirety, and its at the heart of the more complex schemes. In this scheme , all
the records have the same size and same field format, with the fields having fixed
size as well.sequential means one after another.the records of files are stored in physical order one
after other as you created

Direct File Organization

Direct file organization accesses the records through record’s physical addresses on a direct access
storage device.

Device Driver

Device driver are software program required for each device.each device will require different driver for
different device as per functionality. A device driver knows how the buffer,flags,register control and
status bits should be used for a particular device.a simply reading character from a device involves
complex sequences of device specific operations.

Terminal i/o

Terminal hardware can be divided into two parts the keyboard which is used for input medium and
video screen,which useful as an output medium combination of these two is termed as VDU.

Terminal are of two types

1.Dumb terminal : It is responsible for basic input and output of characters. It is called dumb because it
does no processing on the input characters.

2.Intelligent terminal: The terminal can do processing on the up. So it requires more powerful hardware
and software for it.

Multiprogramming
Multiprogramming means more than one program can be active at the same
time. Before the operating system concept, only one program was to be
loaded at a time and run. These systems were not efficient as the CPU was
not used efficiently. For example, in a single-tasking system, the CPU is not
used if the current program waits for some input/output to finish. The idea of
multiprogramming is to assign CPUs to other processes while the current
process might not be finished.

Degree of multiprogramming

The no of processes running simultaneously competing for CPU is called degree of multiprogramming

Context switching

In multiprogramming at a time multiple processes are running simultaneously. Suppose there are two
processes. Process1 and process 2

Then there would be time lost in turning attention from process 1 to process 2 this is called context
switching.

States of a Process
a process is a program that is being executed. During its execution, a
process goes through different states.
 New: This state represents a newly created process that hasn’t started
running yet. It has not been loaded into the main memory, but its process
control block (PCB) has been created, which holds important information
about the process.
 Ready: A process in this state is ready to run as soon as the CPU
becomes available. It is waiting for the operating system to give it a
chance to execute.
 Running: This state means the process is currently being executed by
the CPU. Since we’re assuming there is only one CPU, at any time, only
one process can be in this state.
 Blocked/Waiting: This state means the process cannot continue
executing right now. It is waiting for some event to happen, like the
completion of an input/output operation (for example, reading data from a
disk).
 Exit/Terminate: A process in this state has finished its execution or has
been stopped by the user for some reason. At this point, it is released by
the operating system and removed from memory.

CPU Scheduling
CPU scheduling is a process used by the operating system to decide which
task or process gets to use the CPU at a particular time. This is important
because a CPU can only handle one task at a time, but there are usually
many tasks that need to be processed. The following are different purposes
of a CPU scheduling time.
 Maximize the CPU utilization
 Minimize the response and waiting time of the process.
Terminologies Used in CPU Scheduling
 Arrival Time: The time at which the process arrives in the ready queue.
 Completion Time: The time at which the process completes its
execution.
 Burst Time: Time required by a process for CPU execution.
 Turn Around Time: Time Difference between completion time and arrival
time.
Turn Around Time = Completion Time – Arrival Time
 Waiting Time(W.T): Time Difference between turn around time and burst
time.
Waiting Time = Turn Around Time – Burst Time
 CPU Utilization: The main purpose of any CPU algorithm is to keep the
CPU as busy as possible. Theoretically, CPU usage can range from 0 to
100 but in a real-time system, it varies from 40 to 90 percent depending
on the system load.
 Throughput: The average CPU performance is the number of processes
performed and completed during each unit. This is called throughput. The
output may vary depending on the length or duration of the processes.
 Turn Round Time: For a particular process, the important conditions are
how long it takes to perform that process. The time elapsed from the time
of process delivery to the time of completion is known as the conversion
time. Conversion time is the amount of time spent waiting for memory
access, waiting in line, using CPU, and waiting for I / O.
 Waiting Time: The Scheduling algorithm does not affect the time required
to complete the process once it has started performing. It only affects the
waiting time of the process i.e. the time spent in the waiting process in the
ready queue.
 Response Time: In a collaborative system, turn around time is not the
best option. The process may produce something early and continue to
computing the new results while the previous results are released to the
user. Therefore another method is the time taken in the submission of the
application process until the first response is issued. This measure is
called response time.
Different Types of CPU Scheduling Algorithms
There are mainly two types of scheduling methods:
 Preemptive Scheduling: Preemptive scheduling is used when a process
switches from running state to ready state or from the waiting state to the
ready state.
 Non-Preemptive Scheduling: Non-Preemptive scheduling is used when
a process terminates , or when a process switches from running state to
waiting state.

You might also like