1
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEContents
Definition
Evolution or types of Operating System
Functions of Operating System
Definition of Operating System
An operating system
hardware and software resources and provides common services operating system is a component of the
programs usually require an operating system to function.
Evolution of Operating Systems or Types of Operating System
The following are the different types of operating
Batch Processing
Single user Single-tasking Operating System
Multiprogramming Operating System
Single-user multitasking Operating System
Multi-user multitasking Operating system
Time-sharing operating system
Multiprocessing operating system
Real-time operating system
Virtual machine operating system
B Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICE Evolution or types of Operating System
Functions of Operating System
Definition of Operating System
operating system (OS) is system software that manages
resources and provides common services for computer programs. The operating system is a component of the system software in a computer system.
usually require an operating system to function.
Evolution of Operating Systems or Types of Operating System
The following are the different types of operating systems
tasking Operating System ltiprogramming Operating System
r multitasking Operating System r multitasking Operating system
ting system operating system operating system irtual machine operating system
B Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICE
that manages computer
2
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEBatch operating system:
The users of batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To speed up processing, jobs with similar needs are batched together and run as a group. Thus, the programmers left their programs with the operator. The operator then sorts programs into batches with similar requirements.
Advantages:
• Batch processing takes much of the work of the operator to the computer.
• Increased performance as a new job gets started as soon as the previous job finished
without any manual intervention.
Disadvantages:
• Lack of interaction between the user and job.
• CPU is often idle, because the speeds of the mechanical I/O devices are slower than CPU.
• Difficult to provide the desired priority
Single user Single-tasking Operating System
An operating system that allows a single user to work on a computer at a time and can execute a single job at a time is known as single-user single-tasking operating system.
For example, MS-DOS is a single-user single-tasking operating system because you can open and run only one application at a time in MS-DOS.
Multiprogramming Operating System:
3
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEprocessor. Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute.
Following figure shows the memory layout for a multiprogramming system.
Operating system does the following activities related to multiprogramming.
• The operating system keeps several jobs in memory at a time.
• This set of jobs is a subset of the jobs kept in the job pool.
• The operating system picks and begins to execute one of the job in the memory.
• Multiprogramming operating system monitors the state of all active programs and
• system resources using memory management programs to ensures that the CPU is never
idle unless there are no jobs
Advantages
• High and efficient CPU utilization.
• User feels that many programs are allotted CPU almost simultaneously.
Disadvantages
• CPU scheduling is required.
• To accommodate many jobs in memory, memory management is required.
Single-user multitasking Operating System:
4
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEThe single user multitasking Operating System enhances the productivity of users, as they can complete more than one job at the same time.
For example, when we are typing a document in Microsoft word while listening to a song and downloading a file from the internet, we are actually doing three jobs at the same time with the help for multi tasking operating system.
Multi-user multitasking Operating system:
A multi-user operating system is an operating system that allows multiple users on different computers or terminals to access a single system with one OS on it. Multitasking is another name that is used for this system.
These programs are often quite complicated and must be able to properly manage the necessary tasks required by the different users connected to it. The users will typically be at terminals or computers that give them access to the system through a network, as well as other machines on the system such as printers.
A multi-user operating system differs from a single-user system on a network in that each
user is accessing the same OS at different machines.
Example:
Unix server where multiple remote users have access (such as via Secure Shell) to the Unix shell
prompt at the same time.
Time-sharing operating system:
Time sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multi-programmed Batch Systems and Time-Sharing Systems is that in case of Multi-programmed batch systems, objective is to maximize processor use, whereas in Time-Sharing Systems objective is to minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response.
5
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEIn above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting state whereas user 6 is in ready status.
As soon as the time slice of user 5 is completed, the control moves on to the next ready user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in waiting state and user 1 is in ready state. The process continues in the same way and so on.
Advantages of Timesharing operating systems are following
• Provide advantage of quick response.
• Avoids duplication of software.
• Reduces CPU idle time.
Disadvantages of Timesharing operating systems are following.
• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.
Multiprocessing operating system:
Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system.
The term also refers to the ability of a system to support more than one processor and/or the ability to allocate tasks between them.
Multiprocessor Operating System refers to the use of two or more central processing
6
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEThese types of systems are used when very high speed is required to process a large volume of data. These systems are generally used in environment like satellite control, weather forecasting etc. The basic organization of multiprocessing system is shown in fig.
Advantages:
In this system processor is assigned a specific task. A master processor controls the system. This scheme defines a master-slave relationship.
These systems can save money in compare to single processor systems because the processors can share peripherals, power supplies and other devices.
Disadvantages:
The main advantage of multiprocessor system is to get more work done in a shorter period of time.
Moreover, multiprocessor systems prove more reliable in the situations of failure of one
processor. In this situation, the system with multiprocessor will not halt the system; it will only slow it down.
Real-time operating system:
A real time operating system (RTOS) is a data processing system in which the time interval required to process and respond to inputs is very small and highly critical.
An RTOS has well-defined , fixed time constraint, otherwise the system fail.
7
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE1. RTOS is used in embedded systems like cell phones, air conditioners, digital
homes, cars, and so on.
For Example, an RTOS can be used in car air bags.
Now, in case of accident, if the air bag does not open at the right time, then the person in the car will be either injured or may even cause die.
2. RTOS commonly used in an HDTV receiver and display.
This device continuously reads a digital signal, decodes, and displays it in real time. Any delay in this process can lead to a jerky or pixilated video and / or garbled audio.
There are two types of RTOS:
1. Hard real-time system 2. Soft real-time system
Hard real-time system:
Hard Real-time system guarantees that critical tasks are completed on time.
In hard real-time system, secondary storage is limited or missing. They stored data in
read only memory.
In this virtual memory is not found.
These are mostly used in robotics, and air traffic control system.
Soft real-time system:
Soft real-time systems are less restrictive but they give priority to critical tasks and retain
the priority until the task is completed.
Soft real-time systems have limited utility than hard real-time systems.
These are mostly used in multimedia, virtual reality etc..
Virtual machine operating system:
Virtual machine operating system enables several users of a computer to use it as if they are using it individually. When using a virtual machine operating system environment can coexist on the same computer.
******************************************************************************
Functions of Operating System
The following are the various services provided by an Operating System.
1. Process Management
8
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE3. File Management
4. I/O System Management
5. Secondary Management
6. Protection System
7. Command-Interpreter System
Process Management:
A process can be a program or set of instructions which are in main memory and ready to execute.
We can say that a program is a Passive entity, which stored on the disk. A process is an Active entity which is stored in main memory.
A process needs several system resources like CPU time, files, I/O devices to completeits task.
These resources are allocated to the process at the time of creating the process or at the time of running and these resources can be allocated by operating system.
Operating System is responsible for the following activities with process management.
a) Process creation and deletion.
b) Process suspension and resumption.
Main Memory Management:
Main Memory is a large array of bytes. Any user must copied into main memory for execution. CPU reads instructions from main memory and executes one after another. Some part of main memory is reserved operating system.
The following are responsibilities of operating system regarding memory management.
a) Keep track of which parts of memory are currently being used and by whom.
b) Decide which processes to load when memory space becomes available.
c) Allocate and de-allocate memory space as needed.
File Management:
9
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEThe operating system is responsible for the following activities in connections with file management.
a) File creation and deletion.
b) Directory creation and deletion.
c) Support of primitives for manipulating files and directories.
d) Mapping files onto secondary storage.
e) File backup on stable (nonvolatile) storage media.
I/O System Management:
The important purpose of operating system is to hide some properties of hardware device from the user i.e., user is unable to execute I/O instructions directly.
The I/O system consists of
a) A buffer-caching system
b) A general device-driver interface
c) Drivers for specific hardware devices
Secondary Management:
All the programs must be in main memory before their execution. Main Memory is known as primary storage and it is volatile and it has limited capacity. So, we require secondary storage, which is non volatile and high capacity.
All the programs in the secondary storage must be copied into main memory before their execution.
The operating system is responsible for the following activities in connection with disk management:
a) Free space management
b) Storage allocation
c) Disk scheduling
10
B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICE B Naresh Lecturer in Computer Science BVRICEB Naresh Lecturer in Computer Science BVRICEIn the multiprogramming, multiple processes are executing concurrently. Various processes must be protected from other processes. We have to protect our memory by means of register and limit register. Here one process is unable to access information from another process and from operating system. We can protect all I/O by means of declaring all I/O instructions are privileged and they will be executed in monitor mode. Finally, CPU protection is achieved by timer.
The protection mechanism must:
a) Distinguish between authorized and unauthorized usage.
b) Specify the controls to be imposed.
c) Provide a means of enforcement
Command-Interpreter System:
Command Interpreter is one of the most important system program and it is interface between user and operating system. Some operating systems include this program in the kernel. Some operating systems like MS-DOS and UNIX treat this program as a special program and they invoke this program when a job is initiated.
Commands are given to operating system by means of control statements. The functionality of command interpreter is very simple.