Top Banner
What does an Operating System do? Jonathan Geisler February 5, 2007 Jonathan Geisler What does an Operating System do?
36

What does an Operating System do?

Jan 16, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: What does an Operating System do?

What does an Operating System do?

Jonathan Geisler

February 5, 2007

Jonathan Geisler What does an Operating System do?

Page 2: What does an Operating System do?

Perspectives on an OS

There are three perspectives on an OS:

1 The user is concerned with the services it provides.

2 The programmer is concerned with the interfaces it provides.

3 The designer is concerned with the internal components andtheir interconnections.

Jonathan Geisler What does an Operating System do?

Page 3: What does an Operating System do?

Perspectives on an OS

There are three perspectives on an OS:

1 The user is concerned with the services it provides.

2 The programmer is concerned with the interfaces it provides.

3 The designer is concerned with the internal components andtheir interconnections.

Jonathan Geisler What does an Operating System do?

Page 4: What does an Operating System do?

Perspectives on an OS

There are three perspectives on an OS:

1 The user is concerned with the services it provides.

2 The programmer is concerned with the interfaces it provides.

3 The designer is concerned with the internal components andtheir interconnections.

Jonathan Geisler What does an Operating System do?

Page 5: What does an Operating System do?

Services Provided

User interface (CLI vs. GUI)

Run programs

I/O

Access to files

Networking

Error handling

Protection & Security

Accounting

Managing resources

Jonathan Geisler What does an Operating System do?

Page 6: What does an Operating System do?

Interfaces Provided (i.e., system calls)

This is how a program asks the OS to perform a specific service.Think back to chapter one, how do they work? Notice how manycalls were in the simple example from the book. This requiresthem to be done very efficiently.

Jonathan Geisler What does an Operating System do?

Page 7: What does an Operating System do?

Typical system calls

This is a list of the type of system calls you would expect to find inmost OSes:

end

abort

create process

get/set process attributes

wait

signal

date/time

open

read

write

get/set file attributes

close

acquire resource

create connection

Jonathan Geisler What does an Operating System do?

Page 8: What does an Operating System do?

Interesting system calls

Every operating system has its share of common system calls. Hereare a couple unique ones that you may not have thought aboutbefore:

Trace can allow profiling programs to run or strace on Linux

Step allows debugging programs to work

Terminate and Stay Resident allows MS-DOS to fakemultitasking

Jonathan Geisler What does an Operating System do?

Page 9: What does an Operating System do?

Interesting system calls

Every operating system has its share of common system calls. Hereare a couple unique ones that you may not have thought aboutbefore:

Trace can allow profiling programs to run or strace on Linux

Step allows debugging programs to work

Terminate and Stay Resident allows MS-DOS to fakemultitasking

Jonathan Geisler What does an Operating System do?

Page 10: What does an Operating System do?

Interesting system calls

Every operating system has its share of common system calls. Hereare a couple unique ones that you may not have thought aboutbefore:

Trace can allow profiling programs to run or strace on Linux

Step allows debugging programs to work

Terminate and Stay Resident allows MS-DOS to fakemultitasking

Jonathan Geisler What does an Operating System do?

Page 11: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 12: What does an Operating System do?

Components and Interconnections

Components

Management

Process

MemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 13: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemory

FileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 14: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFile

I/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 15: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/O

Storage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 16: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 17: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 18: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 19: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 20: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 21: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularity

Cons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 22: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 23: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 24: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &security

Cons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 25: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 26: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 27: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiency

Cons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 28: What does an Operating System do?

Components and Interconnections

Components

Management

ProcessMemoryFileI/OStorage

Networking

Protection &Security

CommandInterpreter

Interconnection types

Layered (OS/2)

Pro: modularityCons: dependencies & efficiency

Microkernel (Mach, WinNT, Mac OS X,etc.)

Pros: extendibility, portability, &securityCons: efficiency

Whatever works (Linux, WinXP, etc.)

Pro: run-time efficiencyCons: modularity & extendibility

Jonathan Geisler What does an Operating System do?

Page 29: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling processNon-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 30: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling process

Non-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 31: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling processNon-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 32: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling processNon-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 33: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling processNon-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)

Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 34: What does an Operating System do?

Example system callStarting a new process

This is the bulk of your second lab! There are two distinct ways tostart a new process:

1 “MS-DOS” way

Like a function call in that the called process returns directlyto the calling processNon-multitasking

2 “UNIX” way

Start a new process and let it set up communication channelswith its parent (if it feels like it)Both starter and started processes run concurrently

Jonathan Geisler What does an Operating System do?

Page 35: What does an Operating System do?

Separating mechanism & policy

The book states that these two should be separated wheneverpossible. That sounds like a good idea, but how does that work?Lets use the process scheduler for a concrete example.

Jonathan Geisler What does an Operating System do?

Page 36: What does an Operating System do?

Virtual machines

IBM

Initial leaders in this field developing VMRuns Linux this way on big mainframes

VMWare

Xen

bochs

User Mode Linux

Java

Jonathan Geisler What does an Operating System do?