Presentation is loading. Please wait.

Presentation is loading. Please wait.

Winter 2005 CMPE 151: Network Administration Lecture 2.

Similar presentations


Presentation on theme: "Winter 2005 CMPE 151: Network Administration Lecture 2."— Presentation transcript:

1 Winter 2005 CMPE 151: Network Administration Lecture 2

2 Winter 2005 Review? Computers Operating Systems Kernels Distributed Systems

3 Winter 2005 What is an OS? Machine/resource manager. Physical Devices Microarchitecture Instruction Set Architecture Operating System Compilers, Editors, etc. Hardware Application programs

4 Winter 2005 OS as extended machine… Top-down view. Layer of software that hides hardware. Provides programmer easier instructions. E.g., read block from file. (Part of) the OS runs in supervisor (privileged) mode: can execute priviledged instructions (e.g., access to physical decices through drivers).

5 Winter 2005 OS as resource manager Bottom-up view. Provides orderly and controlled allocation of resources. Provides (“concurrent”) programs (fair) access to resources (processor, disk, printer). Time (e.g., CPU) and space (e.g., memory) multiplexing.

6 Winter 2005 OS History

7 Winter 2005 First generation: 1945-1955 Vacuum tubes: machines took whole rooms! Machine language programming (plugboard wiring). No OS.

8 Winter 2005 Second generation: 1955-1965 Transistors made computers commercially viable. Builders, operators, users. Mainframes: multimillion dollar machines. Punch cards, input and output tapes. Batch systems.

9 Winter 2005 Third generation: 1965-1980 ICs. Multiprogramming. Machine shared by “concurrent” programs. Memory partitions hold multiple jobs. Timesharing. Multiprogramming still batch processing: scientific computation and commercial data processing. Cheap terminals: interactive use. Interactive service + batch processing.

10 Winter 2005 Fourth generation: 1980-… High-scale circuit integration. Computer miniaturization. Mainframes -> minicomputers -> microcomputers or PCs. PC OSs: CP/M, DOS, MS-DOS. GUI-based OSs: UNIX-based, MS Windows-based, MAC OS, …

11 Winter 2005 Modern OSs Mainframe OSs: IBM’s OS/390, DEC’s VMS. Server OSs: Solaris, FreeBSD, etc. PC OS: Linux, MacOS, Windows… Real-time OSs: VxWorks. Embedded OSs: Linux, PalmOS, Windows CE Smart card OSs

12 Winter 2005 Basic OS Concepts

13 Winter 2005 Processes Process: program in execution. Address space: memory usable by program (text, data, stack). State: registers. OS uses process table to keep track of processes. Processes can create other (child) processes.

14 Winter 2005 Inter-Process Communication (IPC) Shared memory. Processes communicate/synchronize through a shared data item. Message passing. Processes communicate via messages.

15 Winter 2005 Shared Memory Processes must access shared data in a mutual exclusive way. Primitives: Semaphores: Dijkstra(1965) P(S) and V(S) operations. Atomic (indivisible) operations. (Conditional) Critical Regions Monitors

16 Winter 2005 Message Passing Processes communicate/synchronize by sending/receiving messages. Primitives: Send(message), receive(message). Issues: Synchronous versus asynchronous. Reliable versus unreliable.

17 Winter 2005 Distributed Shared Memory Sharing data among computers that don’t share physical memory. DSM provides shared memory abstraction. Read- and write-like primitives. Needs message passing to convey updates among physically disjoint processing elements.

18 Winter 2005 Deadlocks Shared data/resource may lead to deadlock: processes get “stuck”. Example: v is using r1 and requests r2; w is using r2 and requests r1. vw

19 Winter 2005 Memory Management Share memory among several processes. Monoprogramming: memory sharing between OS and program (embedded OSs). Multiprogramming: multiple processes (partially or totally) in memory. Swapping. Virtual memory: paging.

20 Winter 2005 I/O OS I/O subsystem manages I/O devices. Device-dependent (device drivers) or independent. File system: File as an abstraction. Basic operations: create, delete, read, write. Hierarchical file systems. Dynamically attach tree branches (e.g., mount system call in UNIX). Access control: permissions.

21 Winter 2005 System Calls Interface between OS and user program: set of system calls. E.g., access a file, create a process, etc. Like making a special procedure call. System calls executed by kernel. Calling program pushes parameters onto stack; calls library; library routine (same name as system call) executes TRAP, switching to kernel mode; OS handles call; returns control to library; library returns to user program. Example system calls for file system open, close, read, write, mkdir, rmdir.

22 Winter 2005 System Calls User-level process Kernel Physical machine System call to access physical resources System call: implemented by hardware interrupt (trap) which puts processor in supervisor mode and kernel address space; executes kernel-supplied handler routine (device driver) executing with interrupts disabled.

23 Winter 2005 Kernels Executes in supervisor mode. Privilege to access machine’s physical resources. User-level process: executes in “user” mode. Restricted access to resources. Address space boundary restrictions.

24 Winter 2005 Kernel Functions Memory management. Address space allocation. Memory protection. Process management. Process creation, deletion. Scheduling. Resource management. Device drivers/handlers.

25 Winter 2005 Kernel and Distributed Systems Inter-process communication: RPC, MP, DSM. Distributed (Networked) File systems. Some parts may run as user-level and some as kernel processes.


Download ppt "Winter 2005 CMPE 151: Network Administration Lecture 2."

Similar presentations


Ads by Google