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

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

Embed Size (px)

Citation preview

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

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Chapter 3: Operating Systems

Computer Science: An OverviewTenth Edition

by J. Glenn Brookshear

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

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

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

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

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

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-4

Figure 3.1 Batch processing

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

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-5

Figure 3.2 Interactive processing

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

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

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

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

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

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

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

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

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

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:

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

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

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

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-12

Figure 3.5 The booting process

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

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

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

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.

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

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3-15

Figure 3.6 Time-sharing between process A and process B