Operating System Course 1 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 2 Operating System Syllabus • • • • • • • • • • Chapter 1: Introducing Operating Systems. Chapter 2: Memory Management: Early Systems. Chapter 3: Memory Management: Virtual Memory. Chapter 4: Processor Management Chapter 5: Process Management Chapter 6: Concurrent Processes Chapter 7: Device Management Chapter 8: File Management Chapter 9: Network Organization Concepts Chapter 10: Management of Network Functions Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 3 Operating System Syllabus cont. • • • • • • Chapter 11: Security and Ethics Chapter 12: System Management Chapter 13: UNIX Operating System Chapter 14: MS-DOS Operating System Chapter 15: Windows Operating System Chapter 16: Linux Operating System Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 4 Chapter 1 Introducing Operating Systems Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 5 Learning Objectives After completing this chapter, you should be able to describe: • How operating systems have evolved through the decades • The basic role of an operating system • How operating system software manages its subsystems • The role of computer system hardware on the development of its operating system • How operations systems are adapted to serve batch, interactive, real-time, hybrid, and embedded systems • How operating systems designers envision their role and plan their work Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 6 Introduction • Operating systems o Manage computer system hardware and software • This text explores: o What they are o How they work o What they do o Why they do it • This chapter briefly describes: o The workings of operating systems Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 7 What is an Operating System? • Computer system o Software (programs) o Hardware (tangible machine/electronic components) • Operating system o Chief software component o Manages all hardware and all software and controls: • Every file, device, section of main memory, and moment of processing time • Who can use the system and how system is used Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 8 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 9 Operating System Software (1 of 5) • Includes four essential subsystem managers o Memory Manager o Processor Manager o Device Manager o File Manager • Each manager: o Works closely with other managers o Performs a unique role Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 10 Operating System Software (2 of 5) (figure 1.1) This pyramid represents an operating system on a stand-alone computer unconnected to a network. It shows the four subsystem managers and the User Interface. © Cengage Learning 2018 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 11 Operating System Software (3 of 5) • User Interface o Allows the user to issue commands to the operating system • Manager tasks o Monitor the system’s resources continuously o Enforce policies determining: • Who gets what, when, and how much o Allocate a resource (when appropriate) o Deallocate a resource (when appropriate) Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 12 Operating System Software (4 of 5) (figure 1.2) Each manager at the base of the pyramid takes responsibility for its own tasks while working harmoniously with every other manager. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 13 Operating System Software (5 of 5) • Network Manager o Coordinates the services required for multiple systems to work cohesively together • Shared network resources: memory space, processors, printers, databases, applications, etc. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 14 Main Memory Management (1 of 2) • In charge of main memory o Random access memory (RAM) • Requires constant flow of electricity to hold data • Responsibilities include: o Checking validity and legality of memory space request o Reallocating memory to make more useable space available o Deallocating memory to reclaim it o Protecting space in main memory occupied by operating system Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 15 Main Memory Management (2 of 2) • Read-only memory (ROM) o Another type of memory o Critical when computer is powered on o Holds firmware: programming code • When and how to load each piece of the operating system after the power is turned on o Non-volatile • Contents retained when the power is turned off Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 16 Processor Management • Allocation of Central Processing Unit (CPU) • Tracks process status o Program’s “instance of execution” • Comparable to a traffic controller o When a process is finished or maximum computation time expired • Processor Manager reclaims the CPU and allocates to next waiting process o Computer with multiple CPUs • More complex management Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 17 Device Management • In charge of connecting with every available device o Printers, ports, disk drives, etc. • Responsibilities include: o Choosing most efficient resource allocation method • Based on scheduling policy o Identifying each device uniquely o Starting device operation (when appropriate) o Monitoring device progress o Deallocating the device Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 18 File Management • In charge of tracking every file in the system o Data files, program files, compilers, application programs, etc. • Responsibilities include: o Enforcing user/program resource access restrictions • Uses predetermined access policies o Controlling user/program modification restrictions • Read-only, read-write, create, delete o Allocating space for a file on secondary storage • One large storage area or smaller linked pieces o Retrieving files efficiently Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 19 Network Management • Included in operating systems with networking capability • Authorizes users to share resources o Overall responsibility for every aspect of network connectivity • Devices, files, memory space, CPU capacity, etc. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 20 User Interface • Portion of the operating system o Direct interaction with users • Two primary types o Graphical user interface (GUI) • Input from pointing device • Menu options, desktops, and formats vary o Command line interface • Keyboard-typed commands that display on a monitor • Strict requirements for every command: typed accurately; correct syntax; combinations of commands assembled correctly Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 21 Cooperation Issues • No single manager performs tasks in isolation • Each element of an operating system o Performs individual tasks and o Harmoniously interacts with other managers • Incredible precision required for operating system to work smoothly • More complicated when networking is involved Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 22 Cloud Computing • Practice of using Internet-connected resources o Performing processing, storage, or other operations • Operating system maintains responsibility o Managing all local resources and coordinating data transfer to and from the cloud • Role of the operating system o Accessing resources o Managing the system efficiently Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 23 An Evolution of Computing Hardware (1 of 4) • Hardware: physical machine and electronic components Essential Aspects of computer system hardware: o Main memory (RAM) • Data/Instruction storage and execution o Central processing unit (CPU) • Controls interpretation and execution of instructions • Initiates or performs these operations: storage, data manipulation and input/output o Input/output devices (I/O devices) • All peripheral devices in the system: printers, disk drives, CD/DVD drives, keyboards, etc. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 24 An Evolution of Computing Hardware (2 of 4) • Computer classification o At one time: based on memory capacity • Current platforms Platform Operating System (table 1.1) Laptops, desktops Linux, Mac OS X, Unix, Windows Mainframe computers Linux, UNIX, Windows, IBM z/OS Supercomputers Linux, UNIX A brief list of platforms and a few of the operating systems designed to run on them, listed in alphabetical order. Telephones, tablets Android, iOS, Windows © Cengage Learning 2018 Workstations, servers Linux, Mac OS X Server, UNIX, Windows Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 25 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 26 Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 27 An Evolution of Computing Hardware (3 of 4) • Moore’s Law: Gordon Moore, 1965 o Each new processor chip compared to its predecessor • Twice as much capacity • Released within 18 to 24 months Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 28 An Evolution of Computing Hardware (4 of 4) (figure 1.9) Gordon Moore’s 1965 paper included the prediction that the number of transistors incorporated in a chip will approximately double every 24 months (Moore, 19 65). Courtesy of Intel Corporation. Number of components per integrated function for minimum cost per component extrapolated versus time. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 29 Types of Operating Systems (1 of 6) • Five categories o Batch o Interactive o Real-time o Hybrid o Embedded • Two distinguishing features o Response time o Method of data entry into the system Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 30 Types of Operating Systems (2 of 6) • Batch systems: jobs entered as a whole and in sequence o Input relied on punched cards or tape o Efficiency measured in throughput • Interactive systems: allow multiple jobs o Faster turnaround than batch systems o Slower than real-time systems o Introduced to provide fast turnaround when debugging programs o Complex algorithms: share processing power Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 31 Types of Operating Systems (3 of 6) • Hybrid systems o Combination of batch and interactive o Light interactive load • Accepts and runs batch programs in the background • Real-time systems o Reliability is critical o Used in time-critical environments • Spacecraft, airport traffic control, fly-by-wire aircraft, critical industrial processes, medical systems, etc. o Two types of real-time systems • Hard real-time systems: risk total system failure if the predicted time deadline is missed • Soft real-time systems: suffer performance degradation as a consequence of a missed deadline Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 32 Types of Operating Systems (4 of 6) • Network operating systems o Special class software o Network Operating System runs on a server and gives the server the capability to manage data, users, groups, security, applications, and other networking functions o Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD o Wireless networking capability • Standard feature in many computing devices: cell phones, tablets, and other handheld Web browsers Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 33 Types of Operating Systems (5 of 6) (figure 1.10) Example of a simple network. The server is connected by cable to the router and other devices connect wirelessly. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 34 Types of Operating Systems (6 of 6) • Embedded systems o Computers placed inside other products • Automobiles, digital music players, elevators, pacemakers, etc. o Adds features and capabilities o Operating system requirements • Perform specific set of programs • Non-interchangeable among systems • Small kernel and flexible function capabilities Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 35 Timeline of Operating Systems Development (1 of 9) • Evolution of operating systems: parallels evolution of computer hardware • 1940s o Computers operated by programmers presiding from the main console o Fixing a program error • 1) stop the processor • 2) read register contents • 3) make corrections in memory • 4) resume operations o Poor machine utilization • CPU processed data and performed calculations for fraction of available time o “Bug”: system not working correctly Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 36 Timeline of Operating Systems Development (2 of 9) (figure 1.11) Dr. Grace Hopper’s research journal included the first computer bug. Taped to the page are the remains of a moth that became trapped in the computer’s relays, causing the system to crash. [Photo © 2002 IEEE] Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 37 Timeline of Operating Systems Development (3 of 9) • 1950s o Two widely adopted improvements • Computer operators: humans hired to facilitate machine operation • Job scheduling: programs with similar requirements grouped together (batch) o Expensive time lags between CPU and I/O devices o Improvements to the CPU and the system • I/O devices (tape drives and disks): gradually became faster • Records blocked before retrieval or storage • Control unit placed between I/O and CPU as a buffer: reduced speed discrepancy Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 38 Timeline of Operating Systems Development (4 of 9) • 1960s o Faster CPUs o Speed caused problems with slower I/O devices o Multiprogramming: many programs loaded and sharing the CPU • Passive multiprogramming: interrupts • Active multiprogramming: time slicing • 1970s o Faster CPUs: caused problems with slower I/O devices o Main memory physical capacity limitations • Multiprogramming schemes: increase CPU use • Virtual memory system: solves physical limitation Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 39 Timeline of Operating Systems Development (5 of 9) • 1980s o More flexible hardware • Logical functions built on replaceable circuit boards o Operating system functions • Made part of the hardware (firmware) o Multiprocessing: more than one processor • Allowed parallel program execution o Evolution of personal computers and high-speed communications • Led to distributed processing/networked systems Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 40 Timeline of Operating Systems Development (6 of 9) • 1990s o Demand for Internet capability o Increased networking o Increased tighter security demands • Protect system assets from Internet threats o Multimedia applications • Demanded additional power, flexibility, device compatibility for most operating systems, etc. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 41 Timeline of Operating Systems Development (8 of 9) • 2000s o Need for improved flexibility, reliability, and speed o Virtual machines • Accommodated multiple operating systems that run at the same time and share resources • Required OS to have an intermediate manager • Oversee the access of each operating system to the server’s physical resources o Multicore processors: two to many cores • What capabilities does the operating system need for these processors? Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 42 Timeline of Operating Systems Development (9 of 9) • 2010s o Increased mobility and wireless connectivity • Proliferation of dual-core, quad-core, and other multicore CPUs o Multicore technology • Single chip equipped with two or more processor cores Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 43 Role of the Software Designer/Developer • Most common overall goal o Maximize use of the system’s resources (memory, processing, devices, and files) and minimize downtime • Factors included in developmental efforts o RAM resources o CPUs: number and type available o Peripheral devices: variety likely to be connected o Networking capability o Security requirements, etc. Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 44 Conclusion • Overall function of operating systems • Evolution of operating systems o Capable of running complex computers and computer systems • Operating system designer/developer o Chooses the policies that best match the system’s environment Mchoes/Flynn, Understanding Operating Systems, 8th Edition. © 2018 Cengage. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. 45