22
240-323 part I,2 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut epartment of Computer Engineering, PSU Wannarat Suntiamorntu

240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

Embed Size (px)

Citation preview

Page 1: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

1

240-323, Part I Introduction to Operating

SystemsFirst Semester, Year 2000

Wannarat Suntiamorntut

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Page 2: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

2

Department of Computer Engineering, PSU Wannarat SuntiamorntutOperating System Concepts

* Intermediary between a user and computer hardware

* Make computer system convenient to use

* Computer hardware in an efficient manner

Page 3: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

3

Department of Computer Engineering, PSU Wannarat SuntiamorntutWhat is an Operating System?

H

hardware

users

operating systems

Compiler Assembler text editor ... databaseapplication programs

Page 4: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

4

Department of Computer Engineering, PSU Wannarat SuntiamorntutWhat is an Operating System?

* Government* Resource allocator

- CPU time, Memory space, file storage space, I/O device, network- de-allocate those resources

* Virtual machine * Multiplexor , sharing of resource and protection* Provider of service provide common subroutines forprogrammer (window system, memory management)* Always run/load & embedded, usually called Kernel

Page 5: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

5

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Why do we need an Operating System?

• User viewpoint

• Program environment viewpoint

• Efficiency viewpoint

• Economic viewpoint

Page 6: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

6

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Services provide by OS

• Program creation

• Program execution

• Access to I/O devices

• Controlled access to files

• Error detection and response

– hardware errors (e.g., memory error, device failures)

– software errors (e.g., overflow, out of memory boundary)

• Accounting

– collect usage statistics, monitor performance

Page 7: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

7

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Typical services

• CPU scheduling: allocate computing time among several processes

• Memory management: allocate main memory among several processes

• Swapping: move processes and their data between main memory and secondary storage

• I/O device drivers: specialized code required to operate I/O devices

• File system: organize mass storage (disk) into files and directories

Page 8: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

8

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Typical services

• Utilities: date/time, accounting, file copy, etc.• Command interpreter: allow users to enter commands interactively• System calls: allow user programs access to O.S. services• Protection: keep processes from interfering with each other and system • Communication & Resource sharing: allow users/processes to communicate (over networks) and share resources (e.g. laser printers, disks, etc.)• Security: protect machines from intruders, worms and viruses

Page 9: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

9

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Simple Batch Systems

• Turnaround = delay between job submission and job completion

• Spooling = Simultaneous Peripheral Operation on-line , as same as, large buffer. This systems use first-come,first serve algorithm.

UserProgram

Area

OS

Page 10: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

10

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Multiprogrammed Batched Systems

OS

Job 1

Job 2

Job 3

Job 4

• Job scheduling switch process to execute, concern with memory management, process & device scheduling.

Page 11: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

11

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Time-Sharing Systems

• Multitasking Multiple jobs are executed by the CPU switching.

• Interactive (hand-on)Provides online communication between the user

and system.

Time-shared OS allows many users to share computers simultaneously.

Page 12: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

12

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Brief History of Operating Systems

• 1940's -- First Computers• 1950's -- Batch Processing• 1960's -- Multiprogramming (timesharing)• 1970's -- Minicomputers & Microprocessors• Late 1970's, 1980's -- Networking, Distributed

Systems, Parallel Systems• 1990's and Beyond -- PC’s, WWW, Mobile

Systems

Page 13: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

13

Department of Computer Engineering, PSU Wannarat Suntiamorntut

1940’s ... First Computers

• Computer dedicated to one user/programmer at a time. Program loaded manually by programmer, using console switches. Debugging using console lights.

• Advantages:

– Interactive (user gets immediate response)

• Disadvantages:

– Expensive machine idle most of time, because people are slow.

– Programming & debugging are tedious.

– Each program must include code to operate peripherals -- error prone, device dependencies.

Page 14: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

14

Department of Computer Engineering, PSU Wannarat Suntiamorntut

1950’s ... Batch Processing

• User/programmer submits a deck of cards that describes a job to be executed.

• Jobs submitted by various users are sequenced automatically by a resident monitor.

• Tape drives available for batching of input and spooling of output.

• Advantages:

– Computer system is kept busier.

• Disadvantages:

– No longer interactive; longer turnaround time.

– CPU is still idle for I/O-bound jobs.

Page 15: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

15

Department of Computer Engineering, PSU Wannarat Suntiamorntut1960’s ... Multiprogramming

(Timesharing)• The advent of the I/O processor made simultaneous I/O and CPU processing possible.

• CPU is multiplexed (shared) among a number of jobs -- while one job waiting for I/O, another can use CPU.

• Advantages:

– Interactiveness is restored.

– CPU is kept busy.

• Disadvantages:

– Hardware and O.S. required become significantly more complex.

Page 16: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

16

Department of Computer Engineering, PSU Wannarat Suntiamorntut

1970’s ... Minicomputer & Microprocessor

• Trend toward many small to mid-range personal computers,

rather than a single mainframe.

• Early minicomputers and microprocessors were small, so there

was some regression to earlier OS ideas.

– e.g. DOS on PC is still essentially a batch system similar to

those used in 1960, with some modern OS ideas thrown in

(e.g., hierarchical file system).

• This trend is changing rapidly because of powerful new

microprocessors.

• Also, the user interface became more important.

Page 17: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

17

Department of Computer Engineering, PSU Wannarat Suntiamorntut

• Powerful workstations

• Local area networks (Ethernet) and long-distance network (Arpanet)

• Networks organized with clients and servers

• Decentralization of computing requires more communication (e.g., resource sharing)

• O.S. issues -- network communication protocols, data encryption, security, reliability, consistency of distributed data

Late 1970’s, 1980’s .. Networking

Page 18: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

18

Department of Computer Engineering, PSU Wannarat Suntiamorntut

• Parallel Computing (tera-flops)

• High-speed, long-distance communication links to send large

amounts of data, including graphical, audio and video

• Electronic notebooks using wireless communication technologies

• World Wide Web

• Multimedia computers, powerful personal computers

• O.S. issues - Large heterogeneous systems, mobile computing.

1990’s and Beyond

Page 19: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

19

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Parallel Systems• Multiprocessor Systems (more than one processor)

• Advantage are- Increased throughput - work done in short time period - reliability

Page 20: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

20

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Distributed Systems• Distributed computation among several processors.• Each processors communicates with high speed buses, Telephone line.• Reason for building distributed systems : - resource sharing - computation speed up - Reliability - Communication

Page 21: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

21

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Real - Time Systems• Hard real-time system

- Industrial control- Robotics- undersea exploration (Titanic) - Planetary

• Soft real-time system

Page 22: 240-323 part I,2000 1 240-323, Part I Introduction to Operating Systems First Semester, Year 2000 Wannarat Suntiamorntut Department of Computer Engineering,

240-323 part I,2000

22

Department of Computer Engineering, PSU Wannarat Suntiamorntut

Next Class

Discussion in “Computer System Structures”

(Lesson 2 in Text Book)