7.1 7 Operating Systems Foundations of Computer Science  Cengage Learning.

Slides:



Advertisements
Similar presentations
7 Operating Systems Foundations of Computer Science ã Cengage Learning.
Advertisements

Maninder Kaur OPERATING SYSTEM Maninder Kaur 11 Oct 2010.
2 © 2004, Cisco Systems, Inc. All rights reserved. IT Essentials I v. 3 Module 4 Operating System Fundamentals.
What You Will Learn Components of a computer’s system software The importance of an operating system Functions of an operating system Types of user interfaces.
Operating Systems: Software in the Background
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
©Brooks/Cole, 2003 Chapter 7 Operating Systems. ©Brooks/Cole, 2003 Define the purpose and functions of an operating system. Understand the components.
Understanding Operating Systems 1 Overview Introduction Operating System Components Machine Hardware Types of Operating Systems Brief History of Operating.
Chapter 11 Operating Systems
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
Xuan Guo Chapter 1 What is UNIX? Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003 Original Notes.
1 DOS with Windows 3.1 and 3.11 Operating Environments n Designed to allow applications to have a graphical interface DOS runs in the background as the.
Operating System.
Chapter 3  Manage the computer’s resources ◦ CPU ◦ Memory ◦ Disk drives ◦ Printers  Establish a user interface  Execute and provide services for applications.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
System Software System software deals with the physical complexities of how the hardware works. System software generally consists of four kinds of programs:
Operating systems CHAPTER 7.
UNIX Unbounded 5 th Edition Amir Afzal Chapter 1 First Things First.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
Operating Systems CS3502 Fall 2014 Dr. Jose M. Garrido
 What is OS? What is OS?  What OS does? What OS does?  Structure of Operating System: Structure of Operating System:  Evolution of OS Evolution of.
Operating Systems.
 Introduction to Operating System Introduction to Operating System  Types Of An Operating System Types Of An Operating System  Single User Single User.
The Operating Systems Layer
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
©Brooks/Cole, 2003 Chapter 7 Operating Systems. ©Brooks/Cole, 2003 Define the purpose and functions of an operating system. Understand the components.
SYSTEM SOFTWARE Prepared by: Mrs. Careene McCallum-Rodney.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
OPERATING SYSTEMS UNIT – I R.SOUJANYA IT Dept. UNIT I Computer System and Operating System Overview Chapter 1: IntroductionIntroduction Overview of Computer.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
* Property of STI Page 1 of 18 Software: Systems and Applications Basic Computer Concepts Software  Software: can be divided into:  systems software.
OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
Computers & Operating Systems
Operating Systems Objective n The historic background n What the OS means? n Characteristics and types of OS n General Concept of Computer System.
An operating system is the software that makes everything in the computer work together smoothly and efficiently. What is an Operating System?
CPSC 171 Introduction to Computer Science System Software and Virtual Machines.
© Paradigm Publishing, Inc. 4-1 Chapter 4 System Software Chapter 4 System Software.
Department of Computer Science Operating Systems OPS621S Semester 2.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 OS 1.
Operating Systems.
©Brooks/Cole, 2003 Chapter 7 Operating Systems 作業系統 ( 電腦的管家婆 )
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Chapter 7 Operating Systems Foundations of Computer Science  Cengage Learning 1.
An operating system (OS) is a collection of system programs that together control the operation of a computer system.
7.1 Operating Systems. 7.2 A computer is a system composed of two major components: hardware and software. Computer hardware is the physical equipment.
Operating System. What is Operating System OS is system software, which may be viewed as collection of software consisting of procedures for operating.
©Brooks/Cole, 2003 Chapter 7 Operating Systems. ©Brooks/Cole, 2003 Define the purpose and functions of an operating system. Understand the components.
Operating System (Reference : OS[Silberschatz] + Norton 6e book slides)
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH (7) Operating System CPIT 201 Introduction.
CT101: Computing Systems Introduction to Operating Systems.
Operating System.
Chapter 7 Operating Systems.
Introduction to Operating System (OS)
Virtual Memory Networks and Communication Department.
7 Operating system Foundations of Computer Science ã Cengage Learning.
Operating systems Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department.
Operating Systems.
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Operating System Overview
Lecture Topics: 11/1 Hand back midterms
Presentation transcript:

7.1 7 Operating Systems Foundations of Computer Science  Cengage Learning

7.2  Understand the role of the operating system.  Understand the process of bootstrapping to load the operating system into memory.  List the components of an operating system.  Discuss the role of the memory manager.  Discuss the role of the process manager.  Discuss the role of the device manager.  Discuss the role of the file manager in an operating system.  Understand the main features of three common operating systems: UNIX, Linux and Windows NT.Objectives After studying this chapter, the student should be able to:

7.3 A computer is a system composed of two major components: hardware and software. Computer hardware is the physical equipment. Software is the collection of programs that allows the hardware to do its job. Computer software is divided into two broad categories: the operating system and application programs (Figure 7.1). Application programs use the computer hardware to solve users’ problems. The operating system, on the other hand, controls the access to hardware by users.

7.4 Figure 7.1 A computer system

INTRODUCTION An operating system is complex, so it is difficult to give a simple universal definition. Instead, here are some common definitions:  An operating system is an interface between the hardware of a computer and the user (programs or humans).  An operating system is a program (or a set of programs) that facilitates the execution of other programs.  An operating system acts as a general manager supervising the activity of each component in the computer system.

7.6 An operating system is an interface between the hardware of a computer and the user (programs or humans) that facilitates the execution of other programs and the access to hardware and software resources. i Two major design goals of an operating system are: ❑ Efficient use of hardware. ❑ Ease of use of resources.

7.7 Bootstrap process The operating system, based on the above definitions, provides supports for other programs. For example, it is responsible for loading other programs into memory for execution. However, the operating system itself is a program that needs to be loaded into the memory and be run. How is this dilemma solved? The solution is a two-stage process. A very small section of memory is made of ROM and holds a small program called the bootstrap program. When the computer is turned on, the CPU counter is set to the first instruction of this bootstrap program and executes the instructions in this program. When loading is done, the program counter is set to the first instruction of the operating system in RAM.

7.8 Figure 7.2 The bootstrap process

EVOLUTION Operating systems have gone through a long history of evolution, which we summarize here. Batch systems Batch operating systems were designed in the 1950s to control mainframe computers. At that time, computers were large machines that used punched cards for input, line printers for output and tape drives for secondary storage media. Each program to be executed was called a job. A programmer who wished to execute a job sends a request to the operating system.

7.10 Time-sharing systems To use computer system resources efficiently, multiprogramming was introduced. The idea is to hold several jobs in memory at a time, and only assign a resource to a job that needs it on the condition that the resource is available. Multiprogramming brought the idea of time sharing: resources could be shared between different jobs, with each job being allocated a portion of time to use a resource. Because a computer is much faster than a human, time sharing is hidden from the user—each user has the impression that the whole system is serving them exclusively.

7.11 Personal systems When personal computers were introduced, there was a need for an operating system for this new type of computer. During this era, single-user operating systems such as DOS (Disk Operating System) were introduced. Parallel systems The need for more speed and efficiency led to the design of parallel systems: multiple CPUs on the same machine. Each CPU can be used to serve one program or a part of a program, which means that many tasks can be accomplished in parallel instead of serially. The operating systems required for this are more complex than those that support single CPUs.

7.12 Distributed systems Networking and internetworking, as we saw in Chapter 6, have created a new dimension in operating systems. A job that was previously done on one computer can now be shared between computers that may be thousands of miles apart. Distributed systems combine features of the previous generation with new duties such as controlling security. Real-time systems A real-time system is expected to do a task within a specific time constraint. They are used with real-time applications, which monitor, respond to or control external processes or environments.

COMPONENTS Today’s operating systems are very complex. An operating system needs to manage different resources in a computer system. It resembles an organization with several managers at the top level. Each manager is responsible for managing their department, but also needs to cooperate with others and coordinate activities. A modern operating system has at least four duties: memory manager, process manager, device manager and file manager.

7.14 Figure 7.3 Components of an operating system

7.15 User interface Each operating system has a user interface, a program that accepts requests from users (processes) and interprets them for the rest of the operating system. A user interface in some operating systems, such as UNIX, is called a shell. In others, it is called a window to denote that it is menu driven and has a GUI (graphical user interface) component.

7.16 Memory manager One of the responsibilities of a modern computer system is memory management. Although the memory size of computers has increased tremendously in recent years, so has the size of the programs and data to be processed. Memory allocation must be managed to prevent applications from running out of memory. Operating systems can be divided into two broad categories of memory management: monoprogramming and multiprogramming.

7.17 Monoprogramming In monoprogramming, most of the memory capacity is dedicated to a single program; only a small part is needed to hold the operating system. In this configuration, the whole program is in memory for execution. When the program finishes running, the program area is occupied by another program. Figure 7.4 Monoprogramming

7.18 Multiprogramming In multiprogramming, more than one program is in memory at the same time, and they are executed concurrently, with the CPU switching rapidly between the programs. Figure 7.5 Multiprogramming

7.19 Nonswapping The program remains in memory for the duration of execution swapping During execution, the program can be swapped between memory and disk one or more times.

7.20 Figure 7.6 Categories of multiprogramming

7.21 Figure 7.7 Partitioning

7.22 Figure 7.8 Paging

7.23 Figure 7.9 Demand paging

7.24 Figure 7.10 Demand segmentation

7.25 Virtual memory Demand paging and demand segmentation mean that, when a program is being executed, part of the program is in memory and part is on disk. This means that, for example, a memory size of 10 MB can execute 10 programs, each of size 3 MB, for a total of 30 MB. At any moment, 10 MB of the 10 programs are in memory and 20 MB are on disk. There is therefore an actual memory size of 10 MB, but a virtual memory size of 30 MB. Figure 7.11 shows the concept. Virtual memory, which implies demand paging, demand segmentation or both, is used in almost all operating systems today.

7.26 Figure 7.11 Virtual memory

7.27 Process manager A second function of an operating system is process management, but before discussing this concept, we need to define some terms. Program, job, and process  A program is a non-active set of instructions stored on disk.  A program becomes a job from the moment it is selected for execution until it has finished running and becomes a program again.  A process is a program in execution. It is a program that has started but has not finished.

7.28 State diagrams The relationship between a program, a job and a process becomes clearer if we consider how a program becomes a job and how a job becomes a process. This can be illustrated with a state diagram that shows the different states of each of these entities.

7.29 Figure 7.12 State diagram with boundaries between program, job and process

7.30 Schedulers To move a job or process from one state to another, the process manager uses two schedulers: the job scheduler and the process scheduler. Figure 7.13 Job scheduler

7.31 Figure 7.14 Process scheduler

7.32 Queuing Our state diagram shows one job or process moving from one state to another. In reality, there are many jobs and many processes competing with each other for computer resources. To handle multiple processes and jobs, the process manager uses queues (waiting lists). A job control block or process control block is associated with each job or process. This is a block of memory that stores information about that job or process. The process manager stores the job or process control block in the queues instead of the job or process itself.

7.33 Figure 7.15 Queues for process management

7.34 Process synchronization The whole idea behind process management is to synchronize different processes with different resources. Whenever resources can be used by more than one user (or process, in this case), we can have two problematic situations: deadlock and starvation.

7.35 Figure 7.16 Deadlock Deadlock occurs when the operating system does not put resource restrictions on processes. i

7.36 Figure 7.17 Deadlock on a bridge

7.37 Deadlock doesn’t always occur. There are four necessary conditions for deadlock as shown below: Mutual exclusion. only one process can hold a resource. Resource holding. a process hold a resource even through it cannot use it until other resources are available. No preemption. The operating system cannot temprarily reallocate a resource. Circular waiting. All process and resources involved from a loop, as Figure 7.16.

7.38 Figure 7.18 Starvation

7.39 Figure 7.19 The dining philosophers problem Starvation is the opposite of deadlock. It can happen when the operating system puts too many resource restrictions on a process. i

7.40 Device manager The device manager, or input/output manager, is responsible for access to input/ output devices. There are limitations on the number and speed of input/output devices in a computer system.  The device manager monitors every input/output device constantly to ensure that the device is functioning properly.  The device manager maintains a queue for each input/output device or one or more queues for similar input/output devices.  The device manager controls the different policies for accessing input/output devices.

7.41 File manager Operating systems today use a file manager to control access to files. A detailed discussion of the file manager also requires advanced knowledge of operating system principles and file access concepts that are beyond the scope of this book. The file manager:  controls access to files.  supervises the creation, deletion, and modification of files.  controls the naming of files.  supervises the storage of files.  is responsible for archiving and backups.

A SURVEY OF OPERATING SYSTEMS In this section we introduce some popular operating systems and encourage you to study them further. We have chosen three operating systems that are familiar to most computer users: UNIX, Linux and Windows.

7.43 UNIX UNIX was originally developed in 1969 by Thomson and Ritchie of the Computer Science Research Group at Bell Laboratories. UNIX has gone through many versions since then. It has been a popular operating system among computer programmers and computer scientists. UNIX is a multiuser, multiprocessing, portable operating system. It is designed to facilitate programming, text processing and communication. i

7.44 UNIX Components The kernel It is the heart of the system and it contains the most basic parts of the operating system: memory management, process management, device management and file management. All other components of the system call on the kernel to perform these services for them. The shell It is the part that is most visible to the user. It recieves and interprets the command entered by the user. To do anything in the system, we must give the shell a command the the shell request the kernel to perform it.

7.45 Utilities There are hundred of UNIX utilities. A utility is a standard UNIX program that provides a support process for users. Three common utilities are text editors, search programs, and sort programs. Applications They are programs that are not a standards part of the operating system distribution. Written by systems administrators, professional programmers or users, they provide extended capabilities to the system.

7.46 Figure 7.20 Components of the UNIX operating system

7.47 Linux In 1991, Linus Torvalds, a Finish student at the University of Helsinki at the time, developed a new operating system that is known today as Linux. The initial kernel, which was similar to a small subset of UNIX, has grown into a full- scale operating system today. The Linux 2.0 kernel, released in 1997, was accepted as a commercial operating system: it has all features traditionally attributed to UNIX. Linux has three components: kernel, system libraries and system utilities. Networking capabilities: Linux support the standard internet protocols. Security: Linux security mechanism provides the security aspects, such as authentication and access control.

7.48 Windows NT/2000/XP In the late 1980s Microsoft, under the leadership of Dave Cutler, started development of a new single-user operating system to replace MS-DOS (Microsoft Disk Operating System). Windows NT (NT standing for New Technology) was the result. Several versions of Windows NT followed and the name was changed to Windows Windows XP (XP stands for eXPerience) was released in We refer to all of these versions as Windows NT or just NT.

7.49 The architecture of Windows NT Hardware abstraction layer (HAL) It hides hardware differences from the upper layers. Kernel It is the heart of the operating system and it is an object oriented piece of the software that sees any entity as an object. Executive It provides services for the whole operating system. It made up of six subsystems. See Figure Environmental subsystems These are subsystems designed to allow NT to run application programs designed for NT, for other operating systems or for earlier versions of NT.

7.50 Figure 7.21 The architecture of Windows NT