Professional Documents
Culture Documents
Course 1: Review
OS Facets
OS as illusionist:
Make hardware limitations go away
Provide illusion of dedicated machine with infinite memory and
infinite processors
OS as government:
Protect users from each other
Allocate resources efficiently and fairly
OS as complex system:
Constant tension between simplicity and functionality or
performance
OS as history teacher
Learn from past
Adapt as hardware tradeoffs change
2.2
2.3
2.4
Objectives
To describe the services an operating system provides to users,
2.5
2.6
User interface - Almost all operating systems have a user interface (UI)
I/O operations - A running program may require I/O, which may involve
a file or an I/O device.
2.7
May occur in the CPU and memory hardware, in I/O devices, in user
program
2.8
Another set of OS functions exists for ensuring the efficient operation of the
system itself via resource sharing
Accounting - To keep track of which users use how much and what kinds
of computer resources
2.9
2.10
2.11
2.12
System Calls
2.13
System Calls
Programming interface to the services provided by the OS
Typically written in a high-level language (C or C++)
Mostly accessed by programs via a high-level Application
(Note that the system-call names used throughout this text are
generic)
2.14
file
2.15
Consider the ReadFile() function in the Win32 APIa function for reading
from a file
LPVOID buffera buffer where the data will be read into and written
from
2.16
and returns status of the system call and any return values
The caller need know nothing about how the system call is
implemented
2.17
2.18
2.19
system call
Exact type and amount of information vary according to OS
and call
Three general methods used to pass parameters to the OS
Simplest: pass the parameters in registers
In some cases, may be more parameters than registers
Parameters stored in a block, or table, in memory, and address
of block passed as a parameter in a register
This approach taken by Linux and Solaris
Parameters placed, or pushed, onto the stack by the program
and popped off the stack by the operating system
Block and stack methods do not limit the number or length of
parameters being passed
2.20
2.21
Device management
Load, execute
Request, release
End, abort
Information maintenance
File management
Get/set time/date
Get/set
process/file/device
attributes
Communications
Create, delete
Open, close
2.22
2.23
System Programs
2.24
System Programs
System programs provide a convenient environment for program
File manipulation
Status information
File modification
Communications
Application programs
2.25
System Programs
Some of them are simply user interfaces to system calls; others are
considerably more complex
File management - Create, delete, copy, rename, print, dump, list, and
generally manipulate files and directories
Status information
Some ask the system for info - date, time, amount of available memory,
disk space, number of users
Typically, these programs format and print the output to the terminal or
other output devices
2.26
2.27
2.28
2.29
will be done
2.30
Simple Structure
MS-DOS written to provide the most functionality in the least
space
2.31
2.32
Layered Approach
The operating system is divided into a number of layers (levels),
each built on top of lower layers. The bottom layer (layer 0), is the
hardware; the highest (layer N) is the user interface.
With modularity, layers are selected such that each uses functions
2.33
2.34
UNIX
UNIX limited by hardware functionality, the original UNIX operating
Systems programs
The kernel
2.35
2.36
passing
Benefits:
More secure
Detriments:
2.37
Mac OS X Structure
2.38
Modules
Most modern operating systems implement kernel modules
2.39
2.40
Virtual Machines
2.41
Virtual Machines
Software emulation of an abstract machine
2.42
virtual machines
Spooling and a file system can provide virtual card readers and
virtual line printers
2.43
Non-virtual Machine
Virtual Machine
2.44
resources since each virtual machine is isolated from all other virtual
machines. This isolation, however, permits no direct sharing of
resources.
A virtual-machine system is a perfect vehicle for operating-systems
2.45
VMware Architecture
2.46
2.47
2.48
End of Course 2