csc 360- instructor: k. wu os structures. csc 360- instructor: k. wu agenda 1.os design and...

11
CSC 360- Instructor: K. Wu OS Structures

Upload: sherman-wilkerson

Post on 18-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu

OS Structures

Page 2: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu

Agenda

1. OS design and implementation

2. Simple structure

3. Layered structure

4. Microkernels

5. Modular structure

Page 3: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 3

1. OS design and implementation

An art of balance

– hardware vs software

• efficiency vs flexibility

– user vs system

• convenience vs effectiveness

General design guidelines

– separation of mechanisms and policies

Best current practices

Page 4: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 4

2. Simple Structure (1)

E.g., MS-DOS

– single user

– almost single process

• direct access

– almost flat memory

• MZ linked list

– executables

• .COM: segment limit

• .EXE: MZ file magic

Page 5: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 5

2. Simple structure (2) MS-DOS

Load program

– “shrink” interpreter

– make room for program

Execute program

– access to everywhere

– even “kernel”/interpreter

Reload interpreter back

– otherwise, “cannot find command.com…”

Page 6: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 6

3. Layered structure (1)

Layers

– L0: hardware

– LN: user interface

– Li: anything in btw

• use Li-1 service

• offer service to Li+1

Divide & conquer

Cross-layer issues

Page 7: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 7

3. Layered structure (2) Unix

Hybrid structure

Page 8: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 8

4. Micro-kernel structure

E.g.

– Mach

Smaller kernel

– only those “essentials”

– e.g., handle hardware

More by system/application programs

– message passing

Overhead between kernel and user spaces

file client file server

kernel

Page 9: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 9

5. Modular structure (1)

Object-oriented methodology– not necessary implemented in OO languages

– popular choices for modern OS, e.g., Linux

– e.g., insmod fat|vfat|msdos

On-demand, loadable kernel modules– each module is a separate function/support

– communicate through know kernel interface

– module dependency

Page 10: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 10

5. Modular structure (2): Mac OS X

Mach (CPU,memory) + BSD (file,network)

Page 11: CSC 360- Instructor: K. Wu OS Structures. CSC 360- Instructor: K. Wu Agenda 1.OS design and implementation 2.Simple structure 3. Layered structure 4.Microkernels

CSC 360- Instructor: K. Wu CSc 360Overview 11

5. Modular structure (3): SunOS SolarisModular design (high-level diagram)