Advanced Operating Systems Application Software (contd…): Spreadsheets: The spreadsheet packages are designed to use numbers and formulas to do calculations with ease. Examples of spreadsheets include: Budgets Payrolls Grade Calculations Address Lists The most commonly used spreadsheet programs are Microsoft Excel and Lotus 123. Application Software (contd…): Graphic Presentations: The presentation programs can be easier using overhead projectors. Other uses include: Slide Shows Repeating Computer Presentations on a computer monitor Using Sound and animation in slide shows The most recognized graphic presentation programs are Microsoft PowerPoint and Harvard Graphics. Application Software (contd…): Database Management System (DBMS): A DBMS is a software tool that allows multiple users to store, access, and process data into useful information. Database programs are designed for these types of applications: Membership lists Student lists Grade reports Instructor schedules All of these have to be maintained so you can find what you need quickly and accurately. Example:Microsoft Access, dBASE, Oracle. Contents 1. 2. 3. 4. What is Operating System? What OS does? Structure of OS Evolution of OS Batch Processing, Multiprogramming, Time sharing systems 5. Operating System Functions 6. Main Functions of OS 7. Types of OS Single User, Multi User systems 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., 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. Structure of Operating System: Application Programs System Programs Software (Operating System) HARDWARE (Contd…) Structure of Operating System (Contd…): The structure of OS consists of 4 layers: 1. Hardware Hardware consists of CPU, Main memory, I/O Devices, etc, 2. Software (Operating System) Software includes process management routines, memory management routines, I/O control routines, file management routines. (Contd…) Structure of Operating System (Contd…): 3. System programs This layer consists of compilers, Assemblers, linker, Loaders etc. 4. Application programs This is dependent on users need. Ex. Railway reservation system, Bank database management etc., Evolution of OS: The evolution of operating systems went through seven major phases. Six of them significantly changed the ways in which users accessed computers through the open shop, batch processing, multiprogramming, timesharing, personal computing, and distributed systems. In the seventh phase the foundations of concurrent programming were developed and demonstrated in model operating systems. (Contd…) Evolution of OS (contd..): Major Phases Technical Innovations Operating Systems Open Shop The idea of OS IBM 701 open shop (1954) Batch Processing Tape batching, First-in, first-out scheduling. BKS system (1961) Multiprogramming Processor multiplexing, Indivisible operations, Demand paging, Input/output spooling, Priority scheduling, Remote job entry Atlas supervisor (1961), Exec II system (1966) (Contd…) Evolution of OS (contd..): Timesharing Simultaneous user interaction, On-line file systems Multics file system (1965), Unix (1974) Concurrent Programming Hierarchical systems, Extensible kernels, Parallel programming concepts, Secure parallel languages RC 4000 system (1969), 13 Venus system (1972), 14 Boss 2 system (1975). Personal Computing Distributed Systems Graphic user interfaces OS 6 (1972) Pilot system (1980) Remote servers WFS file server (1979) Unix United RPC (1982) 24 Amoeba system (1990) Batch Processing: In Batch processing same type of jobs batch (BATCH- a set of jobs with similar needs) together and execute at a time. The OS was simple, its major task was to transfer control from one job to the next. The job was submitted to the computer operator in form of punch cards. At some later time the output appeared. The OS was always resident in memory. (Ref. Fig. next slide) Common Input devices were card readers and tape drives. Batch Processing (Contd…): Common output devices were line printers, tape drives, and card punches. Users did not interact directly with the computer systems, but he prepared a job (comprising of the program, the data, & some control information). OS User program area Multiprogramming: Multiprogramming is a technique to execute number of programs simultaneously by a single processor. In Multiprogramming, number of processes reside in main memory at a time. The OS picks and begins to executes one of the jobs in the main memory. If any I/O wait happened in a process, then CPU switches from that job to another job. Hence CPU in not idle at any time. Multiprogramming (Contd…): OS Job 1 Job 2 Job 3 • Figure dipicts the layout of multiprogramming system. • The main memory consists of 5 jobs at a time, the CPU executes one by one. Advantages: Job 4 •Efficient memory utilization Job 5 •Throughput increases •CPU is never idle, so performance increases. Time Sharing Systems: Time sharing, or multitasking, is a logical extension of multiprogramming. Multiple jobs are executed by switching the CPU between them. In this, the CPU time is shared by different processes, so it is called as “Time sharing Systems”. Time slice is defined by the OS, for sharing CPU time between processes. Examples: Multics, Unix, etc., Operating Systems functions: The main functions of operating systems are: 1. Program creation 2. Program execution 3. Input/Output operations 4. Error detection 5. Resource allocation 6. Accounting 7. protection Types of OS: Operating System can also be classified as, Single User Systems Multi User Systems 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 Multi-User Systems: Provides regulated access for a number of users by maintaining a database of known users. Refers to computer systems that support two or more simultaneous users. Another term for multi-user is time sharing. Ex: All mainframes and are multi-user systems. Example: Unix Operating Systems Structures Structure/Organization/Layout of OSs: 1. 2. 3. 4. Monolithic (one unstructured program) Layered Microkernel Virtual Machines The role of Virtualization Monolithic Operating System A software system is called "monolithic" if it has a monolithic architecture, in which functionally distinguishable aspects (for example data input and output, data processing, error handling, and the user interface), are not architecturally separate components but are all interwoven. Mainframe computers used a monolithic architecture with considerable success. Monolithic architectures implemented on DOS and earlier Windows based PCs often worked poorly with multiple users. This performance degradation is mainly due to poor mechanisms for record locking and file handling across local area networks. Monolithic OS – basic structure Application programs that invokes the requested system services. A set of system services that carry out the operating system procedures/calls. A set of utility procedures that help the system services. MS-DOS System Structure MS-DOS – written to provide the most functionality in the least space: not divided into modules (monolithic). Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated. MS-DOS Layer Structure UNIX System Structure UNIX – limited by hardware functionality, the original UNIX OS had limited structuring. The UNIX OS consists of two separable parts: 1. 2. Systems Programs: The Kernel: Consists of everything below the system-call interface and above the physical hardware. Provides the file system, CPU scheduling, memory management, and other operatingsystem functions; a large number of functions for one level. Traditional UNIX System Structure LINUX Kernel Components Microkernel System Structure (1) Move as much functionality as possible from the kernel into “user” space. Only a few essential functions in the kernel: primitive memory management (address space) I/O and interrupt management Inter-Process Communication (IPC) basic scheduling Other OS services are provided by processes running in user mode (vertical servers): device drivers, file system, virtual memory… Microkernel System Structure (2) Communication takes place between user modules using message passing. More flexibility, extensibility, portability and reliability. But performance overhead caused by replacing service calls with message exchanges between processes. Microkernel Operating System Benefits of a Microkernel Organization (1) Extensibility/Reliability easier to extend a microkernel easier to port the operating system to new architectures more reliable (less code is running in kernel mode) more secure Portability changes needed to port the system to a new processor is done in the microkernel, not in the other services. Benefits of Microkernel Organization (2) Distributed system support message are sent without knowing what the target machine is. Object-oriented operating system components are objects with clearly defined interfaces that can be interconnected to form software. Layered Approach The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0) is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers. Layered Operating System General OS Layers Operating System Layers Structure of the THE operating system Virtual Machines History and Benefits First appeared commercially in IBM mainframes in 1972. Fundamentally, multiple protected execution environments (different operating systems) can share the same hardware. Protect from each other. Some sharing of file can be permitted, controlled. Commutate with each other, other physical systems via networking. Useful for development and testing. “Open Virtual Machine Format”, standard format of VMs, allows a VM to run within many different VM (host) platforms. The Role of Virtualization (a) (b) General organization between a program, interface, and system. General organization of virtualizing system A on top of system B. Virtual Machines (1) A Virtual Machine (VM) takes the layered and microkernel approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware. A virtual machine provides an interface identical to the underlying bare hardware. The operating system host creates the illusion that a process has its own processor and (virtual memory). Each guest provided with a (virtual) copy of underlying computer. Virtual Machines (2) The resources of the physical computer are shared to create the virtual machines: CPU scheduling can create the appearance that users have their own processor. Spooling and a file system can provide virtual card readers and virtual line printers. A normal user time-sharing terminal serves as the virtual machine operator’s console. VM Implementation on Host OS Architectures of Virtual Machines (1) There are interfaces at different levels. An interface between the hardware and software, consisting of machine instructions that can be invoked by any program. An interface between the hardware and software, consisting of machine instructions that can be invoked only by privileged programs, such as an operating system. Architectures of Virtual Machines (2) An interface consisting of system calls as offered by an operating system. An interface consisting of library calls: generally forming what is known as an Application Programming Interface (API). In many cases, the aforementioned system calls are hidden by an API. Architectures of Virtual Machines (3) Various interfaces offered by computer systems Process Virtual Machine (a) A process virtual machine, with multiple instances of (application, runtime) combinations. Java Virtual Machine Compiled Java programs are platform-neutral byte codes executed by a Java Virtual Machine (JVM). JVM consists of: - class loader - class verifier - runtime interpreter Just-In-Time (JIT) compilers increase performance. Advantages/Disadvantages of VMs The VM concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. This isolation permits no direct sharing of resources. A VM system is a perfect vehicle for OS research and development. System development is done on the virtual machine, instead of on a physical machine and so does not disrupt normal system operation. The VM concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine. Types of OS Distributed Operating System( chap 2) Multiprocessor Operating System(chap 3) Real-Time Operating System(chap 4) Database Operating System(chap 5) Mobile Operating System(chap 6) Why Advanced Operating Systems? Traditional Multitasking operating systems are most commonly used at the user end These conventional operating systems are unable to provide high-speed computing Multiprocessor systems and distributed systems have been adopted for performance reasons Enormously complex design issues Network Operating Systems Operating system, designed primarily to support workstations, personal computer that are connected on a local area network. A network operating system provides printer sharing, common file system and database sharing, application sharing, and the ability to manage a network name directory, security, and other housekeeping aspects of a network. Types of Advanced Operating Systems Can be categorized on the following basis Hardware Architecture Wide variety of high-speed architecture is available Multiprocessor systems Distributed Systems Offer great potential for speedup but also present great challenge to OS designers Application requirements Some applications require special Operating system support as requirement and for efficiency Database systems Real-time systems Multimedia systems Types of Advanced Operating Systems Advanced Operating Systems Architecture Driven Distributed Systems Multiprocessor systems Application Driven Database Systems Real-time Systems Distributed Operating Systems Operating systems for a network of autonomous computers connected by a communication network Distributed Operating System controls and manages the hardware and software resources of a DS Provides a view of a powerful computer system Users do not know the where the program is executed and the location of resources accessed Basic issues are same as traditional OS However, design is much more complex due to the lack of both shared memory and common clock and unpredictable communication delays Multiprocessor Operating System Multiprocessor system is a tightly coupled system where processors share an address space Consists of a set of processors that share a set of physical memory Multiprocessor OS controls and manages hardware and software resources Users view the system as a powerful uniprocessor system Process synchronization, task scheduling, memory management and protection and security become more complex as the Memory is shared by processors Database Operating System Databases place special requirements on OS It must support The concept of transaction Operations to store, retrieve and manipulate data efficiently Primitives for concurrency control And system failure recovery Should also have buffer management schemes for data retrieval and storage from secondary storage Concurrency control is one of the most challenging problems in the design of database operating systems Real-time Operating systems Systems where jobs have completion deadlines In soft real-time systems, jobs should be completed before its deadline . In hard real-time systems, jobs should be completed before its deadline to avert a disaster Jobs should be scheduled in such a way that a maximum number of jobs satisfy their deadlines Requirements can vary from application to application Mobile Operating System Design and capabilities of a Mobile OS (Operating System) is very different than a general purpose OS running on desktop machines: mobile devices have constraints and restrictions on their physical characteristic such as screen size, memory, processing power and etc. Scarce availability of battery power Limited amount of computing and communication capabilities 64 Thus, they need different types of operating systems depending on the capabilities they support. e.g. a PDA OS is different from a Smartphone OS. Operating System is a piece of software responsible for management of operations, control, coordinate the use of the hardware among the various application programs, and sharing the resources of a device. 65 Operating System Structure A mobile OS is a software platform on top of which other programs called application programs, can run on mobile devices such as PDA, cellular phones, Smartphone and etc. Applications OS Libraries Device Operating System Base, Kernel Low-Level Hardware, Manufacturer Device Drivers 66 Mobile Operating System There are many mobile operating systems. The followings demonstrate the most important ones: Java ME Platform Palm OS Symbian OS Linux OS Windows Mobile OS BlackBerry OS iPhone OS Google Android Platform 67