Operating System

0

Introduction

An operating system is a collection of programs that controls the over all operation of the computer system. Operating system controls and co-ordinates the use of the hardware among the various application programs for the various users. So it acts as an interface or platform between the user and the computer hardware. An operating system manages and coordinates the function performed by the computer hardware, including the CPU, input/output devices, secondary storage device, and communication and network equipment. Operating systems are the most important program that runs on a computer. Every general-purpose computer must have an operating system to run other programs. It perform basic task, such as recognizing input from keyboard, sending output to display units, keeping track of files and directories on the disks, and controlling peripheral devices such as disk drivers and printers. Without an operating system, no computer can be operated. When an application program runs, the OS also works with hand. Examples: MS-DOS, Windows 3.1, Windows 95, Windows 98, Windows 2000, Windows ME, Windows XP, UNIX, LINUX, MINIX, etc.

 

Organization of Operating System

Operating System has layer architecture i.e. each functionality creates one layer. The bottommost layer is the hardware. The heart of OS, which controls overall functionality of computer system, is called Kernel and remains always in the main-memory. Outside this layer is utility Software and applications. The uppermost layer consists of users.

 

IMPORTANCE OF OPERATING SYSTEM

Operating System is important because it-

  • Acts as an interface between user and computer hardware
  • Runs all the application programs, system software, games, etc
  • Controls overall operation of computer
  • Manages Files and Documents
  • Manages user requirements for programs, storage space and priority
  • Organize and control hardware and software
  • Initialize the hardware of the computer system
  • Provides the management, scheduling and interaction of tasks
  • Maintains the system and handle errors
  • Protect hardware, software & data from improper use.
  • Manages the use of main memory
  • Checks equipment malfunctions & displays error messages.

TYPES OF OPERATING SYSTEM

In general, operating systems are organized by the size, type, and purpose of the computer on which they run. Below is a basic list of the different types of operating systems.

 

(1) Single-User/PC Operating System

Single user operating system provides an environment where single user can work. All the resources of the system are available to the single user. Example: MS-DOS.

 

(2) Multi-User/Server Operating System

This type of OS can fulfill the need of a number of users. This system divides the total time into a number of time slices and schedules the tasks one after another in a given priority. Example: UNIX, LINUX, Windows 2000 Server etc.

 

(3) Multiprocessing Operating System

Multiprocessing is the ability of the computer to simultaneously execute several programs in multiple CPU. If two or more processors are present in a computer system & are sharing the same memory, in such case, two programs may be processed at the same time. Thus in multiprocessing, more than one processor (i.e. CPU) are involved.

Multiprocessing system is one in which more than one processor are linked together sharing main memory and other I/O devices. These processors can execute different independent program simultaneously. Example: MVS (Multiple Virtual Storage)

 

(4) Multitasking Operating System

Multitasking means being able to run more than one program simultaneously. For example, a user could be running a word processing package, printing a document, copying files to the floppy disk and backing up selected files to a tape unit. Each of these tasks the user is doing appears to be running at the same time. In multitasking, only single processor (i.e. CPU) is involved.

.

(6) Multithreading Operating System

A thread is a separate part of a process (program). A process can consist of several threads, each of which execute separately. Thus the operating system that supports multiple threads (sub-programs) within a single application is called as multithreading operating system. For example, one thread could handle screen refresh and drawing, another thread printing, another thread the mouse and keyboard.

 

(7) Embedded Operating System

Embedded systems run as computer but not generally thought as computer, such as TV set, microwave ovens and mobile phones. These often have some characteristics of real-time systems but also have size, memory, and power restrictions that make them special. Example: PalmOS and Windows CE (Consumer Electronics).

 

(8) Real-time Operating System

A computer is sometimes expected to control the operation of a physical system without human intervention. Due to variation of the physical system, the computer has to act instantaneously to correct the variations. Any delay in response from the computer would be disastrous. System software can be installed inside the computer to work instantaneously for critical jobs. This software is called real-time operating system and the process is called real-time processing.

Real time operating systems are on-line systems that respond to input immediately. These operating systems are designed for the purpose of controlling and monitoring external activities with time constraint. These systems are characterized by having time as a key parameter. If the action absolutely must occur at a certain moment, we have a hard real-time system. Another kind of real-time system is a soft real-time system, in which missing an occasional deadline is acceptable. Example: CCP (Communication Control Program) and BLMX (Broad Level Multitasking Executive)

 

(9) Smart Card Operating System

The smallest operating systems run on smart cards, which are credit card sized devices containing a CPU chip. They have very severe processing power and memory constraint. They can be general purpose or specific purpose.

 

(10) Network Operating System

The Network OS works under the client-server mechanism. Client-Server is a mechanism in which cooperation and intercommunication between various elements of network takes place and one machine (i.e. Server) “serves” others (i.e. Clients) for various functions. In a Network OS, the users are aware of the existence of multiple computers and can use the functionality of remote machines. Example: Novell Netware.

 

(11) Distributed Operating System

A distributed OS is one that appears to its user as a traditionally uni-processor system, even though it is actually composed of multiple processors or computers. It aim user feels like he is working in a terminal in front of him, but actually the work may take place in any machine in network.

 

(12) Online Processing Operating System

To get immediate respond from the computer for any request of the user, it is possible to share large volume of data in disk storage so that data can be retrieved fast. To retrieve data available in the disk immediately, system software has been designed & this software is called on-line operating system and the process is called online processing.

Example: In computerized banks, the accounts of all the customers are stored in disk using the on-line O.S. the account of any customer can be retrieved immediately from the disk.

 

FUNCTIONS OF OPERATING SYSTEM

 

(1) Process Management

A process (or job) is a program in execution. The main objective of the process management module of an operating system is to manage the processes submitted to the system in such a manner to minimize the idle time of the various processors (CPU, I/O processors, etc.) of the computer system.

In early system, the method of job execution was known as the manual loading mechanism; jobs are manually loaded one after another by the operator. Problem was that a lot of computer time was wasted since the computer remained idle while operator loaded and unloaded jobs and prepared the system for a new job.

(2) Memory Management

A memory management is a procedure for managing the various programs residing in memory. In order to execute a program, it must be loaded into memory. As the program executes, the CPU reads program instructions and data from memory by generating addresses of the allocated memory. When the program terminates, its memory space is declared free and the next program may be given the same memory area. Memory management technique is used by the multiprogramming operating system. There can be many programs loaded in the memory along with operating system. If there were programs larger than main memory of the computer, operating system uses free space of secondary memory (i.e. hard disk) which is termed as virtual memory. So a part of the program will reside in main memory and the other part will reside in secondary memory.

 

(3) File Management

The operating system manages the different files in the computer system. It provides following facilities.

􀂾 Maintain a mechanism of files and directories.

􀂾 Creation and deletion of files.

􀂾 Maintain authority over files by allowing different types of access permission and priority.

􀂾 Access to files for reading and writing

􀂾 Protect files against system failure

􀂾 Implements different types of efficient searching mechanism of files.

􀂾 Sharing of files between various users

 

(4) I/O Management

Computer systems include a wide variety of Input / Output devices. Such as printers, mouse, keyboard, hard disk etc. whose speed differs from each other. OS handles such different speed I/O devices. Operating system also manages the input to a computer system and output from a computer system. This applies to the flow of data among computers terminals and other devices such as printers. Application programs use the operating system to handle input and output devices as needed.

 

(5) Resource Allocation

There are various other resources in computer. They must be distributed efficiently between the programs without conflicts. For example program ‘A’ capture the tape drive and ask for CD-RW and program ‘B’ capture CD-RW drive and ask for tape drive. Then such situation creates “Deadlock”. OS avoids such condition and resources are efficiently distributed.

 

(6) Security

Another important function of OS is to provide security from unwanted intruders like human, viruses, etc. One of the major tasks of OS is to secure the data and program space of each job while loaded into the memory. Other security includes:

 

  1. User authentication: User identification must be checked by the system, before the user can actually use the facility.
  2. Access control: When a user passes the authentication phase and is allowed to use the computing facility, away is needed to prohibit the user from accessing those resource information that he/she is not authorized to access.
  3. Cryptography: Even if a user somehow manages to gain access to some information, which he/she is not authorized to access, away is needed to ensure that the user cannot make use of that information. This requirement is taken care by the cryptography mechanism.

 

(7) Interrupt handling

An interrupt is a signal generated or request raised by a source such as I/O devices. Interrupts are always given priority in computer system & occurs as soon as the device requires service. OS have one special program to serve the interrupts, Interrupt Service Routine, in which each hardware component is identified by its own Interrupt Request (IRQ) number like IRQ 1, IRQ 2 etc. When an interrupt is raised Interrupt Service Routine checks that interrupt request from where it occurred with the help of IRQ number and transfer to the processor.

 

(8) User Interface

With an operating system, we see and interact with a set of items on the screen what we called is user interface. There are mainly of two types of user interface:

  • Graphical User Interface (GUI):

Most current operating systems, including all versions of windows, Macintosh operating system, OS/2, LINUX, provides graphical user interface. Graphical user interface are so called because they use a mouse to point at graphical object on the screen. Some components of graphical user interface are: Desktop, Icons, task bar, start button, Menus, Dialog Box, etc.

  • Command Line User Interface (CUI):

It is also called as Character User Interface. Command-line user interface does not use the pointing devices rather it has an environment that use typewritten commands. Each and every command should be remembered to execute certain operations. For examples DOS use prompt to receive certain command that are composed of strings like ‘dir’, ‘copy’ etc.

 

(9) Interrupts Handling

Interrupts are hardware triggered signals which cause the CPU to stop what it is doing and jump to a special subroutine. Interrupts normally arrive from hardware devices, such as when the user presses a key on the keyboard, or the disk device has fetched some data from the disk. They can also be generated in software by errors like division by zero or illegal memory address. When the CPU receives an interrupt, it saves the contents of its registers on the hardware stack and jumps to a special routine which will determine the cause of the interrupt and respond to it appropriately.

 

Types of interrupts:

  • Arithmetic or logic errors: (internal interrupts): When the arithmetic and logic unit detect any error, it generates signal, which causes an interrupts e.g. overflow or underflow may cause an error signal or output may be requested to a non-existent device or attempt to divide by zero or illegal operation code.
  • Hardware Interrupts: Interrupt will be produced if the hardware of a computer develops a fault e.g. parity errors. The I/O control for each device and its associated hardware normally takes care of parity checking (to verify that data is transferred without corruption). If a parity error is detected, the kernel is notified by an interrupt; kernel determined the cause of the interrupt.
  • I/O interrupts: When an I/O device requires service; it generates signal or request (an interrupt occurs). Such type of interrupt is called as I/O interrupts.
  • External interrupt: Interrupts caused by events occurring outside the processor such as I/O, high voltage, power failure transferring data etc, are called external interrupt.
  • Software Interrupts: Interrupts caused by malfunctioning of the programs is known as software interrupts. Example: Divide by zero, illegal memory address etc.

 

MAJOR PC OPERATING SYSTEMS

(1) UNIX

  1. UNIX is older than all the other PC OS and in many ways it served as a model for them.
  2. UNIX is a multitasking and multi-user OS developed by Bell Lab in 1969.
  3. UNIX also supports multiprocessor systems.
  4. UNIX was designed for engineers and programmers and is very strong and powerful OS for them. But for non-technical persons, it is an extremely difficult OS.
  5. It runs on mini, mainframe, super computers and notebook

 

(2) DOS

  1. DOS is popular in two flavor: Microsoft’s MS-DOS (Microsoft Disk Operating System) and IBM’s PCDOS (Personal Computer Disk Operating System)
  2. MS-DOS is a single user operating system developed in 1981 by Microsoft Company, USA.
  3. MS-DOS does not take large amount of memory.
  4. It works on Command Line interface (CLI) or Character User Interface (CUI).
  5. Most users needed to learn only small set of commands.
  6. DOS itself does not support multitasking, multi-user and multiprocessor.
  7. MS-DOS file names are limited to eight characters.
  8. Hardware is difficult to install and configure under DOS.

 

(3) OS/2

  1. Single user, multitasking, GUI based OS used for 32-bit micro-computer
  2. Especially designed for 80286 and 80386 processors
  3. It includes all basic MS DOS commands and some new commands to support multitasking.
  4. OS/2 provided networking support, true multitasking and multi-user support.
  5. OS/2 became the first OS to provide built-in speech recognition technology.
  6. It could run on a wide range of hardware platforms, from PCs to multiprocessor systems with up o 64 processors.

 

(4) Mac OS

  1. It is an operating system for apple computers.
  2. It has first truly graphical user interface for consumers.
  3. Mac OS was ahead of Windows with many other features, such as built-in network support and Plug and Play hardware support.
  4. It supports multitasking OS.
  5. It can handle up to 128KB memory.
  6. The file name under Apple DOS may have up to 64 characters long with both upper and lower case letters.
  7. The main drawback of this OS was it works only on Mac Computers and compatible hardware.

 

 

(5) Windows 3.x

  1. First came in mid-1980s with popularity of Mac GUI OS.
  2. Initially it is a GUI that runs on top of DOS. Windows was not originally an OS but an operating environment.
  3. Windows 3.0 release in 1990 was first successful version; prior two versions did not sell very well.
  4. Windows 3.0 was succeeded in providing a GUI.
  5. It has capability to load more than one program into memory at a time.
  6. Users could also run their old DOS programs under Windows, either in full-screen mode or within a window.
  7. During the early 1990s, Windows 3.0, Windows 3.1 and Windows 3.11(called Windows for

Workgroups) became the market leaders.

  1. Can access 1MB of memory
  2. Plug and Play capabilities were not introduced.
  3. The system was not reliable and Windows users frequently lost data to crashes.
  4. Windows for Workgroup was network enabled (two computers running Windows for Workgroups could be networked together without the need to purchase a separate network OS)

 

(6) Windows 95 and 98

  1. In 1995, Microsoft released Windows 95, a complete OS and a successor to DOS for desktop computers.
  2. Windows 95 is a 32-bit, preemptive multitasking operating system with a revised GUI.
  3. Offers Plug and Play standard for connecting new hardware.
  4. Windows 98 offer all the features of Windows 95 along with the Internet Explorer Web browser
  5. Windows 98 also adds support for new and emerging technologies and expands other hardware support including USB devices, DVD.
  6. Windows 98 provide feature called windows Update that enables Windows to connect to Microsoft

periodically via Internet to update OS.

 

(7) Windows NT Server

  1. Incorporates all the features of Windows NT Workstation but also has other capabilities.
  2. Designed as file and print servers
  3. Offers expanded security features for grouping and authenticating users and controlling their access to network resources.
  4. Support RAID (Redundant Array of Independent Disks) for disk duplexing, disk striping and disk mirroring.

 

(8) Windows 2000

Windows 2000 combines the user-friendly interface and features of Windows 98 with the file system, networking, power and stability of Windows NT. Different versions of Windows 2000 are available:

􀂾 Professional: This version is found primarily on office PCs. it includes support for symmetric

multiprocessing (SMP) with up to two processors. SMP is a protocol that allows the OS and applications to run on multiple processors at the same time, improving performance on huge jobs.

􀂾 Server: This version is for a network server for the average business, with SMP support for up to two processors.

 

(9) Linux

Between the release of Windows 95 and Windows 98, the computer world’s attention focused on another new operating system, called Linux. Initial idea was of Linus Torvalds, student at the University of Helsinki in 1991, who decided to name new OS as Linux, a combination of his name and UNIX. Some of the features of Linux are:

  1. Native Linux is driven by a command-line interface, but a windows-based GUI is also available.
  2. Linux is a multitasking, multi-user operating system.
  3. It includes most of the commands of UNIX.
  4. It runs on widely available IBM PCs, DEC’s Alpha processors SUN’s SPARC processor, PowerMac computers etc.
  5. Popular among ISP as low-cost server platform

 

SOME TERMS IN OPERATING SYSTEM

(1) Virtual Memory

Virtual memory is a sophisticated and powerful technique used to open programs larger than the main memory of the computer system using the free spaces of auxiliary storage. It is a way of making the physical memory of a computer system effectively larger than it really is. The system does this by determining which parts of its memory are often sitting idle, and then makes a command decision to empty their contents onto a disk, thereby freeing up useful RAM. More often programs are large and contain sections of code which are visited rarely if ever at all by the majority of users – so if they are not used, why keep them in RAM?

It is not necessary to have the entire program in primary storage at a time only the part on which the computer is working is needed. For this, O/S divided a program into pages. Only those pages, which are required at a particular time, are kept in main memory. The remaining pages are stored on the secondary online storage. The remaining pages can be loaded in the main memory immediately if they were required. Hence the secondary storage where the remaining pages are stored act as a main memory. This area of secondary storage is called as virtual memory.

 

Role of Virtual Memory:

(a) Portability: programs work regardless of how much actual memory present

(b) Convenience: programmer can use e.g. large sparse data structures with impunity

(c) Efficiency: no need to waste (real) memory on code or data which isn’t used.

 

(2) Kernel

Kernel is the heart of the operating system and remains in the main memory. It is the core of a multitasking operating system that deals with the basic system resources. The kernel drives physical devices and handles I/O, memory management and process scheduling.

 

(3) Spooling

The full form of SPOOL is Simultaneous Peripheral Operation On-Line. Spooling is a way of processing data serially. Print jobs are spooled to the printer, because they must be printed in the right order (it would not help the user if the lines of his file were liberally mixed together with parts of someone else file). During a spooling operation, only one job is performed at a time and other jobs wait in a queue to be processed.

 

(4)Buffering

A buffer is simply an area of memory which works as a waiting area. Buffers are therefore needed to store incoming or outgoing information temporarily, while it is waiting to be picked up by the other parts. It is a first-in first-out (FIFO) data structure or queue.

 

(5) Context Switching

When the processor is switched from one process to another, the state (processor registers and associated data) must be saved, because at some later date the process will be restarted and continue as though it was never interrupted. Once this state has been saved, the next waiting process is activated. This involves loading the processor registers and memory with all the previously saved data and restarting it at the instruction that was to be executed when it was last interrupted. The process of switching from one process to another is called context switching.

 

(6) Paging

Most virtual systems use a technique called paging. In paging, primary memory is partitioned into same size called page. Instead of loading entire job at once, few pages are loaded into the page-frame of memory. After the execution of such pages, they are kept back into secondary storage and remaining part is again loaded in main memory. User programs and utility software may not occupy the main memory all the time. They are brought from the secondary memory (e.g. hard disk) to the primary memory whenever required. Since, the program size is growing all the time, so it is not possible to load all the programs into the memory. Those parts of the program which are currently running are brought into the main memory and when the execution is finished, other part of the same program is again brought into the main memory. This process is known as paging.

 

(7) CPU Scheduling

On most multitasking systems, only one process can truly be active at a time – the system must therefore share its time between the executions of many processes. This sharing is called scheduling. (Scheduling = time management.) Different methods of scheduling are appropriate for different kinds of execution. A queue is one form of scheduling in which each program waits its turn and is executed serially. This is not very useful for handling multitasking, but it is necessary for scheduling devices which cannot be shared by nature. An example of the latter is the printer. Each print job has to be completed before the next one can begin; otherwise all the print jobs would be mixed up and interleaved resulting in nonsense.

 

 (8) Process

From a user’s point of view, the operating system executes the programs: on batch system (here, program is called jobs), on interactive system (here, program is called processes). But Process doesn’t mean Program; a program is static, while a process is dynamic. In fact, a process is a program in execution. A process in a computer system may be in one of a number of different possible states, such as-

  • Ready – it can run when the processor becomes free
  • Running – it currently has the processor
  • Blocked – it cannot run because the processor is busy

(9) Threads

A thread is a separate part of a process. A process can consist of several threads, each of which execute separately. For example, one thread could handle screen refresh and drawing, another thread printing, another thread the mouse and keyboard.

 

(10) Batch Processing

It is the earliest type of data processing mechanism which allowed only one program to run at a time. The program was entered into the computer, then run till completed. The data used by the program could not be modified while the program was running. Any errors in the program or data mean starting all over again.

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here