You are on page 1of 23

Operating Systems

Unit 2

Introduction
An OS is a software program that loads automatically and controls just about everything on the computer. It does the following: a) Controls computers hardware. b) runs the computers programs. c) organizes files.. When the computer starts, it starts the OS that takes the control of the machine.

Definition
No formal agreed definition: Generally defined as A group of programs designed to serve the basic purpose of controlling the allocation and use of the resources among various users and tasks. Also to provide an interface between the computer hardware and programmer.

The OS manages the resources of the computer efficiently and effectively with least human intervention. The major resources of computer are; 1. memory 2. Processor 3. Devices 4. Data or information. It is responsible for security from unauthorized users.

Functions of an OS
Primary Functions are: 1.Booting 2. Housekeeping functions ( Formatting, coordinating, etc) 3.User interface 4. Managing computer resources ( Memory management, Processor management, Device management, Information management) 5.Managing tasks.

Booting
When the computer is powered on , the process that takes place till the computer is ready to accept the work is called Booting. This process is actually performed by a permanently stored program in the ROM of the system called bootstrap This is also referred as BIOS which gets executed first and then copies the OS programs into the memory of the system. After loading the bootstrap, the computer runs the diagnostic routines to test the other parts.

House keeping operations


In this, the OS arranges and organizes the files, backups the files and format a floppy (if needed).

User Interface
This function of the OS helps in communication between the user and the OS. The modes are command based and GUI based

Managing Computer Resources


Memory Management The OS optimizes memory by allocating the memory to various applications or processes running on the system and removes unwanted data from memory. Processor Management The OS does the control and allocation of CPU time to various processes. A scheduler(part of OS)selects which ready program to be run next and specifies the CPU time allocated to it

Device Management The I/O devices, storage devices (called as peripheral devices) are handled and managed for single use of multiuse options. Information Management Here the OS keeps track of the file storage and retrieval of data or program files on various locations and makes them available when required.

Managing tasks
A task is any single operation performed on the computer. But using the computer for just a single task is inefficient. The OS manages a variety of tasks by Multitasking, Multiprogramming, time sharing, Multiprocessing.

Types of OS
OS cab be classified based on various parameters as follows: 1. Based on Mode of Processing 2. Based on Number of Users 3. Based on Number of Processes 4. Based on Type of user Interface.

Based on Mode of Processing


Two Classifications: 1. Batch processing OS 2. Real-time OS Batch processing OS: The jobs to be executed are gathered for a specific period of time called A Batch and form a queue of programs. The batch of programs are then taken up for execution one by one in sequence. Example:

Real-time OS: A Real-time OS responds quickly to the input. There is no time gap between the input and processing, (i.e) the input is processed immediately. Example:

Based on Number of Users


Two Classifications: 1. Single user OS 2. Multi-user OS Single User OS: This kind of OS runs one user work at a time (i.e) only one program resides in computer memory and remains there till it is executed. Example: MSDOS.

Multi-user OS: This type of OS enables more than one user to work upon it. They allow 2 or more users to run programs at the same time. Example: Windows NT, Unix, Linux.

Based on Number of Processes


Four Classifications: 1. Multi-tasking OS 2. Multi-programming OS 3. Time Sharing OS 4. Multi-processing OS

Multi-tasking OS: It is the execution of 2 or more programs by an user concurrently on the same computer with one CPU. The OS handles each job for a determined amount of time BUT ONE AT A TIME. Example: we may type text in MS-Word, while giving some printout.

Multi-programming OS: It allows a number of programs to work belonging to different users stored in the main memory at the same time & executed concurrently. The CPU spends certain amount of time executing each users program. It works so fast with all the programs & takes care of switching the CPU among the various user works. For Multi-programming, large memories are required together with fast secondary storage devices

Time Sharing OS: It is the processing done by a single computer, of tasks belonging to several users, accessing the system from different locations in a rotation manner. This requires a communication network in place connecting various users to the computer. The OS will attend first attend to the first user for a fixed time and go to the next users and so on.

Multi-processing: A multi-processor OS is similar to multiprogramming OS, except that there is more than one processor. A computer with 2 or more processors can run more than one program at a given time by assigning them to different processors.

Based on Type of user Interface.


Two Classifications: 1. CUI OS 2. GUI OS CUI OS [ Character User Interface OS]: This kind of OS interacts with the users only through the commands typed from the keyboard. It does not support any other input device than keyboard. The user has to remember the syntax of commands exactly.

GUI OS: The GUI OS makes use of icons (images or pictures) to perform a task. It is a picture based way of interacting with the computer. This OS makes use of mouse for selecting and executing any task.

You might also like