Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop...

23
Operating System

description

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 – Make solving user problems easier. – Make the computer system convenient to use. – Use hardware in an efficient manner. “Performance” – Throughput---jobs / sec.system oriented – Utilization---% of time busysystem oriented – Response time---sec / jobuser oriented – user oriented index conflicts with system oriented indices User OS HW

Transcript of Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop...

Page 1: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Operating System

Page 2: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Chapter 1: Introduction• What is an Operating System?• Mainframe Systems• Desktop Systems• Multiprocessor Systems• Distributed Systems • Clustered System• Real -Time Systems• Handheld Systems• Computing Environments

Page 3: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

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 – Make solving user problems easier.– Make the computer system convenient to use.– Use hardware in an efficient manner.

• “Performance”– Throughput --- jobs / sec. system oriented– Utilization --- % of time busy system oriented– Response time --- sec / job user oriented– user oriented index conflicts with system oriented indices

UserOSHW

Page 4: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Computer System Components1. 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, games, business programs).

4. Users (people, machines, other computers).

Page 5: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Abstract View of System Components

Page 6: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Operating System Definitions

• Definition 1 -- Resource allocator – manages and allocates resources.

• Definition 2 -- Control program – controls the execution of user programs and operations of I/O

devices – .

• Definition 3 -- Kernel – one program running at all times – memory resident all the time– all else depend on this program.

Page 7: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Mainframe Systems• Batch:– -- by batching similar jobs– Batch (card reader, …)

• Load compiler from card reader into main memory• Put Bob’s source program (punch card) on card reader • Run Compiler, which reads Bob’s program from card reader• Generate Bob’s binary to card puncher

– Batch• Compile in batch (many source programs are on card reader)

• Automatic job sequencing– automatically transfers control from one job to another. – First rudimentary operating system.

• Job Control -- (load cc, read src, compile, load bin, run, output..)• Resident monitor

– initial control in monitor – Job control (load, run)– When a user job completes -- control transfers back to monitor

Page 8: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Memory Layout for a Simple Batch System

MonitorCPU is idle While I/O is in progresI/O is slower than CPU

Card Reader

Printer

Page 9: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Multiprogrammed Batch SystemsSeveral jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

CPU tape …

CPU Network

CPU

Page 10: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

OS Features Needed for Multiprogramming

• I/O routine supplied by the system.

• Memory management – – the system must allocate the memory to several jobs.

• CPU scheduling –– must choose among several jobs ready to run on CPU

• Allocation of devices.

Page 11: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Time-Sharing Systems–Interactive Computing(multi-user system)

• -The CPU is multiplexed among several jobs • jobs that are kept in memory and on disk (not on card reader ! )• (the CPU is allocated to a job only if the job is in memory). -A job is swapped in and out of memory to the disk (not card reader).

– Eg:disk (not card reader)

• -Users use (keyboard, mouse, CRT screen) to interact with program instead of (card reader, printer, etc).• -On-line communication between the user and system is provided when the operating system finishes the execution of one command, OS asks next “control statement” from the user’s keyboard.• Response time should be short. (few seconds) Users are given illusion that he is using the whole system.

Page 12: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Desktop (PC) Systems• Personal computers

– computer system dedicated to a single user.

• I/O devices – keyboards, mice, display screens, personal printer– (from old system’s card readers, shared line printers)

• Goal change:– From Maximum hardware utilization– To User convenience and responsiveness.

• Do not need protection (Single user system)– Among users– Among user and system (minimum system is in ROM)Vulnerable to worm, virus, etc.

• PC operating systems (Windows, Mac OS, Linux)

Page 13: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Parallel Systems• Multiprocessor system: Many CPU’s 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 (# of jobs / second)– Economical – Increased reliability

• graceful degradation• fail-soft systems (fault tolerance – fault avoidance) fault

error – fault

Page 14: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Parallel Systems (Cont.)• Symmetric multiprocessing (SMP)

– Each processor runs 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 allocates work to slave processors.– More common in extremely large systems

Page 15: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Symmetric Multiprocessing Architecture

Page 16: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Real-Time Systems• Eg: missile control, medical equipment control system.

sensor system computer control

• Rigid response time requirement (milli-seconds)• Deadline -- either hard or soft real-time.

– Hard– Soft , robot arm control

Page 17: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Real-Time Systems (Cont.)• Hard real-time:– Secondary storage limited or absent– (disk access time is not predictable)– data stored in memory

– general-purpose operating systems.• Timesharing Systems

• Soft real-time– Limited utility in industrial control of robotics– Useful in some applications (multimedia, virtual reality) .

Page 18: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Distributed Systems• Distribute the computation among several physical processors.• 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.

• Advantages of distributed systems.– Resources Sharing– illusion that there is only one OS– Computation speed up – load sharing – Reliability– Communications

Page 19: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Distributed Systems (cont)• Requires networking infrastructure.

– Local area networks (LAN) or Wide area networks (WAN)

• Network Operating System– distributed system– Each node (processor + OS) is autonomous– Aware of network

Page 20: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

General Structure of Client-Server

Page 21: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Clustered Systems• Clustering allows two or more systems to share storage.• Provides high reliability.

• Asymmetric clustering: – one server runs the application while other servers standby.

• Symmetric clustering: – all N hosts are running the application.

Page 22: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Handheld Systems

• Personal Digital Assistants (PDAs)• Cellular telephones• Issues:

– Limited memory– Small display screens– Limited power– Slow processors

Page 23: Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.

Computing Environments

• Traditional computing• Web-Based Computing• Embedded Computing