Page 1
1
1.1 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Chapter 1: IntroductionChapter 1: Introduction
n What is an Operating System?
n Mainframe Systems
n Desktop Systems
n Multiprocessor Systems
n Distributed Systems
n Clustered System
n Real -Time Systems
n Handheld Systems
n Feature Migration
n Computing Environments
1.2 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
What is an Operating System?What is an Operating System?
n A program that acts as an intermediary between a user of a computer and the computer hardware
n Operating system goals:
l Execute user programs and make solving user problems easier.
l Make the computer system convenient to use
n Use the computer hardware in an efficient manner
Page 2
2
1.3 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
What is an OS?What is an OS?
n Think about some of the things you do with a computer and think about how the OS supports them.
© 2004 D.A. Menascé
1.4 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
OS FunctionsOS Functions
Action OS FunctionsLogin process creation,
authentication, resourceallocation
Create a text document application launching,fi le management.
Running applications Scheduling, resource (e.g.,memory, disk) allocation.
© 2004 D.A. Menascé
Page 3
3
1.5 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Some OS FunctionsSome OS Functions
• User authentication• Processor allocation (process scheduling)• File Management• Memory Management • Device Management• Network Management• Providing a user interface (graphical or not) to
system functions and resources• Process synchronization• Interprocess communication.
© 2004 D.A. Menascé
1.6 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
What is an Operating SystemWhat is an Operating System
n Resource Manager
n Extended Machine: provides higher level abstractions of lower level and complex objects (e.g., files, processes, devices)l complexity hidden from user
l homogeneous treatment of different low level objects (e.g., one single read function can be used to read a block from any disk)
© 2004 D.A. Menascé
Page 4
4
1.7 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
OS OperationOS Operation
Bare Machine
user processeswaiting to run
user processeswaiting to run
OS issleeping
Bare Machine
user process is running
OS isrunning
© 2004 D.A. Menascé
1.8 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Computer System ComponentsComputer System Components
1. Hardware – provides basic computing resources (CPU, memory, I/O devices)
2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users
3. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs)
4. Users (people, machines, other computers)
Page 5
5
1.9 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Abstract View of System ComponentsAbstract View of System Components
1.10 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Operating System DefinitionsOperating System Definitions
n Resource allocator – manages and allocates resources
n Control program – controls the execution of user programs and operations of I/O devices
n Kernel – the one program running at all times (all else being application programs)
Page 6
6
1.11 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Mainframe SystemsMainframe Systems
n Reduce setup time by batching similar jobs
n Automatic job sequencing – automatically transfers control from one job to another. First rudimentary operating system
n Resident monitor
l initial control in monitor
l control transfers to job
l when job completes control transfers back to monitor
1.12 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
IBM 7094 Mainframe IBM 7094 Mainframe –– Columbia University Columbia University 19651965
© 2004 D.A. Menascé
Page 7
7
1.13 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Memory Layout for a Simple Batch SystemMemory Layout for a Simple Batch System
1.14 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
MultiprogrammedMultiprogrammed Batch SystemsBatch Systems
Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them
Page 8
8
1.15 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Utilization in Utilization in MultiprogrammedMultiprogrammed SystemsSystems
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 1 2 3 4 5 6 7 8 9 10
Degree of Multiprogramming
Uti
lizat
ion
CPU Utilization Disk Utilization
© 2004 D.A. Menascé
1.16 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Throughput in Throughput in MultiprogrammedMultiprogrammed SystemsSystems
0
0.001
0.002
0.003
0.004
0.005
0.006
0.007
0 1 2 3 4 5 6 7 8 9 10
Degree of multiprogramming
Thro
ughp
ut (j
obs/
mse
c)
© 2004 D.A. Menascé
Page 9
9
1.17 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
OS Features Needed for MultiprogrammingOS Features Needed for Multiprogramming
n I/O routine supplied by the system
n Memory management – the system must allocate the memory to several jobs
n CPU scheduling – the system must choose among several jobs ready to run
n Allocation of devices
1.18 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
MultiprogrammingMultiprogramming
P1
P2
P3
P4
process using the CPU
© 2004 D.A. Menascé
Page 10
10
1.19 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
MultiprogrammingMultiprogramming
• The OS gives each process a certain timeslice (quantum)to run.
• Control is passed to another process if:• running process ends before timeslice expires
running process leaves the system.• running process needs and I/O operation
running process joins the I/O device queue,• timeslice expires
running process goes back to the CPU queue.
© 2004 D.A. Menascé
1.20 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Process States in a Process States in a MultiprogrammedMultiprogrammedOSOS
Running Blocked
Ready
IO request
end oftimeslice
schedulingIO operationcompletion
© 2004 D.A. Menascé
Page 11
11
1.21 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
TimeTime--Sharing SystemsSharing Systems––Interactive Computing Interactive Computing
n The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory)
n A job is swapped in and out of memory to the disk
n On-line communication between the user and the system is provided
l When the operating system finishes the execution of one command, it seeks the next “control statement” from the user’s keyboard
n On-line system must be available for users to access data and code
1.22 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
TimeTime--sharing Queuessharing Queues
Swappingdisk
CPU
disk
Jobs in memory
Arriving job Completing job
a
b
c
Ready queue
© 2004 D.A. Menascé
Page 12
12
1.23 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Desktop SystemsDesktop Systems
n Personal computers – computer system dedicated to a single user
n I/O devices – keyboards, mice, display screens, small printers
n User convenience and responsiveness
n Can adopt technology developed for larger operating system
l Often individuals have sole use of computer and do not need advanced CPU utilization of protection features
n May run several different types of operating systems (Windows, MacOS, UNIX, Linux)
1.24 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Parallel SystemsParallel Systems
n Systems with more than one CPU in close communication
l Also known as multiprocessor systems
n Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory
n Advantages of parallel system:
l Increased throughput
l Economical
l Increased reliability (in some cases)
4graceful degradation
4fail-soft systems
Page 13
13
1.25 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Parallel SystemsParallel Systems
P1
P2
Pn
.
.
.Job queue
Prob. System is Up = Prob. at leastone processor is up
= 1 – Prob (all processorsare down)
= 1 - pn
n 1- p^n1 0.2002 0.3603 0.4884 0.5905 0.6726 0.7387 0.7908 0.8329 0.866
10 0.893
© 2004 D.A. Menascé
1.26 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Parallel Systems (Cont.)Parallel Systems (Cont.)
n Asymmetric multiprocessing
l Each processor is assigned a specific task; master processor schedules and allocated work to slave processors
l More common in extremely large systems
n Symmetric multiprocessing (SMP)
l Each processor runs and identical copy of the operating system
l Many processes can run at once without performance deterioration
l Most modern operating systems support SMP
Page 14
14
1.27 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Symmetric Multiprocessing ArchitectureSymmetric Multiprocessing Architecture
1.28 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Distributed SystemsDistributed Systems
n Distribute the computation among several physical processors
n Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines
n Advantages of distributed systems
l Resources Sharing
l Computation speed up – load sharing
l Reliability
l Communications
Page 15
15
1.29 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Distributed Systems (cont)Distributed Systems (cont)
n Requires networking infrastructure
n Local area networks (LAN) or Wide area networks (WAN)
n May be either client-server or peer-to-peer systems
1.30 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
General Structure of ClientGeneral Structure of Client--ServerServer
Page 16
16
1.31 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Clustered SystemsClustered Systems
n Clustering allows two or more systems to share storage
n Provides high reliability
n Asymmetric clustering: one server runs the application or applications while other servers standby
n Symmetric clustering: all N hosts are running the application or applications
1.32 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
RealReal--Time SystemsTime Systems
n Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems
n Well-defined fixed-time constraints
n Real-Time systems may be either hard or soft real-time
Page 17
17
1.33 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
RealReal--Time Systems (Cont.)Time Systems (Cont.)
n Hard real-time:l Secondary storage limited or absent, data stored in short
term memory, or read-only memory (ROM)
l Conflicts with time-sharing systems, not supported by general-purpose operating systems
n Soft real-time
l Limited utility in industrial control of robotics
l Integrate-able with time-share systems
l Useful in applications (multimedia, virtual reality) requiring tight response times
1.34 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Handheld SystemsHandheld Systems
n Personal Digital Assistants (PDAs)
n Cellular telephones
n Issues:l Limited memory
l Slow processors
l Small display screens
Page 18
18
1.35 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Migration of OperatingMigration of Operating--System Concepts and FeaturesSystem Concepts and Features
1.36 Silberschatz, Galvin and Gagne ©2003Operating System Concepts with Java
Computing EnvironmentsComputing Environments
n Traditional computing
l PCs, Servers, limited remote access
n Web-Based Computingl Client-server and web services, convenient remote access, location-
less servers
n Embedded Computing
l Most computers (auto engine controllers, microwaves)
l Very limited operating system features
l Little or no user interface, remote access