Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Eleventh Edition.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Advertisements

1. 2 The Evolution of Operating Systems : §The single processing machines of 1940’s and 1950’s were not very flexible or efficient. §The processing is.
Chapter 10 Operating Systems.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
OS Spring’03 Introduction Operating Systems Spring 2003.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Operating system Part three Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Chapter 3 Operating Systems. 2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System Architecture 3.3 Coordinating the.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Part two. 3.2 operating system architecture  Software have two categories  Application software  System software  Application software: consists of.
What do operating systems do? manage processes manage memory and computer resources provide security features execute user programs make solving user.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Introduction to Operating Systems
Operating system Part two Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Part II: Software In part II, we focus on topics associated with software. In particular, we will investigate the discovery, representation, and communication.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Tenth Edition.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
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.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
Lecture 8: 9/19/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
1 Sec (3.2) Operating System Architecture OS. 2 Software dividing into two categories: 1. Application software 2. System Software  Operating System 
Chapter 3 Operating Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Operating Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 3: Operating Systems
Operating System Principles And Multitasking
Computer Science/Ch.3 Data Manipulation 3-1 Chapter 3 Data Manipulation.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
CPSC 171 Introduction to Computer Science System Software and Virtual Machines.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 3 Operating Systems. © 2005 Pearson Addison-Wesley. All rights reserved 3-2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Operating Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
CT101: Computing Systems Introduction to Operating Systems.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
Introduction to Operating Systems
Applied Operating System Concepts
Chapter 3: Operating Systems
An Introduction to Operating Systems
IS310 Hardware & Network Infrastructure Ronny L
Chapter 3: Operating Systems
Shell & Kernel Concepts in Operating System
Operating System Architecture OS
OS Architecture.
Chapter 3 Operating Systems
Chapter 3: Operating Systems
Chapter 3: Operating Systems
February 5, 2004 Adrienne Noble
CS149D Elements of Computer Science
Introduction to Operating Systems
Chapter 3: Operating Systems
Chapter 3: Operating Systems Computer Science: An Overview
Chapter 3: Operating Systems
Chapter 3: Operating Systems
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Presentation transcript:

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating Systems Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-2 Chapter 3: Operating Systems 3.1 The History of Operating Systems 3.2 Operating System Architecture 3.3 Coordinating the Machine’s Activities 3.4 Handling Competition Among Processes 3.5 Security

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-3 Functions of Operating Systems Oversee operation of computer Store and retrieve files Schedule programs for execution Coordinate the execution of programs

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-4 Evolution of Shared Computing Batch processing Interactive processing –Requires real-time processing Time-sharing/Multitasking –Implemented by Multiprogramming Multiprocessor machines

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-5 Figure 3.1 Batch processing

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-6 Figure 3.2 Interactive processing

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-7 Types of Software Application software –Performs specific tasks for users System software –Provides infrastructure for application software –Consists of operating system and utility software

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-8 Figure 3.3 Software classification

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-9 Operating System Components Shell: Communicates with users –Text based –Graphical user interface (GUI) Kernel: Performs basic required functions –File manager –Device drivers –Memory manager –Scheduler and dispatcher determines which activities are to be considered for execution; controls the allocation of time to the activities

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-10 Figure 3.4 The shell as an interface between users and the operating system

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-11 File Manager Its job is to coordinate the use of the machine’s mass storage facilities. It “records” –Where each file is located –Which users are allowed to access the various files –Which portions of mass storage are available for new files or existing files Directory (or Folder): A user-created bundle of files and other directories (subdirectories) Directory Path: A sequence of directories within directories

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-12 Device Drivers Device drivers are the software units that communicate with the controllers to carry out operations on the peripheral devices. –translates generic requests into the more technical steps required by the device –e.g., reading and decoding a printer’s status word as well as all the other handshaking details The other software components can merely rely on the device drivers to take care of the details.

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-13 Memory Manager Allocates/reclaims space in main memory –ensure that the actions of each program are restricted to the program’s allotted space Paging: The memory manager may create the illusion that the machine has more memory than it actually does (virtual memory) by playing a “shell game” in which blocks of data (pages) are shifted back and forth between main memory and mass storage

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-14 Getting it Started (Bootstrapping) Bootstrap: Program in ROM (example of firmware: software recorded in hardware) –Run by the CPU when power is turned on The program counter of the CPU starts with a particular predetermined address pointing to ROM –Transfers operating system from mass storage to main memory (which is essentially empty when the machine is first turned on) –Executes jump to operating system BIOS (basic I/O system) in ROM – a collection of software routines for fundamental I/O activities

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-15 Figure 3.5 The booting process

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-16 Processes Process: The activity of executing a program –Program: a static set of directions –Process: a dynamic activity whose properties change as time progresses –Analogy: a piece of sheet music vs. a musician performing that piece Process State: Current status of the activity –Program counter –General purpose registers –Related portion of main memory

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-17 Process Administration Scheduler: Adds new processes to the process table and removes completed processes from the process table –Each entry in the process table contains: (1) memory area, (2) priority, and (3) ready or waiting Dispatcher: Controls the allocation of time slices to the processes in the process table –The end of a time slice is signaled by an interrupt. –Process (or context) switch

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-18 Figure 3.6 Time-sharing between process A and process B

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-19 Interrupt Handling The CPU completes its current machine cycle Save the current process’s state Begin execution of a program, called an interrupt handler, which is a part of the dispatcher Selects the highest-priority ready process from the process table Restarts the timer circuit and begin the next time slice

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-20 Handling Competition for Resources A simple flag system: interrupt problem (interrupt disable&enable, test-and-set instr.) Semaphore: A “control flag” Critical Region: A group of instructions that should be executed by only one process at a time Mutual exclusion: Requirement for proper implementation of a critical region

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-21 Semaphore A semaphore S is an integer variable that is accessed only through two standard atomic operations: wait and signal. Wait(S): while S<=0 do no-op; S:=S -1; Signal(S): S:=S + 1;

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-22 Semaphore (Cont.) repeat wait(S) critical region signal(S) remainder section until false

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-23 Deadlock Processes block each other from continuing Conditions required for deadlock 1. Competition for non-sharable resources 2. Resources requested on a partial basis 3. An allocated resource can not be forcibly retrieved

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-24 Figure 3.7 A deadlock resulting from competition for nonshareable railroad intersections

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-25 Deadlock detection and avoidance Converting nonshareable resources into shareable ones, e.g., spooling (holding data for output at a later but more convenient time) Requiring each process to request all its resources at one time Administrator uses his/her powers as “super-user” to forcibly retrieving some of the allocated resources

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-26 Security Attacks from outside –Problems Insecure passwords Unusual behavior Sniffing software –Counter measures Auditing software

Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-27 Security (continued) Attacks from within –Problem: Unruly processes (e.g., tricking file or memory manager) Special-purpose registers to store the upper and lower limits of a process’s allotted memory area –Counter measures: Control process activities via privilege levels (privileged modes and privileged instructions) for CPU operations When allowing a process to start a time slice, CPU is switched to nonprivileged mode