Introduction Operating Systems
No. 2 Contents Definition of an Operating System (OS) Role of an Operating System History of Operating Systems Classification of Operating Systems Specific terms and concepts Structure of an OS
No. 3 The Definition of an OS A computer system consists of: User software System software Hardware User Applications CompilersEditorsShells Operating System System hardware
No. 4 Application Programs System Programs Software (Operating System) HARDWARE Operating system works as an interface between Hardware and software
No. 5 What is an OS? A system software A collection of procedures that: –manage all the system’s hardware resources –provide the users the environment in which they can: use the system resources run their own applications
No. 6 What is OS? Operating System is a software, which makes a computer to actually work. It is the software the enables all the programs we use. The OS organizes and controls the hardware. OS acts as an interface between the application programs and the machine hardware. Examples: Windows, Linux, Unix and Mac OS, etc.,
No. 7 What OS does? An operating system performs basic tasks such as, controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking and managing file systems.
No. 8 Operating System Objectives Convenience –Makes the computer more convenient to use Efficiency –Allows computer system resources to be used in an efficient manner Ability to evolve –Permit effective development, testing, and introduction of new system functions without interfering with service
No. 9 The Role of an OS Government The external or the user point of view A top-down perspective –Hides the complexity of using the hardware devices –Provides the user a more convenient view of the system resources –Purpose: Convenience Resource manager The inside or the designer point of view A bottom-up perspective –Brings the hardware resources in a functional state –Provides each program with time and space for using resources –Purpose: Efficiency Control Program
No. 10 Evolution of OS (contd..): Major PhasesOperating Systems Batch Processing Same type of jobs batch together and execute one at a time. Multi- programming executes number of programs simultaneously by a single processor. Timesharing Multiple jobs are executed by switching the CPU between them. (Contd…)
No. 11 Evolution of OS (contd..): Personal Computing Graphic user interfacesOS 6 (1972) Pilot system (1980) Distributed Systems Remote serversWFS file server (1979) Unix United RPC (1982) 24 Amoeba system (1990)
No. 12 Types of OS: Operating System can also be classified as,- Single User Systems Multi User Systems
No. 13 Single User Systems: Provides a platform for only one user at a time. They are popularly associated with Desk Top operating system which run on standalone systems where no user accounts are required. Example: DOS
No. 14 Single-user operating system - As the name implies, this operating system is designed to manage the computer so that one user can effectively do one thing at a time. Multi-user operating system - A multi-user operating system allows many different users to take advantage of the computer's resources simultaneously. Multiprocessor operating system - An operating system capable of supporting and utilizing more than one computer processor. Types of operating system:
No. 15 Multitasking operating system - An operating system that is capable of allowing multiple software processes to run at the same time. Multithreading operating system - Operating systems that allow different parts of a software program to run concurrently. Time sharing operating system - Time-sharing system can be classified as multi-user systems as they enable a multiple user access to a computer through the sharing of time. Types of operating system: (contd.)
No. 16 Specific Terms and Concepts Batch systems: no user interaction Spooling: Simultaneous peripheral operations online Multiprogramming: multiple programs loaded in memory Time-sharing: each process receives slices of CPU time Interactive systems : provides quick response to user’s actions Multi-user: distinction between users Distributed OS: looks like a traditional single-processor system Processes, Files, System Calls
No. 17 Services Provided by the Operating System Program development –Editors and debuggers Program execution Access to I/O devices Controlled access to files System access
No. 18 Services Provided by the Operating System Error detection and response –Internal and external hardware errors Memory error Device failure –Software errors Arithmetic overflow Access forbidden memory locations –Operating system cannot grant request of application
No. 19 Services Provided by the Operating System Accounting –Collect usage statistics –Monitor performance –Used to anticipate future enhancements –Used for billing purposes
No. 20 Multi processor Systems Use of two or more central processing units (CPUs) within a single computer system Ability of a system to support more than one processor and/or the ability to allocate tasks between them. Multitasking or Multiprogramming are implemented in software Multiprocessing is more appropriate to describe the use of multiple hardware CPUs. A system can be both multiprocessing and multiprogramming, only one of the two, or neither of the two of them.
No. 21 Multi processor Systems
No. 22 Advantages of Multiprocessor systems Reduced Cost: –Multiple processors share same resources instead of using separate power supply or mother board for each Increased reliability –The failure of one processor doesnot affec other processors though it will slow down the machine Increased throughput –Increase in number of processors complete the work in less time
No. 23 Types of Multiprocessor systems Symmetric Multiprocessing –SMP systems consist of two or more relatively independent processors or cores sharing a common bus and memory, each executing their own program or work together on same task Asymmetric Multiprocessing –Individual processors are dedicated to particular tasks –It has one MASTER processor and rests are SLAVE processors
No. 24 Distributed Systems Loosely coupled or distributed multiprocessor, or cluster –Each processor has its own memory and I/O channels Tightly coupled multiprocessing –Processors share main memory –Controlled by operating system Advantages of Distributed Systems –Resource sharing –Computation speedup –Reliability
No. 25 Common System Components Process Management Main Memory Management File Management I/O System Management Secondary Management Networking Protection System Command-Interpreter System
No. 26 Process Management A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task. The operating system is responsible for the following activities in connection with process management. –Process creation and deletion. –process suspension and resumption. –Provision of mechanisms for: process synchronization process communication
No. 27 Main-Memory Management Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and I/O devices. Main memory is a volatile storage device. It loses its contents in the case of system failure. The operating system is responsible for the following activities in connections with memory management: –Keep track of which parts of memory are currently being used and by whom. –Decide which processes to load when memory space becomes available. –Allocate and deallocate memory space as needed.
No. 28 File Management A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with file management: –File creation and deletion. –Directory creation and deletion. –Support of primitives for manipulating files and directories. –Mapping files onto secondary storage. –File backup on stable (nonvolatile) storage media.
No. 29 I/O System Management The I/O system consists of: –A buffer-caching system –A general device-driver interface –Drivers for specific hardware devices
No. 30 Secondary-Storage Management Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. The operating system is responsible for the following activities in connection with disk management: –Free space management –Storage allocation –Disk scheduling
No. 31 Networking (Distributed Systems) A distributed system is a collection processors that do not share memory or a clock. Each processor has its own local memory. The processors in the system are connected through a communication network. Communication takes place using a protocol. A distributed system provides user access to various system resources. Access to a shared resource allows: –Computation speed-up –Increased data availability –Enhanced reliability
No. 32 Protection System Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources. The protection mechanism must: –distinguish between authorized and unauthorized usage. –specify the controls to be imposed. –provide a means of enforcement.
No. 33 Command-Interpreter System Many commands are given to the operating system by control statements which deal with: –process creation and management –I/O handling –secondary-storage management –main-memory management –file-system access –protection –networking
No. 34 Command-Interpreter System (Cont.) The program that reads and interprets control statements is called variously: –command-line interpreter –shell (in UNIX) Its function is to get and execute the next command statement.
No. 35 Operating System Services Program execution – system capability to load a program into memory and to run it. I/O operations – since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O. File-system manipulation – program capability to read, write, create, and delete files. Communications – exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing. Error detection – ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in user programs.