Slide 1- 1 Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating...
-
Upload
galilea-hooley -
Category
Documents
-
view
222 -
download
0
Transcript of Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3: Operating...
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Chapter 3: Operating Systems
Computer Science: An OverviewTenth Edition
by J. Glenn Brookshear
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-2
Functions of Operating Systems
• Oversee operation of computer• Store and retrieve files• Schedule programs for execution• Coordinate the execution of programs• The best known examples:
– Windows– Unix– Linux
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-3
Evolution of Shared Computing
• The execution of each program is called job.• Batch processing
– Execution of jobs in a single batch, no interaction with user
• Interactive processing– Requires real-time processing– Execution of jobs through dialogue with user via remote terminals
• Time-sharing/Multitasking– Rotate jobs– Implemented by Multiprogramming
• Multiprocessor machines
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-4
Figure 3.1 Batch processing
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-5
Figure 3.2 Interactive processing
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-6
Types of Software
• Application software– Performs specific tasks for
users• System software
– Provides infrastructure for application software
– Consists of operating system and utility software
• Utility Software– Programs for performing
activitis that are fundamental to computer installation but not included in OS.
– Ex: sw to format a disk
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-7
Operating System Components
• Shell: Communicates with users– Text based– Graphical user interface (GUI)
• Kernel: internal part of OS. – File manager: coordinate the machine’s mass storage
facilities– Device drivers: communicate with controllers– Memory manager: coordinate machine use of memory– Scheduler / dispatcher: determines which activities are
to be considered for execution / controls the allocation of time to these activities
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-8
Figure 3.4 The shell as an interface between users and the operating system
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-9
File Manager
• Directory (or Folder): A user-created bundle of files and other directories (subdirectories)
• Directory Path: A sequence of directories within directories
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-10
Memory Manager
• Allocates space in main memory• 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
• Ex:
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-11
Getting it Started (Bootstrapping)
• Bootstrap: Program in ROM (example of firmware)– Run by the CPU when power is turned on– Transfers operating system from mass storage
to main memory– Executes jump to operating system
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-12
Figure 3.5 The booting process
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-13
Processes
• Process: The activity of executing a program
• Process State: Current status of the activity– Program counter– General purpose registers– Related portion of main memory
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-14
Process Administration
• Scheduler: Adds new processes to the process table and removes completed processes from the process table
• 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.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-15
Figure 3.6 Time-sharing between process A and process B