Download What is an Operating System?

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Berkeley Software Distribution wikipedia , lookup

Process management (computing) wikipedia , lookup

Copland (operating system) wikipedia , lookup

Security-focused operating system wikipedia , lookup

RSTS/E wikipedia , lookup

Burroughs MCP wikipedia , lookup

Spring (operating system) wikipedia , lookup

VS/9 wikipedia , lookup

Distributed operating system wikipedia , lookup

Paging wikipedia , lookup

Unix security wikipedia , lookup

CP/M wikipedia , lookup

Transcript
3 - Introduction to
Operating Systems
Mark Handley
What is an Operating System?

An OS is a program that:
 manages the computer hardware.
 provides the basis on which application programs
can be built and run.
 acts as an intermediary between the user and the
hardware.
1
What operating systems have you used?










Unix (4.3BSD, SunOS, Ultrix, HPUX, Solaris, OSF1,
FreeBSD, Linux, MacOS X)
DOS (MSDOS, Windows 3.1, 95, 98, ME)
NT (NT 3.51, Windows 2000, Windows XP)
MacOS (7, 9)
Vax VMS
GEC OS4000
CP/M
PDA: PalmOS, Psion 3, Psion EPOC, Linux
Routers: Cisco IOS, Juniper JunOS, Procket
Embedded: car, phone, digital camera, iPod, DSL router,
WiFi AP.
Goals
 Optimize
use of hardware
 Convenient for user
 Efficient
 Robust
 Secure

Different systems have different goals.
 Efficiency matters on a PDA, phone, or mars rover.
 Convenience matters on a PC.
 Hardware optimization in important on mainframes.

OS design is all about tradeoffs.
2
Typical System Components
User 1
Compiler
User 2
User 3
User 4
User 5
Database
System and Application Programs
Operating System
Computer Hardware
What is in an OS?

Bill Gates claims that Internet Explorer is part of the
Windows Operating System.
 Is he right?

Tannenbaum claims that the Operating System is
only what resides in the kernel. Everything else is an
application.
 Is he right?
3
Types of System







Mainframe Systems
Desktop Systems
Multiprocessor Systems
Distributed Systems
Clustered Systems
Real-Time Systems
Handheld Systems
Punched Card Reader
4
Mainframe Systems (1): Batch Systems




Early computers were huge,
expensive and slow.
Card readers or paper tape for input.
Leave program with the operator,
get back printout next day.
Role of OS is to load a job, run it,
load the next job, run it, etc.
Not very efficient, as job takes a
long time to load.
Operating
System
User
Program
Memory
Typical Memory
Layout
IBM 360
Operator Panel
5
Mainframe Systems (2): Multiprogramming




Maintain a job pool on disk.
Keep a subset of jobs in memory.
When one job stalls waiting for I/O,
switch to a different one.
OS Functions:
 Job Scheduling
 Disk I/O
 Memory Management
Operating
System
Job 1
Job 2
Job 3
Job 4
Typical Memory
Layout
Mainframe Systems (3): Time Sharing




Time-sharing (or Multitasking) is a logical extension of
multiprogramming.
CPU switches between jobs so quickly that users can interact
with a program while it is running.
 Requires good responsiveness.
 What a job stalls waiting for I/O, another job can be run,
giving good CPU utilization.
The job pool is now under the control of the users.
 But memory is limited, so this requires swapping some jobs
out to disk. One solution is virtual memory, where a job
that is only partly in memory can be run.
Also requires a filesystem for users to store the data from their
jobs, and to abstract the details of the disk hardware.
6
DEC PDP 11/44, IBM PC
Desktop Systems (1)

Early desktop systems had little memory, and no
memory management hardware.
 CP/M, MS-DOS, MacOS
 One user. One primary user task at a time.
 Goals were user convenience and responsiveness.

As later hardware gained capability, so too did the
operating systems.
 Gained functionality first designed for
mainframes.
7
Desktop Systems (2)





Unix moved to the workstation, and later to the PC.
 BSD Unix, SunOS, and later on, FreeBSD and Linux.
Windows NT appeared, with true multitasking and memory
management support.
MacOS X - Mach/FreeBSD Unix derived.
Some goals have changed:
 No longer need to maximize CPU utilization.
Some have not:
 File protection and user isolation, needed on multitasking
mainframes to separate user, are now needed for virus
isolation on networked PCs with only a single user.
Multiprocessor Systems (1)

For really big systems, the fastest CPU is never fast enough.
 Only solution: use many CPUs.

One box with many CPUs, or many boxes with one CPU?
 Multiprocessor can be cheaper (shared peripherals), and
faster (low communications cost), and simpler (shared
data), but it isn’t always.
 Depends on task.

On the desktop, CPUs are now cheap enough to have
multiprocessor PCs.
 Really good for a crisp responsive user interface.
 Multi-core CPUs will be common soon.
8
Multiprocessor Systems (2): OS style

Symmetric multiprocessing (SMP)
 All CPUs are equal; each runs kernel tasks, and
communicate with each other as needed.
 Eg Solaris, Linux 2.4,

Asymmetric multiprocessing
 A master CPU controls the system, and runs key kernel
tasks.
 Other CPUs do what the master tells them.

Variants between the two.
 Only one CPU allowed in the kernel at a time, but no
restriction on which one it can be.
 Eg. FreeBSD 4, SunOS 4
Distributed Systems

Distribute work across a network of computers.
 Machines are loosely coupled.
 Can be local or remote machines.
 Each has its own CPU, memory, disk, peripherals, etc.

Advantages:
 Resource sharing, eg NFS
 CPU speedup from sharing a task.
 Load balancing (I/O and CPU speedup)
 Resilience.
Disadvantages:
 High latency, so tightly coupled tasks perform poorly.

9
Distributed Systems (2)

Few network operating systems exist, but many
distributed subsystems:
 NFS local shared filesystem.
 AFS global shared filesystem.
Clustered Systems



In between multiprocessor systems and distributed systems.
The term clustered is not well defined.
 Closely linked via a LAN.
 Share storage.
Can be used to improve performance, or improve reliability.
 Asymmetric clustering: one node runs application, others
provide a hot standby.
 Symmetric clustering: all nodes run parts of the
application.
10
Mars Rovers
Real-Time Systems


Special purpose OS, often used in a control device.
 Engine control systems, flight control computers,
guidance systems in missiles, medical systems,
some home appliance CPUs, spacecraft.
System has well defined time constraints:
 Processing must be done by some deadline.
11
Real-Time Systems

Hard Realtime:
 Guarantees critical tasks completed on time.
 Delays in system must be bounded.
 No virtual memory, limited use of secondary storage, no
time-sharing.
 Eg. VxWorks

Soft Realtime:
 Critical tasks get priority, and keep this priority until they
complete.
 Common in general-purpose OSs such as Unix.
 Uses: multimedia, virtual reality, etc.
Handheld Devices




Personal Digital Assistants (PDAs)
Mobile Phones.
MP3 players.
Issues:
 Limited memory.
 Slow CPUs.
 Small screens.
 Limited battery.
12
Technology Migration
Taken from Silberschatz, OS Concepts
Conclusions


Different Systems for different purposes.
 Functionality driven by limitations of the hardware.
 Features tend to migrate from expensive to cheap systems
over time.
Key Functionality:
 Memory Management
 Scheduling
 Hardware Abstraction
 Isolation Mechanisms
 Filesystems
13