OS1.pdf
Document Details
Uploaded by SaneElegy
Full Transcript
Presentation on Basics of Operating System Dr P S Patheja by Dr Pushpinder Singh Patheja 1 Agenda Typical Computer system OS Types Appreciate the evolution of OS Pr...
Presentation on Basics of Operating System Dr P S Patheja by Dr Pushpinder Singh Patheja 1 Agenda Typical Computer system OS Types Appreciate the evolution of OS Process Management Summary Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 2 Course Description : What is Operating System What are the functions of OS What are the major parameters that determines effectiveness of an Operating System. Level : Basic / Intermediate Prerequisites Basic idea about a computing system and familiarity with at least one OS This course does not cover Dr P S Patheja Technologies used to fabricate CPU, memory etc. Design and implementation of compilers, linkers, loaders etc. No particular OS whether at the command level or internals No particular protocol such as TCP/IP No day to day software Internet, Netscape etc. 17-Oct-21 Pushpinder Singh Patheja 3 Most Popular OS for PCs Windows (Series of OS from Microsoft) Windows 8/10 Windows Server 2012/2016 Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 4 Alternative to Windows OS for PCs Linux BSD macOS X Dr P S Patheja Cloud OS 17-Oct-21 Pushpinder Singh Patheja 5 Computer System Structure Computer system can be divided into four components: – Hardware – provides basic computing resources CPU, memory, I/O devices – Operating system Controls and coordinates use of hardware among various applications and users – Application programs – define the ways in which the system resources are used to solve the computing Dr P S Patheja problems of the users Word processors, compilers, web browsers, database systems, video games – Users People, machines, other computers 6 Four Components of a Computer System Dr P S Patheja 7 Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 8 Computer System Organization Computer-system operation – One or more CPUs, device controllers connect through common bus providing access to shared memory – Concurrent execution of CPUs and devices competing for memory cycles Dr P S Patheja 9 Harvard Architecture Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 10 Operating Systems – Definition OS is a program which acts as an interface between the user and the computer and provides an environment in which a user can execute programs. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 12 Two main Goals of OS Primary Goal of an Operating System is convenience for the user. Secondary Goal is Dr P S Patheja efficient operation of the computer system. 17-Oct-21 Pushpinder Singh Patheja 13 General Definition An OS is a program which acts as an interface between computer system users and the computer Application Programs hardware. It provides a user-friendly System Programs environment in which a user may easily develop and execute Operating System programs. Dr P S Patheja Otherwise, hardware knowledge Machine Language would be mandatory for computer programming. HARDWARE So, it can be said that an OS hides the complexity of hardware from uninterested users. 14 History of Operating Systems Dr P S Patheja Babbage’s analytical engine (designed in 1840’s by Charles Babbage, but cold not be constructed by him. An earlier and simpler version is constructed in 2002, in London ) http://www.computerhistory.org/babbage/ 17-Oct-21 Pushpinder Singh Patheja 16 OS Types Dr P S Patheja Batch processing One at a time use User comes to machine 17-Oct-21 Pushpinder Singh Patheja 17 Card Line Reader CPU Printer Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 18 Card Line Reader CPU Printer Card Magnetic Reader Tape To maintain speed with CPU we do OFF-Line Batch Dr P S Patheja Processing. Tapes are much faster Device is changed from Card Reader to Tape and ability to run program with different I/O devices is called Device Independence. 17-Oct-21 Pushpinder Singh Patheja 19 Card Line Reader CPU Printer Card Magnetic Reader Tape Magnetic Magnetic CPU Dr P S Patheja Tape Tape Magnetic Line Tape Printer 17-Oct-21 Pushpinder Singh Patheja 20 Buffering The main memory has an area called buffer that is used to store or hold the data temporarily that is being transmitted either between two devices or between a device or an application. Buffering is an act of storing data temporarily in the buffer. It attempts to keep CPU and I/O device busy for most of the time. Dr P S Patheja Buffer is of fixed size. Requires to be interrupted/Monitored by CPU. Mostly done by Magnetic tape and was sequential. 17-Oct-21 Pushpinder Singh Patheja 21 Spooling A larger buffer from Hard Disk Buffer Store the data through I/O operation Because I/O operation is slow and CPU operation is fast. Spooling can process data at remote sites. Spooling keep both CPU and I/O device to work at much higher rates. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 22 Multi programmed Batch O S or Multiprogramming: (Multiple programs residing in Memory.) Multiprogramming is the technique of running several programs at a time using timesharing. It allows computer to do several things at a time. MULTIPROGRAMMING CREATES LOGICAL PARALLELISM. OS selects job from the job pool and starts executing a job, when the job needs to wait for any I/O operations the CPU is switched to another job. Hence CPU is never Idle. Multiprogramming increases Resource utilization. Dr P S Patheja Number of programs actively competing for resources of Multiprogrammed computer system is called DEGREE OF Multiprogramming. (CPU can execute only one program BUT can service I/O needs of others at the same time.) 17-Oct-21 Pushpinder Singh Patheja 23 Multi Tasking or Time Sharing Systems or Interactive Computing: (Multiple programs sharing one CPU.) Multitasking is the logical extension of Multiprogramming. Here the switching between jobs occur so frequently that the user can interact with each program while it is running. Provide Direct communication between User & System. Job is Swapped in & out of Memory to the disk. Became popular after 1970s. Eg: Communication Satellite, Bank, etc Dr P S Patheja Single CPU = Multitasking Networking = Time Sharing 17-Oct-21 Pushpinder Singh Patheja 24 Multi Threading: (The ability of OS to execute different parts of the same program simultaneously.) Task – A Task can be understood as a single task or a process or program executing on a computer. A Task comprises of Its own memory address space in which the code and data of the task are stored System resources like files and devices Dr P S Patheja At least one thread which executes the code Thread – A thread is a single sequential flow of control within a program. A thread is a sequence of executing instructions that can run independently of other threads yet can directly share data with other threads. A Thread comprises of A processor state including current instruction pointer A stack to store current process state/data 17-Oct-21 Pushpinder Singh Patheja 26 Multithreading Extends the concept of multitasking into applications, so you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different tasks, but also among each thread within a task. Multithreading provides a way to have more than one thread executing in the same process while allowing every thread access to the same memory address space. This allows very fast communication among threads. Threads are also easier to create than processes since they don’t require a separate address space. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 27 Multithreading Extends the concept of multitasking into applications, so you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different tasks, but also among each thread within a task. Multithreading provides a way to have more than one thread executing in the same process while allowing every thread access to the same memory address space. This allows very fast communication among threads. Threads are also easier to create than processes since they don’t require a separate address space. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 28 Personnel Computer System: (As cost decreases computer was dedicated for Single User.) Card Reader were changed to Keyboard and Mouse. They are Micro Computers & appeared in 1970s Previously they were neither multi-user nor multi-tasking. CPU Utilization and File Protection may not be of Prime Concern. Personnel network was developed. Eg: Apple Macintosh, Windows/DOS, Unix/Linux etc. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 29 Parallel Systems or Multiprocessor Systems: (Till now One CPU, NOW MULTIPLE CPUs came into picture.) These Multiprocessors share Computer Bus, Clock, Memory & Peripheral devices. They are TIGHTLY COUPLED SYSTEMS. Increased Throughput. Increased Reliability (If One CPU is down then N-1 CPUs are available called Graceful Degradation / Fault Tolerance. 1) Symmetric Multiprocessing (SMP) 1) Each processor run identical OS 2) Many processor can run at once Dr P S Patheja 3) Most OS are SMP 2) Asymmetric Multiprocessing 1) Each processer is assigned a specific task. (May have master processor which allocate work to slave processor.) 2) Common in Extremely Large systems 3) Distributes the Computation among several physical processes. 17-Oct-21 Pushpinder Singh Patheja 30 Distributed System: Different computer of different types (Microprocessor, Mainframe, Work stations etc.) joined together. i.e. Different CPUs are connected by high speed busses/telephone line etc. Independently. Loosely coupled. Advantage: Resource sharing Computation Speedup / Load Sharing Reliability: If one fails then remaining sites are available. Communication: E-Mails etc. Requires Networking infrastructure. Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 31 Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 32 Real Time Systems: Where Large number of Events should be accepted & processed in short period of time. A RTOS (are-toss) must be able to process data as it comes in, typically without buffer delays and processing time requirements includes any OS delay are measured. Eg: Industrial control, Flight control, Fire Alarm, HDTV etc. RTOS are often required in small embedded OS packed in small micro-devices. Sensor bring data to Computer. Processed in restricted Time. Some RTOS are: LynxOS, OSE, QNX, RTLinux, VxWorks, Dr P S Patheja WindowsCE etc. Hard Real Time Systems Soft Real Time Systems 17-Oct-21 Pushpinder Singh Patheja 33 Clustered System: Two or more systems coupled together Eg Making Super Computer. Provide high reliability Handheld Systems: Computer Stored in your pocket. Dr P S Patheja Personal Digital Assistant (PDAs) Cellular Phones Issues: Limited Memory Slow Processors Small Display Screen. 17-Oct-21 Pushpinder Singh Patheja 34 PC + Internet Shared servers/ OS Types Internet Dedicated computing Web Server Mail Server Remote access Workstation Shared servers/ LAN Dedicated computing FS PS Remote access Time Sharing Shared resources Dr P S Patheja Remote access Batch processing Increasing Freedom from Co-location One at a time use Increasing Sharing & Distribution User comes to machine Increasing Personalization Increasing Ratio of Computers: Users 17-Oct-21 Pushpinder Singh Patheja 35 System Operation: Starting a Computer O S Structure: OS provide Environment to User/Programmer. Depends upon: 1. Service O S Provides 2. Interface it makes available to user and programmers. Dr P S Patheja 3. Disassembling system to components & then interconnection. 17-Oct-21 Pushpinder Singh Patheja 36 Computer System Components Humans Program Interface User Programs O.S. Interface O.S. Hardware Interface/ Privileged Instructions Disk/Tape/Memory Components of Computer System Common Operating System Components Process Management Main Memory Management File Management I/O System Management Secondary Management Networking Dr P S Patheja Protection System Command-Interpreter System 39 Process Management Process does nothing unless executed in CPU. A program in execution is PROCESS. Program is Passive and Process is Active. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task. Dr P S Patheja These resources are given before or at the time of execution. When process terminates, the OS reclaims reusable resources. A program has many processes for execution. 17-Oct-21 Pushpinder Singh Patheja 40 1. Process Management 2 Types of Process: 1. OS Processes (Executes System Call) 2. User Processes (Executes User Call) The operating system is responsible for the following activities in connection with process management. – Process creation and deletion. Dr P S Patheja – process suspension and resumption. – Provision of mechanisms for: process synchronization process communication deadlock handling 41 2. Main-Memory Management CPU addresses Main Memory Program is required to be mapped to Absolute Address. Memory is Array of Words/bytes having separate address. 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 Dr P S Patheja 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. 42 3. 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. Dr P S Patheja – Mapping files onto secondary storage. – File backup on stable (nonvolatile) storage media. 43 4. I/O System Management Some OS like UNIX, WINNT hide I/O devices in a sub system. The operating system is responsible for the following activities in connections with I/O management: – Memory management component including Buffering, Caching & Spooling. – Device Driver Interface – Drivers for specific hardware device. Dr P S Patheja Only device driver knows the peculiarities of the specific device to which it is assigned. 44 5. 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 Dr P S Patheja activities in connection with disk management: – Free space management – Storage allocation – Disk scheduling 45 6. Networking (Mainly for 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: Dr P S Patheja – Computation speed-up – Increased data availability – Enhanced reliability – Security 46 Protection System Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources (CPU, Memory, File system or other resources). The protection mechanism must: – distinguish between authorized and unauthorized usage. Dr P S Patheja – specify the controls to be imposed. – provide a means of enforcement. 47 Command-Interpreter System (Shell) Interface between User and OS. Eg. Command prompt is in Infinite Loop waiting for command to come. Many commands are given to the operating system by control statements which deal with: – process creation and management – I/O handling – secondary-storage management Dr P S Patheja – main-memory management – file-system access – protection – networking 48 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 Dr P S Patheja command statement. 49 OS Services 1. Program execution 2. Error Handling 3. Job Sequencing 4. Input/Output operations 5. Interrupt Handling 6. File system manipulation 7. Scheduling Dr P S Patheja 8. Resource allocation 9. Networking 10.Accounting of computer resources 11.Protection 17-Oct-21 Pushpinder Singh Patheja 50 Operating System Services Program execution – system capability to load a program into memory and to run it. Program will end either Normally or Abnormally. I/O operations – since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O. PROCESS REQUIRE I/O by FILES or I/O DEVICE. File-system manipulation – program capability to read, write, create, and delete files. Communications – exchange of information between Dr P S Patheja 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 (Parity error, Connection failure etc.), or in user programs (Arithmetic overflow, illegal memory access). 51 Common Functions of Interrupts Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines Interrupt architecture must save the address of the interrupted instruction A trap or exception is a software-generated Dr P S Patheja interrupt caused either by an error or a user request An operating system is interrupt driven 52 Interrupt Handling Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 53 Interrupt Handling Dr P S Patheja 17-Oct-21 Pushpinder Singh Patheja 54 Interrupt Handling The operating system preserves the state of the CPU by storing registers and the program counter Determines which type of interrupt has occurred: – polling Dr P S Patheja – vectored interrupt system Separate segments of code determine what action should be taken for each type of interrupt 55 Additional Operating System Services Additional functions exist not for helping the user, but rather for ensuring efficient system operations. Resource allocation – allocating resources to multiple users or multiple jobs running at the same time. Accounting – keep track of and record which users use how much and what kinds of computer Dr P S Patheja resources for account billing or for accumulating usage statistics. Protection – ensuring that all access to system resources is controlled. 56 System Calls System calls provide the interface between a running program (process) and the operating system. Interface between process and OS. (Command Interpreter was interface between OS and User) – Generally available as assembly-language instructions. – Languages defined to replace assembly language for systems programming allow system calls to be made directly (e.g., C, C++) Three general methods are used to pass parameters Dr P S Patheja between a running program and the operating system. – Pass parameters in registers. – Store the parameters in a table in memory, and the table address is passed as a parameter in a register. – Push (store) the parameters onto the stack by the program, and pop off the stack by operating system. 57 OS Software for the User/System Programs System programs provide a convenient environment for program development and execution. They can be divided into: 1. File manipulation (cd, rm, cat) 2. Status information (ls, ps, lpstat) 3. File modification (vi) 4. Programming language support (g++, gdb, gprof) 5. Program loading and execution (shell, exec) Dr P S Patheja 6. Communications (ssh, scp) 7. Application programs (netscape, mud) Most users’ views of the operation system are defined by system programs and not the system calls. 59 MS-DOS Execution (Single Program) Dr P S Patheja At System Start-up Running a Program 60 MS-DOS Execution UNIX Running (Single Program) Multiple Programs Dr P S Patheja At System Start-up Running a Program 61 MS-DOS System Structure MS-DOS – written to provide the most functionality in the least space – not divided into modules – Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated Dr P S Patheja 62 UNIX System Structure UNIX – limited by hardware functionality, the original UNIX operating system had limited structuring. The UNIX OS consists of two separable parts. 1. Systems programs 2. The kernel The kernel consists of everything below the system- Dr P S Patheja call interface and above the physical hardware Kernel provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level. 63 UNIX System Structure Dr P S Patheja 64 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. Eg. Layer 5 - User Program Dr P S Patheja Layer 4 - Buffering for I/O device Layer 3 - Operator Console Device Driver Layer 2 - Memory Management Layer 1 - CPU Scheduling Layer 0 - HARDWARE 65 Virtual Machines A virtual machine takes the layered 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. Dr P S Patheja The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory. 68 System Models Dr P S Patheja Non-virtual Machine Virtual Machine 69 Virtual Machines (Cont.) 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. Dr P S Patheja – A normal user time-sharing terminal serves as the virtual machine operator’s console. 71 Advantages/Disadvantages of Virtual Machines The virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. This isolation, however, permits no direct sharing of resources. A virtual-machine system is a perfect vehicle for operating-systems research and development. System development is done on the virtual machine, Dr P S Patheja instead of on a physical machine and so does not disrupt normal system operation. The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine. 72 Java Virtual Machine Compiled Java programs are platform-neutral bytecodes executed by a Java Virtual Machine (JVM). JVM consists of - class loader - class verifier - runtime interpreter Just-In-Time (JIT) compilers- Dr P S Patheja increase performance The JIT compiler compiles the bytecode of that method into native machine code, compiling it "just in time" to run. 73 System Implementation Once Designed the OS must be Implemented. Traditionally written in assembly language, operating systems can now be written in higher-level languages. Code written in a high-level language (HLL): 1. can be written faster. Disadvantage of HLL: 2. is more compact. 1. Reduced Speed Dr P S Patheja 3. is easier to understand 2. Increase Storage and debug. Requirement. An operating system is far easier to port (move to some other hardware) if it is written in a high-level language. 75 System Generation (SYSGEN) Operating systems are designed to run on any of a class of machines; the system must be configured or generated for each specific computer site. SYSGEN is a special program to generate a system. SYSGEN program obtains information concerning the specific configuration of the hardware system. Information to be determined are: What CPU is to be used, Dr P S Patheja How much memory is available, What devices are available, parameters of OS etc. Booting – starting a computer by loading the kernel. Bootstrap program – code stored in ROM that is able to locate the kernel, load it into memory, and start its execution. 76 Computing Environments - Traditional Stand-alone general purpose machines But blurred as most systems interconnect with others (i.e., the Internet) Portals provide web access to internal systems Network computers (thin clients) are like Web terminals Mobile computers interconnect via wireless Dr P S Patheja networks Networking becoming ubiquitous – even home systems use firewalls to protect home computers from Internet attacks 77 Computing Environments - Mobile Handheld smartphones, tablets, etc What is the functional difference between them and a “traditional” laptop? Extra feature – more OS features (GPS, gyroscope) Allows new types of apps like augmented reality Dr P S Patheja Use IEEE 802.11 wireless, or cellular data networks for connectivity Leaders are Apple iOS and Google Android 78 Computing Environments – Distributed Distributed Computing – Collection of separate, possibly heterogeneous, systems networked together Network is a communications path, TCP/IP most common – Local Area Network (LAN) – Wide Area Network (WAN) – Metropolitan Area Network (MAN) – Dr P S Patheja Personal Area Network (PAN) – Network Operating System provides features between systems across network Communication scheme allows systems to exchange messages Illusion of a single system 79 Computing Environments – Client-Server Client-Server Computing Dumb terminals supplanted by smart PCs Many systems now servers, responding to requests generated by clients Compute-server system provides an interface to client to request services (i.e., database) File-server system provides interface for clients to store and retrieve files Dr P S Patheja 80 Computing Environments - Peer-to-Peer Another model of distributed system P2P does not distinguish clients and servers – Instead all nodes are considered peers – May each act as client, server or both – Node must join P2P network Registers its service with central lookup service on network, or Dr P S Patheja Broadcast request for service and respond to requests for service via discovery protocol – Examples include Napster and Gnutella, Voice over IP (VoIP) such as Skype 81 Computing Environments - Virtualization Allows operating systems to run applications within other OSes – Vast and growing industry Emulation used when source CPU type different from target type (i.e. PowerPC to Intel x86) – Generally slowest method – When computer language not compiled to native code – Interpretation Dr P S Patheja Virtualization – OS natively compiled for CPU, running guest OSes also natively compiled – Consider VMware running WinXP guests, each running applications, all on native WinXP host OS – VMM (virtual machine Manager) provides virtualization services 82 Computing Environments - Virtualization Use cases involve laptops and desktops running multiple OSes for exploration or compatibility – Apple laptop running Mac OS X host, Windows as a guest – Developing apps for multiple OSes without having multiple systems – QA testing applications without having multiple systems – Executing and managing compute environments within Dr P S Patheja data centers VMM can run natively, in which case they are also the host – There is no general purpose host then (VMware ESX and Citrix XenServer) 83 Computing Environments - Virtualization Dr P S Patheja 84 Computing Environments – Cloud Computing Delivers computing, storage, even apps as a service across a network Logical extension of virtualization because it uses virtualization as the base for it functionality. – Amazon EC2 has thousands of servers, millions of virtual machines, petabytes of storage available across the Internet, pay based on usage Many types – Public cloud – available via Internet to anyone willing to pay – Private cloud – run by a company for the company’s own use – Hybrid cloud – includes both public and private cloud components Dr P S Patheja – Software as a Service (SaaS) – one or more applications available via the Internet (i.e., word processor) – Platform as a Service (PaaS) – software stack ready for application use via the Internet (i.e., a database server) – Infrastructure as a Service (IaaS) – servers or storage available over Internet (i.e., storage available for backup use) 85 Computing Environments – Cloud Computing Cloud computing environments composed of traditional OSes, plus VMMs, plus cloud management tools – Internet connectivity requires security like firewalls – Load balancers spread traffic across multiple applications Dr P S Patheja 86 Computing Environments – Real-Time Embedded Systems Real-time embedded systems most prevalent form of computers – Vary considerable, special purpose, limited purpose OS, real- time OS – Use expanding Many other special computing environments as well – Some have OSes, some perform tasks without an OS Real-time OS has well-defined fixed time constraints Dr P S Patheja – Processing must be done within constraint – Correct operation only if constraints met 87 Open-Source Operating Systems Operating systems made available in source-code format rather than just binary closed-source Counter to the copy protection and Digital Rights Management (DRM) movement Started by Free Software Foundation (FSF), which has “copyleft” GNU Public License (GPL) Examples include GNU/Linux and BSD UNIX (including Dr P S Patheja core of Mac OS X), and many more Can use VMM like VMware Player (Free on Windows), Virtualbox (open source and free on many platforms - http://www.virtualbox.com) – Use to run guest operating systems for exploration 88 Cooperating Processes Independent process cannot affect or be affected by the execution of another process Cooperating process can affect or be affected by the execution of another process Advantages of process cooperation – Information sharing – Computation speed-up – Modularity – Convenience 89 Scheduling Policy to decide which ready process is to be picked up next. Criteria which lets a particular policy to be chosen are the following: – CPU Utilisation : Percentage of CPU usage should be maximum. – Throughput : Maximum processes to be through per unit time. – Turnaround time : Time span between submission of a job till it gets completed executed should be less – Waiting time : Sum of all the individual times spent in the ready queue should be less – Response time : Time from submission of the request until the first response is produced. Mainly useful in an interactive environment and should be less. Dr P S Patheja How is it different from context switching? Context-switching + some more information = Scheduling. Context switching merely states that CPU makes a transition to another process. The question as which another process is decided by a policy and that is all about scheduling. 17-Oct-21 Pushpinder Singh Patheja 95 Operating systems : Next Step Resource Type Description Book Operating system concepts -Peterson and silberschatz - AWL Book An introduction to operating systems - Harvey M. Deitel - addison wesley Book Operating systems - concepts and design – Milan milenkovic - mcgraw-hill Book Modern operating systems - Andrew S. Tannenbaum - PHI Book Operating systems -Madnick and donovan - mcgraw-hill Book Unix internals : The new frontiers - Uresh vahalia - prentice hall 17-Oct-21 Pushpinder Singh Patheja 96