Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

Operating Systems

Lecture 1
Introduction
Read: Chapter 1

1.1

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Course Web Page

The course webpage is located at:


http://mathcs.holycross.edu/~csci346
This page contains useful course information, lecture slides,
homework assignments, etc.
Refer to it often.

Operating System Concepts

1.2

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

What is an Operating System?

A program that acts as an intermediary between a user

of a computer and the computer hardware.


Operating system goals:
Execute user programs and make solving user problems easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.

There are many variations on how to do this. The

operating system design depends on the system and


goals for its use.

1.3

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Computer 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).

1.4

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Abstract View of System Components

1.5

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Goals for An Operating System


User View:
Ease of use
Good performance
Resource allocation (if multiple users)
System View:
Allocate resources (CPU time, Memory space, file storage
space, I/O devices).
Manage resources in the face of many, potentially
conflicting requests.
Act as a Control Program:
Manage execution of user programs
Operate and control I/O devices.
1.6

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Competing Goals
Goals for an Operating System:
1) Convenience for the user (especially for PC's)
2) Efficient operation (especially with multi-user systems)
There may be a trade-off between these goals
Evolution of operating systems focused first on efficiency.
Much of Operating Systems theory concentrates on optimal use
of resources.

1.7

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Operating System Definitions


Resource allocator manages and allocates

resources.
Control program controls the execution of user
programs and operations of I/O devices .
Kernel the one program running at all times (all
else being application programs).

1.8

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Mainframe Systems--Batch Processing


Early computers (mainframes) were large and run from a
console
I/0 consisted of card readers, line printers, tape drives, etc.
Users did not interact directly with the computer:
The user submits the job to the operator
The operator runs the job on the computer and delivers
the output to the user (sometimes days later!).
The output consisted of the output of the program plus a
dump of the contents of core memory for debugging.
Jobs with similar needs were batched together to
increase the efficiency of processing.
Problem: CPU was often idle. (I/O devices very slow
compared to the CPU speed)
1.9

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Memory Layout for a Simple Batch System

1.10

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Multiprogrammed Batch Systems


A single user cannot keep the CPU
and I/O busy all the time.
Multiprogramming increases the
CPU use by having several jobs in
memory at once.
When one job has to wait (e.g. for
I/O) the CPU switches to another
job.

1.11

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

OS Features Needed for Multiprogramming


In multiprogramming systems, the operating system must
make decisions for the user:
The OS chooses which jobs (in the job pool) are loaded

into memory (job scheduling).


The system must allocate the memory to several jobs
(memory management).
The system must choose among several jobs ready to
run (CPU scheduling).
The system must allocate devices among jobs.
The system must make sure jobs don't affect one
another.
1.12

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Time-Sharing SystemsInteractive Computing


Time-sharing uses CPU scheduling and multiprogramming to

provide each user with a small share of the computing power.


The CPU is multiplexed among several jobs that are kept in
memory and on disk
The switches between jobs occur frequently, so that users can
interact with each program as it is running.
Processes:
A process is a program that is loaded into memory and
executing.
A typical process executes for only a short time before
finishing or requiring I/O (waiting).
I/O is slow, so the operating system can switch to the program
of another user while waiting.
1.13

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Desktop Systems
Personal computers computer system dedicated to a

single user.
I/O devices keyboards, mice, display screens, small
printers.
Try to maximize user convenience and responsiveness.
Often individuals have sole use of computer and do not
need advanced CPU utilization of protection features.
Can adopt technology developed for larger operating
system.
May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)
1.14

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Parallel Systems

Multiprocessor systems with more than on CPU in

close communication.
Tightly coupled system processors share memory and
a clock; communication usually takes place through the
shared memory.
Advantages of parallel system:
Increased throughput
Economical
Increased reliability
graceful degradation
fail-soft systems

1.15

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Parallel Systems (Cont.)


Symmetric multiprocessing (SMP)
Each processor runs and identical copy of the operating

system.
Many processes can run at once without performance
deterioration.
Most modern operating systems support SMP

Asymmetric multiprocessing
Each processor is assigned a specific task; master processor

schedules and allocated work to slave processors.


More common in extremely large systems

1.16

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Symmetric Multiprocessing Architecture

1.17

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

Migration of Operating-System Concepts and Features

1.18

Silberschatz, Galvin and Gagne 2002


Modified for CSCI 399, Royden, 2005

You might also like