Operating System II
Operating System II
Operating System
Box Leangsuksun
www.latech.edu/~box
!
2.1!
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then
insert it again.
2.3!
Objectives!
To describe the services an operating system provides to users,
2.4!
interface (UI)!
2.5!
errors!
2.6!
2.7!
2.8!
2.9!
2.10!
2.11!
System Calls!
Programming interface to the services provided by the OS!
Typically written and used 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.12!
features/services !
Basic I/0!
Process control (creation, termination, execution)!
File operations and permission !
System status !
2.13!
file!
2.14!
and returns status of the system call and any return values!
The caller need know nothing about how the system call is
implemented!
2.15!
2.16!
2.17!
!
Midterm Exam April 10, 2014.!
2.18!
system call!
Exact type and amount of information vary according to OS and
call!
Three general methods used to pass parameters to the OS!
1.
2.
3.
2.19!
2.20!
2.21!
System Programs!
System programs provide a convenient environment for program
File manipulation !
Status information!
File modification!
Communications!
Application programs!
2.22!
System Programs!
Provide a convenient environment for program development and execution!
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
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.23!
2.24!
2.25!
will be done!
!
!
2.26!
2.27!
2.28!
Note:Concepts!
This picture
Operating System
Operating System Concepts!
Mac OS!
2.30!
Android!
2.31!
IOS!
2.32!
Window!
2.33!
Simple Structure !
MS-DOS written to provide the most functionality in the least
space!
2.34!
2.35!
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.36!
2.37!
UNIX!
UNIX limited by hardware functionality, the original UNIX operating
Systems programs!
The kernel!
! Consists
! Provides
2.38!
2.39!
passing!
Benefits:!
More secure!
Detriments:!
2.40!
Mac OS X Structure!
2.41!
Modules!
Most modern operating systems implement kernel modules!
2.42!
2.43!
Virtual Machines!
A virtual machine takes the layered approach to its logical
2.44!
virtual machines!
Spooling and a file system can provide virtual card readers and
virtual line printers!
2.45!
Non-virtual Machine!
Virtual Machine!
!
!
(a) Nonvirtual machine (b) virtual machine!
2.46!
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.47!
VMware Architecture!
2.48!
2.49!
2.50!
System Boot!
Operating system must be made available to hardware so
2.51!
Hardware Protection!
Dual-Mode Operation!
I/O Protection!
Memory Protection!
CPU Protection!
Operating System
Concepts!
2.52!
Dual-Mode Operation!
Sharing system resources requires
2.53!
Interrupt/fault!
monitor!
user!
set user mode!
Operating System
Concepts!
2.54!
I/O Protection!
All I/O instructions are privileged
instructions.!
Must ensure that a user program
Operating System
Concepts!
2.55!
Operating System
Concepts!
2.56!
Memory Protection!
Must provide memory protection at least for the
Operating System
Concepts!
2.57!
Operating System
Concepts!
2.58!
Operating System
Concepts!
2.59!
Hardware Protection!
When executing in monitor mode, the
Operating System
Concepts!
2.60!
CPU Protection!
Operating System
Concepts!
2.61!
The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then
insert it again.
End of Chapter 2!