• No results found

Contents. Chapter 1. Introduction

N/A
N/A
Protected

Academic year: 2021

Share "Contents. Chapter 1. Introduction"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Contents

1. Introduction

2. Computer-System Structures 3. Operating-System Structures 4. Processes

5. Threads

6. CPU Scheduling

7. Process Synchronization 8. Deadlocks

9. Memory Management 10. Virtual Memory 11. File Systems

Chapter 1. Introduction

(2)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Introduction

ƒ What is an Operating System?

ƒ A basis for application programs

ƒ An intermediary between users and hardware

ƒ Amazing variety

ƒ Mainframe, personal computer (PC), handheld computer, embedded computer without user view Convenient vs Efficient

Computer System Components

ƒ OS – a government/environment provider

Application Programs Operating System

Hardware

User User ... User

CPU, I/O devices, memory, etc.

compilers, word processors, spreadsheets, Browsers, etc.

(3)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

User View

ƒ The user view of the computer varies by the interface being used!

ƒ Examples:

ƒ Personal Computer Æ Ease of use

ƒ Mainframe or minicomputer Æ maximization of resource utilization

ƒ

Efficiency and fair share

ƒ Workstations Æ compromise between individual usability & resource utilization

ƒ Handheld computer Æ individual usability

ƒ Embedded computer without user view Æ run without user intervention

System View

ƒ A Resource Allocator

ƒ CPU time, Memory Space, File Storage, I/O Devices, Shared Code, Data Structures, and more

ƒ A Control Program

ƒ Control execution of user programs

ƒ Prevent errors and misuse

ƒ OS definitions – US Dept.of Justice against Microsoft in 1998

ƒ The stuff shipped by vendors as an OS

ƒ Run at all time

(4)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

System Goals

ƒ Two Conflicting Goals:

ƒ Convenient for the user!

ƒ Efficient operation of the computer system!

ƒ We should

ƒ recognize the influences of operating systems and computer architecture on each other

ƒ and learn why and how OS’s are by

tracing their evolution and predicting what they will become!

UNIX Architecture

terminal controller, terminals, physical memory, device controller, devices such as disks, memory, etc.

CPU scheduling, signal handling, virtual memory, paging, swapping,

file system, disk drivers, caching/buffering, etc.

Shells, compilers, X, application programs, etc.

UNIX Kernel interface

to the hardware System call interface

useruser user user user user User user

interface

(5)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Mainframe Systems

ƒ The first used to tackle many commercial and scientific applications!

ƒ 0th Generation – 1940?s

ƒ A significant amount of set-up time in the running of a job

ƒ Programmer = operator

ƒ Programmed in binary Æ assembler Æ (1950) high level language

Mainframe – Batch Systems

ƒ

Batches sorted and submitted by the operator

ƒ

Simple batch systems

ƒ Off-line processing

~ Replace slow input device with faster units Æ replace card readers with disks

ƒ Resident monitor

~ Automatically transfer control from one job to the next

• loader

• job sequencing

• control card interpreter User Program Area

monitor

(6)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Mainframe – Batch Systems

ƒ Spooling (Simultaneous Peripheral Operation On- Line)

~ Replace sequential-access devices with random-access device

=> Overlap the I/O of one job with the computation of others e.g. card Æ disk, CPU services, disk Æ printer

ƒ Job Scheduling

card reader

disks

CPU

disks

printer

Mainframe –

Multiprogrammed Systems

ƒ Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute – Early 1960

ƒ Multiporgrammed batched systems

ƒ Job scheduling and CPU scheduling

ƒ Goal : efficient use of scare

resources disk

monitor CPU scheduling

job1

job2

job3

(7)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Mainframe – Time-Sharing Systems

ƒ Time sharing (or

multitasking) is a logical extension of

multiprogramming!

ƒ Started in 1960s and become common in 1970s.

ƒ An interactive (or hand- on) computer system

ƒ Multics, IBM OS/360

disk

on-line file system virtual memory

sophisticated CPU scheduling job synchronization

protection & security ...

and so on

Desktop Systems

ƒ Personal Computers (PC’s)

ƒ Appeared in the 1970s.

ƒ Goals of operating systems keep changing

ƒ

Less-Powerful Hardware & Isolated EnvironmentÆ Poor Features

ƒ Benefited from the development of mainframe OS’s and the dropping of hardware cost

ƒ Advanced protection features

ƒ

User Convenience & Responsiveness

(8)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Parallel Systems

ƒ Tightly coupled: have more than one

processor in close communication sharing computer bus, clock, and sometimes memory and peripheral devices

ƒ Loosely coupled: otherwise

ƒ Advantages

ƒ Speedup – Throughput

ƒ Lower cost – Economy of Scale

ƒ More reliable – Graceful Degradation Æ Fail Soft (detection, diagnosis, correction)

• A Tandem fault-tolerance solution

Parallel Systems

ƒ Symmetric multiprocessing model: each processor runs an identical copy of the OS

ƒ Asymmetric multiprocessing model: a master- slave relationship

~ Dynamically allocate or pre-allocate tasks

~ Commonly seen in extremely large systems

~ Hardware and software make a difference?

ƒ Trend: the dropping of microporcessor cost

Î OS functions are offloaded to slave

processors (back-ends)

(9)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Distributed Systems

ƒ Definition: Loosely-Coupled Systems – processors do not share memory or a clock

ƒ Heterogeneous vs Homogeneous

ƒ Advantages or Reasons

ƒ Resource sharing: computation power, peripheral devices, specialized hardware

ƒ Computation speedup: distribute the computation among various sites – load sharing

ƒ Reliability: redundancy Æ reliability

ƒ Communication: X-window, email

Distributed Systems

ƒ Distributed systems depend on networking for their functionality.

ƒ Networks vary by the protocols used.

ƒ

TCP/IP, ATM, etc.

ƒ Types – distance

ƒ

Local-area network (LAN)

ƒ

Wide-area network (WAN)

ƒ

Metropolitan-area network (MAN)

ƒ

Small-area network – distance of few feet

ƒ Media – copper wires, fiber strands,

satellite wireless transmission, infrared

communication,etc.

(10)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Distributed Systems

ƒ Client-Server Systems

ƒ Compute-server systems

ƒ File-server systems

ƒ Peer-to-Peer Systems

ƒ Network connectivity is an essential component.

ƒ Network Operating Systems

ƒ Autonomous computers

ƒ A distributed operating system – a single OS controlling the network.

Clustered Systems

ƒ Definition: Clustered computers which share storage and are closely linked via LAN networking.

ƒ Advantages: high availability, performance improvement, etc.

ƒ Types

ƒ Asymmetric/symmetric clustering

ƒ Parallel clustering – multiple hosts that access the same data on the shared storage.

ƒ Global clusters

ƒ Distributed Lock Manager (DLM)

(11)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Real-Time Systems

ƒ Definition: A real-time system is a computer system where a timely

response by the computer to external stimuli is vital!

ƒ Hard real-time system: The system has failed if a timing constraint, e.g.

deadline, is not met.

ƒ All delays in the system must be bounded.

ƒ Many advanced features are absent.

Real-Time Systems

ƒ Soft real-time system: Missing a timing constraint is serious, but does not necessarily result in a failure unless it is excessive

ƒ A critical task has a higher priority.

ƒ Supported in most commercial OS.

ƒ Real-time means on-time instead of

fast

(12)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Real-Time Systems

ƒ Applications

ƒ Air traffic control

ƒ Space shuttle

ƒ Navigation

ƒ Multimedia systems

ƒ Industrial control systems

ƒ Home appliance controller

ƒ Nuclear power plant

ƒ Virtual reality

ƒ Games

ƒ User interface

ƒ Vision and speech

recognition (approx. 100

~ 200ms)

ƒ PDA, telephone system

ƒ And more

Handheld Systems

ƒ Handheld Systems

ƒ E.g., Personal Digital Assistant (PDA)

ƒ New Challenges – convenience vs portability

ƒ Limited Size and Weight

ƒ Small Memory Size

ƒ

No Virtual Memory

ƒ Slow Processor

ƒ

Battery Power

ƒ Small display screen

ƒ

Web-clipping

(13)

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2002.

Feature Migration

ƒ MULTIplexed Information and Computing Services (MULTICS)

ƒ 1965-1970 at MIT as a utility

ƒ UNIX

ƒ Since 1970 on PDP-11

ƒ Recent OS’s

ƒ MS Windows, IBM OS/2, MacOS X

ƒ OS features being scaled down to fit PC’s

ƒ Personal Workstations – large PC’s

Computing Environments

ƒ Traditional Computing

ƒ E.g., typical office environment

ƒ Web-Based Computing

ƒ Web Technology

ƒ

Portals, network computers, etc.

ƒ Network connectivity

ƒ New categories of devices

ƒ

Load balancers

ƒ Embedded Computing

ƒ Car engines, robots, VCR’s, home automation

ƒ Embedded OS’s often have limited features.

References

Related documents

Kastle-Meyer (KM) test (Phenolphthalin test): The aim of this presumptive test is to determine whether a questioned stain yields a positive colour reaction which suggests the

Environment Environment Business Engineering Maths & Physical Sci Medicine & Health Environment Business Arts Engineering Business Medicine & Heath Biological Sciences

Census Bureau, 2008 American Community Survey (ACS) ; Median income = ACS (from 2006-08 3-year estimates, reported in 2007 dollars); Poverty rate = 2007 ACS (African American,

“Inheritance and mapping of resistance to anthracnose fruit rot in highbush blueberries for marker-assisted selection” Michigan State University GREEEN 2011. Investigator:

Superposing white spots to the fatigue crack path corresponding to the intersections between the crack path and the graphite nodules (Fig. 5b), it is evident that crack path

Principal component analysis (PCA) of floral traits and pairwise genetic distance principal coordinates analysis (PCoA) of species in the different temporal guilds, spring

3 The above-listed Ergonomics, Acoustics and Hygienics certifications may vary depending upon the location of the Dell factory and specific product configuration...

In this paper, we present and formulate the Internet host profiling problem using the header data from public packet traces to select relevant features of frequently-seen hosts