OSSystemstructures_complete
OSSystemstructures_complete
O P E R AT I N G S Y S T E M S T R U C T U R E S
Operating System Services
User Operating System Interface
System Calls
registers.
A lock.
EXAMPLE: MS-DOS
Single-tasking.
Shell invoked when
system booted.
Simple method to run
program.
● No process created.
Single memory space.
Loads program into
memory, overwriting
all but the kernel.
Program exit -> shell At system running a
startup program
reloaded.
EXAMPLE: F R E E B S D
Unix variant.
Multitasking.
choice of shell.
Shell executes fork()
system call to
create process.
● Executes exec() to load
program into process.
● Shell waits for process to
terminate or continues
with user commands.
Process exits with:
● code = 0 – no error
● code > 0 – error code
TYPES OF SYSTEM C A L L S
System call is an interface between process &os.
File management
Device management
● request device, release device.
● read, write, reposition.
● get device attributes, set device attributes.
● logically attach or detach devices.
TYPES OF SYSTEM C A L L S
A process may need several resources to
execute – main memory, disk drives, access to
files, and so on.
The various resources controlled by the
operating system can be thought of as devices.
Information maintenance
● get time or date, set time or date.
● get system data, set system data.
● get and set process, file, or device attributes.
communication.
system.
The interfaes and levels of
functionality are not well
seprated.
It is a single programming
system(at a time only (one-
disadv))
Application programs are able to
● The kernel
C onsists everything below the system-call
of
interface and above the physical hardware.
P rovides file system, C P U scheduling,
memory
the management, and other operating-
system functions; a large number of functions
for one level.
MONOLITHIC STRUCTURE - UNIX
Taken in sum, that is an enormous amount of
functionality to be combined into one level.
This monolithic structure was difficult to
implement and maintain.
Sym programs
L AY E R E D A P P ROAC H
The operating system is divided into a number of layers
Benefits:
● It makes extending the operating system easier
without modifying the kernel.
● Portable from one hardware design to
a n o t h e r.
● More reliable (less code is running in kernel mode).
● More secure.
Disadvantage:
● P erformance of user space to kernel
overhead space
communication.
MODUL E S
Many modern operating systems
loadable kernel modules implement
approach. - uses object-oriented
Solaris loadable
modules
MODUL E S
layered system.
Aqua U I plus and a set of application environments
and services.
The Cocoa environment specifies an API for the
The Mac OS X
structure.
IOS
Apple mobile O S for iPhone, i Pa d
● Structured on Mac O S X , added functionality.
● Does not run O S X applications natively.
Also runs on different C P U architecture (ARM
vs. Intel)
● Cocoa Touch Objective-C API for developing apps.
● Media services layer for graphics, audio, video.
● Core services provides cloud computing, databases.
● Core operating system, based on Mac O S X kernel.