Session 07
Operating Systems Overview As we have learned in working model of a computer we require a software system to control all the equipment that are connected to computer and provide good environment for our application programs to run. It is the most important program which runs on computer. Computer needs an operating system to work while operating system is a set of system software. Operating system s main tasks are controlling input / output to the system, keeping track of files and directories, control devices according to user input and memory management.
Operating system has control over all aspects of computer system and it acts as a policeman monitoring all the activities of the computer programs and user operations. It prevents harmful activities by user or program either purposefully or accidentally and thus provides security to the operations of the system from unauthorized activities. Application programs run on top of the platform provided by the Operating System. The application programs must be written to run on top of a particular operating system.
Your choice of operating system, therefore, determines which applications that you can run. Operating Systems classifications classifications of operating systems can be given as follows: multi-user : Allows two or more users to run programs at the same time. Some operating systems permit hundreds or even thousands of concurrent users (users that work in parallel). multiprocessing : Supports running a program on more than one CPU. multitasking : Allows more than one program to run concurrently.
multithreading : Allows different parts of a single program to run concurrently. real time: Responds to input instantly. General-purpose operating systems, such as DOS and UNIX, are not real-time. Function of Operating System We use operating systems for various tasks. If operating system quickly responds to our commands and does not get hang up when multiple operations are being undertaken we say it is a good operating system. If the operating system is easier to use then we call it a user friendly operating system.
But have you ever thought of how operating system handles all the operations? Let us look at what are the major activities undertaken by operating systems. 1. Input / Output Management 2. Process scheduling and management 3. Main memory Management 4. Device Management 5. File management 6. Protection and Security Management
Input Output management Operating system must properly coordinate the job of input of our data. Example 1 It should give sufficient priority to take the keystrokes that we type in and display it as soon as possible whilst engaged in other background processes. Example 2 We might have scheduled to copy a set of files from CD ROM while we have scheduled to print 100 pages documents. So operating system need take care of coordinating input and output operations and slow down the data rate to printer so that it is not overwhelmed.
Process Scheduling and Management In today s world we need to get several tasks done from PC simultaneously. We cannot wait until one task is done. So the Modern OS should be capable of handling several tasks at the same time. But CPU can take one task at a time. Then how can you ask to have parallel jobs in operation? As we have discussed in a different chapter CPU works so fast that it switches between several jobs so quickly and does parts of all jobs so that we feel several jobs are being carried out at the same time.
Which job to have highest priority and which job scheduled next is a task of operating system process scheduler. There can be several scheduling techniques adopted by operating systems for this purpose. There are two kinds of programs can reside within an operating system. 1. I/O intensive programs (always required reading from Disk/memory and writing to Disk / memory) 2. CPU intensive programs (always require access to CPU to initiate processing)
So these processes can be scheduled in parallel while one program is using CPU another can read/write disk which improves overall performance. Operating system has to identify these processes (tasks/ programs) and schedule them in an appropriate way to provide optimal performance to user. Main Memory Management Every program we start requires some data to be loaded to main memory of the computer. As we load more programs the computer memory will be getting full and there has to be sufficient free space for manipulation of data as well.
Processed data has to be written back to disk as well otherwise it will take up all available memory. There has to be proper mechanism to allocate required memory for program to run and make careful decisions on additional memory requests by the programs. All these memory related functions are handled by operating system. User programs request for the memory space and allocation of memory is done by OS. There are several different techniques used when requested memory capacity is not available.
One mechanism is virtual memory that uses part of hard disk as computer memory. Example If you load the operating system, an e-mail program, a Web browser and word processor into RAM simultaneously, 32 megabytes is not enough to hold it all. Without virtual memory, then once you filled up the available RAM your computer would have to say, "Sorry, you can not load any more applications. Please close another application to load a new one." With virtual memory, what the computer can do is look at RAM for areas that have not been used recently and copy them onto the hard disk. This frees up space in RAM to load the new application.
Device Management There are several components fitted to the computer. There should be a commonly agreed mechanism to send certain controlling commands to those equipment. Since there is no consensus among equipment manufacturers, they have been asked to provide drivers (small computer program containing instructions on how to use specific equipment) to operating system. That is why you will be given a CD containing software when you purchase equipment.
Operating system is responsible for properly issuing commands through respective driver program to those equipment as requested by user / or program prevent direct access to equipment by programs installed in the system because wrong commands can damage the equipment. Example Ask to move printer head by 18 inches when you only have 12 inch maximum for moving.
File System Management Another major task of operating system is to store and retrieve data in proper manner by employing appropriate file systems. User may ask to store data in a file by giving a name. It is operating system s responsibility to save the data properly in a disk. File systems have different techniques to save / retrieve the data belonging to a single file stored in a disk. There are several files systems which provide different kinds of facilities to manage data of files.
Many operating systems are designed to run top of a given file system with optimal performance. Facilities are provided by the operating system is to read and write from other file systems. Most common operations involved with file management are READ, WRITE, OPEN, CLOSE, ERASE, and SEARCH. Most commonly used file systems in operating systems are FAT, FAT32, NTFS, EXT2, EXT3, NFS, WINFS etc.
Protection and Security There can be several users working on same computer. There can be several computer programs running in parallel. There are situations where one user has more authority to work on computer (E.g. Installation of programs) while the other cannot alter any settings. There should be occasions where user must provide a password to access computer system. In all occasions it is necessary to identify who is the person issuing commands and check whether he / she / program is authorized to do that job.
This is a main task handled by operating system to prevent unauthorized modifications and access to data and programs installed in the computer. It also protects the access to certain system devices such as DVD Drives / printers. Operating systems can be configured in such a way that only certain users are allowed to perform Printing and CD/DVD writing operations. There can be multiple levels of protection and security mechanisms can be employed by operating systems to provide utmost security.
Commonly used Operating Systems Mainly operating systems designed for several different systems and operations. 1. Operating systems for Desktop / Laptop computing Mainly these operating systems are designed to manage the computer for a single user at a time. The scheduling and priority is for foreground programs. That is, the program that user currently works on gets the highest priority in CPU and memory allocation. These operating systems are designed for multipurpose activities from word processing to Graphic editing and 3D animations and try to achieve high performance.
2. Operating Systems for Servers (serving two to thousands of users) Several years of research work and monitoring has produced operating systems for servers. These operating systems are designed keeping security in mind. Ability to host multiple services and serve thousands of users with the highest level of robustness and performance are key functions in the server operating system. Stability is another priority as machines running these operating systems should run continuously for months without rebooting.
There are several self recovery techniques in server operating system for process crashes, service outages. Some facilities for remote management are also included in these operating systems. Support for multiple CPUs and higher memory capacity is another facility given in a server operating system. 3. Operating systems for Mobile Phones Mobile devices such as mobile phones, smart phones, PDAs have pretty low processing power, battery power and memory compared to computers. There are special operating systems designed for those devices to support limited input facility ( 12-16 key keypad).
Those operating systems should be able to support various handsets (Nokia, Motorola, Samsung, Sony Ericson and many others). Generally normal mobile phones, smart phones, PDAs, iphones are having its own operating system loaded by the vendor. The mostly used operating systems in mobile devices are Symbian, RIM, Windows Mobile, Apple OS for iphone, Android (open source). These operating systems should be working in a limited operating environment provided by mobile device and providing maximum functionalities to the user.
4. Operating systems for Embedded devices Operating systems for embedded devices are designed to do special operation using limited inputs by device sensors. Example Thermal reactor in a nuclear power generation facility has the sole task of reporting to a central place when the heat of nuclear reactor goes up and there by to trigger proper cooling mechanisms. These special operating systems have to be robust and guarantee up to 99.9999% correct operation. Today most of your kitchen appliances, refrigerators, televisions and many other types of electronic equipment come equipped with embedded systems having operating systems.
Following table will show the mostly used operating systems for last 10-15 years