Os Notes3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

KIPM OPERATING SYSTEM BCA301

KAILASH INSTITUTE OF MANAGEMENT


GIDA, GORAKHPUR
BCA 2nd YEAR
UNIT 01
INTRODUCTION TO OPERATING SYSTEM

NAME OF FACULTY : MR. PANKAJ UPADHYAY

DEPARTMENT : DEPARTMENT OF COMPUTER APPLICATION

SUBJECT : OPERATING SYSTEM

SUBJECT CODE : BCA 301

SYLLABUS OF UNIT 01

Introduction to Operating System, Need of Operating System, Function of


Operating System, Services of Operating System and Operating System
Classification: Single User and Multi User OS, Simple Batch Operating Sys.
Multiprogramming and Multitasking OS, Parallel, Distributed and Real Time
Operating System.

PANKAJ UPADHYAY Page 1


KIPM OPERATING SYSTEM BCA301

Introduction of Operating System

An operating system acts as an intermediary between the user of a


computer and computer hardware. The purpose of an operating system
is to provide an environment in which a user can execute programs
conveniently and efficiently.
An operating system is software that manages computer hardware. The
hardware must provide appropriate mechanisms to ensure the correct
operation of the computer system and to prevent user programs from
interfering with the proper operation of the system.

Operating System

• An operating system is a software that controls the execution of


application programs and acts as an interface between the user of a
computer and the computer hardware.
• A more common definition is that the operating system is the one
program running at all times on the computer (usually called the
kernel), with all else being application programs.
• An operating system is concerned with the allocation of resources
and services, such as memory, processors, devices, and information.
The operating system correspondingly includes programs to manage
these resources, such as a traffic controller, a scheduler, a memory
management module, I/O programs, and a file system.

The process operating system as User Interface:

1. User
2. System and application programs
3. Operating system
4. Hardware

Every general-purpose computer consists of the hardware, operating


system, system programs, and application programs. The hardware
consists of memory, CPU, ALU, and I/O devices, peripheral devices, and
storage devices. System program consists of compilers, loaders, editors,
OS, etc. The application program consists of business programs,
database programs.

PANKAJ UPADHYAY Page 2


KIPM OPERATING SYSTEM BCA301

Fig1: Conceptual view of a computer system

Every computer must have an operating system to run other programs.


The operating system coordinates the use of the hardware among the
various system programs and application programs for various users. It
simply provides an environment within which other programs can do
useful work.
The operating system is a set of special programs that run on a
computer system that allows it to work properly. It performs basic tasks
such as recognizing input from the keyboard, keeping track of files and
directories on the disk, sending output to the display screen, and
controlling all the input output peripheral devices.
OS is designed to serve two basic purposes which are instructed below:

1. It controls the allocation and use of the computing System’s


resources among the various user and tasks.
2. It provides an interface between the computer hardware and the
programmer that simplifies and makes it feasible for coding,
creation, debugging of application programs.

Need for Operating System

1. Interface between the user and the computer


An OS provides a very easy way to interact with the computer. It provides
different features and GUI so that we can easily work on a computer. We
have to interact just by clicking the mouse or through the keyboard. Thus,
we can say that an OS makes working very easy and efficient.

PANKAJ UPADHYAY Page 3


KIPM OPERATING SYSTEM BCA301

2. Booting
Booting is basically the process of starting the computer. When the CPU
is first switched ON it has nothing inside the memory. So, to start the
computer, we load the operating system into the main memory.
Therefore, loading the OS to the main memory to start the computer is
booting. Hence, the OS helps to start the computer when the power is
switched ON.

3. Managing the input/output devices


The OS helps to operate the different input/output devices. The OS
decides which program or process can use which device. Moreover, it
decides the time for usage. In addition to this, it controls the allocation
and de-allocation of devices.

4. Multitasking
The OS helps to run more than one application at a time on the computer.
It plays an important role while multitasking. Since it manages memory
and other devices during multitasking. Therefore, it provides smooth
multitasking on the system.

5. Platform for other application software


Users require different application programs to perform specific tasks on
the system. The OS manages and controls these applications so that they
can work efficiently. In other words, it acts as an interface between the
user and the applications.
Some other uses/need for operating system are:
6. Manages the memory
It helps in managing the main memory of the computer. Moreover, It
allocates and de-allocates memory to all the applications/tasks.

7. Manages the system files


It helps to manage files on the system. As we know, all the data on the
system is in the form of files. It makes interaction with the files easy.

8. Provides Security
It keeps the system and applications safe through authorization. Thus, the
OS provides security to the system.

PANKAJ UPADHYAY Page 4


KIPM OPERATING SYSTEM BCA301

9. Acts as an Interface
It is an interface between computer hardware and software. Moreover, it is
an interface between the user and the computer.

Functions of Operating system –

Operating system performs four functions:

1. Convenience: An OS makes a computer more convenient to use.

2. Efficiency: An OS allows the computer system resources to be used


efficiently.

3. Ability to Evolve: An OS should be constructed in such a way as to


permit the effective development, testing, and introduction of new
system functions at the same time without interfering with service.

4. Throughput: An OS should be constructed so that It can give


maximum throughput (Number of tasks per unit time).

Major Functionalities of Operating System:

• Resource Management: When parallel accessing happens in the OS


means when multiple users are accessing the system the OS works
as Resource Manager, its responsibility is to provide hardware to the
user. It decreases the load in the system.

• Process Management: It includes various tasks


like scheduling, termination of the process. OS manages various
tasks at a time. Here CPU Scheduling happens means all the tasks
would be done by the many algorithms that use for scheduling.

• Storage Management: The file system mechanism used for the


management of the storage. NIFS, CFS, CIFS, NFS, etc. are some file
systems. All the data stores in various tracks of Hard disks that all
managed by the storage manager. It included Hard Disk.

• Memory Management: Refers to the management of primary


memory. The operating system has to keep track, how much memory
has been used and by whom. It has to decide which process needs
memory space and how much. OS also has to allocate and de-
allocate the memory space.

PANKAJ UPADHYAY Page 5


KIPM OPERATING SYSTEM BCA301

• Security/Privacy Management: Privacy is also provided by the


Operating system by means of passwords so that unauthorized
applications can’t access programs or data. For example, Windows
uses Kerberos authentication to prevent unauthorized access to
data.

Operating system services:

The operating system provides the programming environment in which a


programmer works on a computer system. The user program requests
various resources through the operating system. The operating system
gives several services to utility programmers and users. Applications
access these services through application programming interfaces or
system calls. By invoking those interfaces, the application can request a
service from the operating system, pass parameters, and acquire the
operation outcomes.

Following are the services provided by an operating system -

➢ Program execution
➢ Control Input/output devices
➢ Program creation
➢ Error Detection and Response
➢ Accounting
➢ Security and Protection
➢ File Management
➢ Communication

PANKAJ UPADHYAY Page 6


KIPM OPERATING SYSTEM BCA301

Classification of Operating System:

➢ Single User Operating System


➢ Multi User Operating System
➢ Simple Batch Processing
➢ Multi Programming
➢ Multi Tasking
➢ Parallel System
➢ Distributed System
➢ Real Time System

1. Single User Operating System:

A single-user operating system is a type of operating system


developed for a single user at any given time. More than one user
cannot perform their task on single User Operating System.
For ex: MSDOS, Windows 95, 97, 98.

Types of Single User Operating System: There are two types of


Single User Operating System.

• Single User Single Tasking Operating System:

In Single-User Single-Tasking operating system, only one user is


permitted for performing a single task at a time. Some functions
such as printing a document and downloading images and
videos are performed in one given frame. This operating system
is designed especially for wireless phones as well as two-way

PANKAJ UPADHYAY Page 7


KIPM OPERATING SYSTEM BCA301

messaging devices. For example, MS-DOS, Palm OS, etc. It has


the following advantages:

• This operating system occupies less space in memory.


• It is cost-effective.

• Single User Multi Tasking Operating System:

Single-User Multi-Tasking operating system is developed


especially for one user, but this single user can perform multiple
tasks simultaneously. For example, you can write any text while
surfing the internet, downloading images, watching movies, etc.,
on Windows, Linux, Mac O/S. It has the following advantages:
➢ Time-saving.
➢ High productivity in less time frame.
➢ Less memory is used for performing multiple tasks.

2. Multi User Operating System:

Multi-user operating system is a computer operating system which


allows multiple users to access the single system with one
operating system on it. It is generally used on large mainframe
computer.
Example: Linux, Unix, Windows 2000, Ubuntu, Mac OS etc.
In the multi-user operating system, different users connected at
different terminals and we can access, these users through the
network as shown in the diagram.

PANKAJ UPADHYAY Page 8


KIPM OPERATING SYSTEM BCA301

3. Batch Operating System –

This type of operating system does not interact with the computer
directly. There is an operator which takes similar jobs having the same
requirement and group them into batches. It is the responsibility of the
operator to sort jobs with similar needs.

Advantages of Batch Operating System:


• It is very difficult to guess or know the time required for any job to
complete. Processors of the batch systems know how long the job
would be when it is in queue
• Multiple users can share the batch systems
• The idle time for the batch system is very less
• It is easy to manage large work repeatedly in batch systems

Disadvantages of Batch Operating System:


• The computer operators should be well known with batch systems
• Batch systems are hard to debug
• It is sometimes costly
• The other jobs will have to wait for an unknown time if any job fails

Examples of Batch based Operating System: Payroll System, Bank


Statements, etc.

4. Multiprogramming OS is an ability of an operating system that


executes more than one program using a single processor machine.
More than one task or program or jobs are present inside the main
memory at one point of time.
Buffering and spooling can overlap I/O and CPU tasks to improve the
system performance but it has some limitations that a single user
cannot always keep CPU or I/O busy all the time.

PANKAJ UPADHYAY Page 9


KIPM OPERATING SYSTEM BCA301

To increase resource utilization, multiprogramming approaches.

Operating System

Job1

Job2

---

Job N

Empty space

The OS could pick and start the execution of one of the jobs in memory,
whenever the jobs does not need CPU that means the job is working
with I/O at that time the CPU is idle at that time the OS switches to
another job in memory and CPU executes a portion of it till the job
issues a request for I/O and so on.
Let’s P1 and P2 are two programs present in the main memory. The OS
picks one program and starts executing it.
During execution if the P1 program requires I/O operation, then the OS
will simply switch over to P2 program. If the p2 program requires I/O
then again it switches to P3 and so on.
If there is no other program remaining after P3 then the CPU will pass
its control back to the previous program.
Advantages
The advantages of multiprogramming operating system are as follows −
➢ CPU utilization is high because the CPU is never goes to idle state.
➢ Memory utilization is efficient.
➢ CPU throughput is high and also supports multiple interactive user
terminals.
Disadvantages
The disadvantages of multiprogramming operating system are as follows

➢ CPU scheduling is compulsory because lots of jobs are ready to run
on CPU simultaneously.
➢ User is not able to interact with jobs when it is executing.

PANKAJ UPADHYAY Page 10


KIPM OPERATING SYSTEM BCA301

➢ Programmers also cannot modify a program that is being executed.


If several jobs are ready in main memory and if there is not enough
space for all of them, then the system has to choose them by making a
decision, this process is called job scheduling.
When the operating system selects a job from the group of jobs and
loads that job into memory for execution, therefore it needs memory
management, if several such jobs are ready then it needs CPU
scheduling.

5. Multitasking Operating System or Time-Sharing Operating


Systems –

Each task is given some time to execute so that all the tasks work
smoothly. Each user gets the time of CPU as they use a single system.
These systems are also known as Multitasking Systems. The task can
be from a single user or different users also. The time that each task
gets to execute is called quantum. After this time interval is over OS
switches over to the next task.

Advantages of Time-Sharing OS:


• Each task gets an equal opportunity
• Fewer chances of duplication of software
• CPU idle time can be reduced

Disadvantages of Time-Sharing OS:


• Reliability problem
• One must have to take care of the security and integrity of user
programs and data
• Data communication problem

Examples of Time-Sharing OSs are: Multics, Unix, etc.

PANKAJ UPADHYAY Page 11


KIPM OPERATING SYSTEM BCA301

6. Distributed Operating System –

These types of the operating system are a recent advancement in the


world of computer technology and are being widely accepted all over the
world and, that too, with a great pace. Various autonomous
interconnected computers communicate with each other using a shared
communication network. Independent systems possess their own
memory unit and CPU. These are referred to as loosely coupled
systems or distributed systems. These system’s processors differ in size
and function. The major benefit of working with these types of the
operating system is that it is always possible that one user can access
the files or software which are not actually present on his system but
some other system connected within this network i.e., remote access is
enabled within the devices connected in that network.

Advantages of Distributed Operating System:


➢ Failure of one will not affect the other network communication, as
all systems are independent from each other
➢ Electronic mail increases the data exchange speed

PANKAJ UPADHYAY Page 12


KIPM OPERATING SYSTEM BCA301

➢ Since resources are being shared, computation is highly fast and


durable
➢ Load on host computer reduces
➢ These systems are easily scalable as many systems can be easily
added to the network
➢ Delay in data processing reduces

Disadvantages of Distributed Operating System:


➢ Failure of the main network will stop the entire communication
➢ To establish distributed systems the language which is used are
not well defined yet
➢ These types of systems are not readily available as they are very
expensive. Not only that the underlying software is highly complex
and not understood well yet.

Examples of Distributed Operating System are- LOCUS, etc.

7. Parallel Operating System:

Parallel operating systems are primarily concerned with managing the


resources of parallel machines. A parallel computer is a set of processors
that are able to work cooperatively to solve a computational problem. So,
a parallel computer may be a supercomputer with hundreds or
thousands of processors or may be a network of workstations.

Parallel processing requires multiple processors and all the processor


works simultaneously in the system. Here, the task is divided into
subparts and these subparts are then distributed among the available
processors in the system. Parallel processing completes the job on the
shortest possible time.

PANKAJ UPADHYAY Page 13


KIPM OPERATING SYSTEM BCA301

8. Real-Time Operating System –

These types of OSs serve real-time systems. The time interval required
to process and respond to inputs is very small. This time interval is
called response time.
Real-time systems are used when there are time requirements that are
very strict like missile systems, air traffic control systems, robots, etc.

Two types of Real-Time Operating System which are as follows:


➢ Hard Real-Time Systems:
These OSs are meant for applications where time constraints are
very strict and even the shortest possible delay is not acceptable.
These systems are built for saving life like automatic parachutes
or airbags which are required to be readily available in case of any
accident. Virtual memory is rarely found in these systems.

➢ Soft Real-Time Systems:


These OSs are for applications where for time-constraint is less
strict.

Advantages of RTOS:

➢ Maximum Consumption: Maximum utilization of devices and


system, thus more output from all the resources.

PANKAJ UPADHYAY Page 14


KIPM OPERATING SYSTEM BCA301

➢ Task Shifting: The time assigned for shifting tasks in these


systems are very less. For example, in older systems, it takes
about 10 microseconds in shifting one task to another, and in the
latest systems, it takes 3 microseconds.

➢ Focus on Application: Focus on running applications and less


importance to applications which are in the queue.
➢ Real-time operating system in the embedded system: Since the
sizes of programs are small, RTOS can also be used in embedded
systems like in transport and others.

➢ Error Free: These types of systems are error-free.

➢ Memory Allocation: Memory allocation is best managed in these


types of systems.

Disadvantages of RTOS:

➢ Limited Tasks: Very few tasks run at the same time and their
concentration is very less on few applications to avoid errors.

➢ Use heavy system resources: Sometimes the system resources


are not so good and they are expensive as well.

➢ Complex Algorithms: The algorithms are very complex and


difficult for the designer to write on.

➢ Device driver and interrupt signals: It needs specific device


drivers and interrupts signals to respond earliest to interrupts.

➢ Thread Priority: It is not good to set thread priority as these


systems are very less prone to switching tasks.

Examples of Real-Time Operating Systems are: Scientific


experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.

LEARN AND REVISE THE FOLLOWING EXERCISE:

PANKAJ UPADHYAY Page 15


KIPM OPERATING SYSTEM BCA301

EXERCISE:

QUE 1. WHAT IS AN OPERATING SYSTEM? EXPLAIN THE FEATURES OF


OPERATING SYSTEM?

QUE 2. LIST AND EXPLAIN THE MAJOP FUNCTION OF OPERATING


SYSTEM?

QUE 3. WHAT IS THE ROLE OF OPERATING SYSTEM INTERFACE?

QUE 4. WHAT ARE THE GOALS AND PRINCIPLES OF OPERATING


SYSTEMS?

QUE 5. EXPLAIN BRIEFLY THE EVOLUTION OF OPEATING SYSTEM.

QUE 6. EXPLAIN THE DIFFERENT SERVICES PROVIDED BY THE


OPEATING SYSTEM.

QUE 7. EXPLAIN IN BRIEF THE CLASSIFICATION OF OPERATING


SYSTEM.

QUE 8. WHAT IS THE DIFFERENCE BETWEEN SINGLE PROCESS


OPEARTING SYSTEM AND MULTI PROCESS OS?

QUE 9. EXPLAIN BATCH OPEATING SYTEM.

QUE 10. EXPLAIN SINGLE USER AND MULTI USER OS.

QUE 11. WHAT IS THE DIFFERENCE BETWEEN MULTIPROGRAMMING


AND MUTITASKING OS?

QUE 12. EXPLAIN PARALLEL OS.

QUE 13. EXPLAIN IN DETAILS DISTRIBUTED OS WITH DIAGRAM.

QUE 14. WHAT ARE THE ONLINE OR REAL TIME OS. EXPLAIN ITS TYPES

QUE 15. WRITE A SHORT NOTES ON THE FUTURE OF OPEATING


SYSTEM.

PANKAJ UPADHYAY Page 16

You might also like