Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction Chapter 1 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.

Similar presentations


Presentation on theme: "1 Introduction Chapter 1 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5."— Presentation transcript:

1 1 Introduction Chapter 1 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5 Operating system concepts 1.6 System calls 1.7 Operating system structure

2 2 Introduction A computer system consists of –hardware –system programs –application programs

3 3 What is an Operating System It is an extended machine –Hides the messy details which must be performed –Presents user with a virtual machine, easier to use It is a resource manager –Each program gets time with the resource –Each program gets space on the resource

4 4 History of Operating Systems First generation 1945 - 1955 –vacuum tubes, plug boards Second generation 1955 - 1965 –transistors, batch systems Third generation 1965 – 1980 –ICs and multiprogramming Fourth generation 1980 – present –personal computers

5 5 Batch Operating System 2 nd generation Structure of a typical FMS (Fortran Monitor System) job

6 6 Batch OS speed-up a.bring cards to 1401 b.read cards to tape c.put tape on 7094 which does computing d.load 7094 with system tape e.put result tape from 7094 to 1401 f.1401 prints output Early batch system

7 7 Multiprogramming System 3 rd generation Timesharing on modified 7094 CTSS (Compatible Time Sharing System) MIT 1962 followed by MULTIX 1972 (MULTiplexed Information and Computing Service) on GE-645 mainframe, followed by Bell Labs stripped down version called UNIX. To use (expensive) CPU during Intensive I/O one needs many jobs ready to run (in memory). So when Job1 needs I/O CPU waiting for data in/out (spooling – Simultaneous Peripheral Operation On Line) Job 2 can run by CPU, or Job3 etc. Consequence: short jobs wait disproportional time to finish due to the long jobs. With multi-users on-line terminals the short jobs wait long. Solution is time sharing.

8 8 Batch (multiprogramming and time sharing) vs. Multiuser CPU disk I/O submitted jobs (spooling) diskfinished jobs time slice a. Multiprogramming b. Timesharing - CTSS CPU disk I/O submitted jobs diskfinished jobs c. Multiuser - UNIX Main frame Video terminal Video terminal Video terminal Video terminal

9 9 The Operating System Zoo Mainframe operating systems Server operating systems Multiprocessor operating systems Personal computer operating systems Real-time operating systems Embedded operating systems e.g. PDA (Personal Digital Assistant) Smart card operating systems (credit cards containing CPU chip)

10 10 Personal Computers: 4-th generation 1974 Intel 8080 made first CPU on a chip asked its consultant Gary Kildall operating system to test it. Kildall hooked Shugart Associates floppy disk to it and wrote first CP/M operating system for this PC. Kildall formed Digital Research company with rights to sell CP/M. For 5 years they rewrote it for other CPUs like Zilog Z80 with many application programs on it. In early 1980 IBM searched for OS for its PC. They contacted Bill Gates for OS and he suggested Digital Research. Kildall didn’t want to sell to non-end user like IBM. IBM asked Bill Gates to write OS for them. Bill approached Seattle Computer Products that had DOS (Disk Operating System) and bought a license for U$ 50,000 and delivered it as MS-DOS (from his Microsoft company). 1983 IBM released PC with Intel 80286 and Microsoft delivered MS-DOS. Later Microsoft incorporated many features of Unix -> Xenix. 1984 Xerox changed CLI (Command Language Interface) to GUI (Graphical User Interface) invented by Doug Engelbart at Stanford Research Institute 1960. 1988 Steve Jobs co-inventor of Apple (first PC) visited Xerox and applied GUI to Apple OS in PC called Macintosh. 1995 Microsoft followed Apple and built Windows i.e. MS-DOS with GUI. Windows 95, 98, NT -> 2000, Millenium,

11 11 Computer Hardware Review (1) Components of a simple personal computer Monitor Bus

12 12 Computer Hardware Review (2) Specialized Execution units: one for integer arithmetic, one for floating point arithmetic one for Boolean operations, with two parallel instruction fetch. Most CPU have kernel (supervisor or privileged) mode and user mode controlled by bit in PSW. A three-stage pipeline A superscalar CPU

13 13 Computer Hardware Review (3) Typical memory hierarchy (numbers shown are rough approximations)

14 14 Computer Hardware Review (4) Structure of a disk drive

15 15 Single user vs. multi-user memory map Memory allocation using base registers. Base-limit pair and two base-limit pairs

16 16 I/O devices and interrupt (a) Steps in starting an I/O device and getting interrupt (b) How the CPU serves an interrupt. (a) (b)

17 17 Structure of a large Pentium system IDE - Integrated Drive Electronics ISA - Industry Standards Associate 16.67 MB/s PCI – Peripheral Component Interconnect 528 MB/s USB – Universal Serial Bus 1.5 MB/s SCSI – Small Computer System Interface 160 MB/s (fast disks etc.)

18 18 Process Tree A created two child processes, B and C B created three child processes, D, E, and F Every process has a process identifier (integer) called PID (process identifier).

19 19 Memory map of a process Processes have three segments: text, data, stack

20 20 Batch multiprogramming OS Card reader Disk Line printer Video memory Console CPU Main memory Card reader Input spooler output spooler disk executive Line printer a. Computer infrastructure. b. OS processes. software processes hardware processes (drivers)

21 21 States of a user job in a batch system in input spooler spooling complete execution complete in output spooler ready blocked in the executive running

22 22 Unix as multiuser OS Main frame Video terminal Video terminal Video terminal Video terminal Init { for (i=1; i=no_of_terminals; i++) { If (fork()!=0) { wait /*parent*/ else exec(getty, param, ttyn) } getty { prompts login checks name and password if ok spawns a shell }

23 23 Stripped down shell while (TRUE) {/* repeat forever */ type_prompt( );/* display prompt */ read_command (command, parameters)/* input from terminal */ if (fork() != 0) {/* fork off child process */ /* Parent code */ waitpid( -1, &status, 0);/* wait for all children to exit */ } else { /* Child code */ execve (command, parameters, 0);/* execute command */ }

24 24 Process interact: client-server model

25 25 Two processes connected by a pipe > ls fred billie doug jeneanne > ls | grep d fred doug grep (global regular expression print) prints lines with “expression” in it.

26 26 Four way stop - deadlock example (a) A potential deadlock. (b) an actual deadlock. Process 1: Print on Lp Open file Process 2: Open file Print on Lp Example:

27 27 OS as a file system manager Every process has a working directory. File must be opened when system returns small integer called file id or I-number in Unix.

28 28 Unix device mounting Unix does not allow device to be specified by drive name (like DOS example A: etc.). MOUNT system call inserts I/O device files into any regular directory. I/O devices look like special files kept in /dev directory (example: /dev/lp). a)Before mounting files on floppy are inaccessible. b)After mounting floppy on b, files on floppy are part of file hierarchy.

29 29 Mount System Call mount(“/dev/fd0”, “/mnt”, 0) where 3-rd parameter is read-write or read-only. File system before the mount File system after the mount

30 30 File linking (same file under two names) (a) Two directories before linking (memo as note) link(“/usr/jim/memo”, “usr/ast/note”) (b) The same directories after linking.

31 31 Simple structuring model for a monolithic system Main program calls service procedures (by systems calls) that calls utility procedures in kernel mode (using Traps). (kernel mode)

32 32 Steps in Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes)

33 33 Some System Calls For Process Management

34 34 Some System Calls For File Management lseek returns pointer to the position in a file with fd=file descriptor pointer, offset (bytes), whence is either from beginning of a file, current position, or end of the file.

35 35 Some System Calls For Directory Management

36 36 Some System Calls For Miscellaneous Tasks

37 37 System Calls Unix vs. Windows Some Win32 API (Application Program Interface) calls

38 38 Structure of the THE operating system

39 39 Structure of VM/370 with CMS CMS – Conversational Monitor System

40 40 The client-server model in a distributed system

41 41 The metric prefixes


Download ppt "1 Introduction Chapter 1 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5."

Similar presentations


Ads by Google