CH 2
CH 2
Memory layout
mainframe system
Input is given by the punch cards and
output will also appear on the punch cards
OS was very simple always present in the
memory
Major task is to transfer control from one
job to another
Mainframe System Layout
CPU
I O
N U
P T
U P
T U
T
Disadvantage
Very slow
CPU idle
No user interaction
Batch Operating System
File management
◦ create file, delete file
◦ open, close file
◦ read, write, reposition
◦ get and set file attributes
Device management
◦ request device, release device
◦ read, write, reposition
◦ get device attributes, set device attributes
◦ logically attach or detach devices
Types of System Calls (Cont.)
Information maintenance
◦ get time or date, set time or date
◦ get system data, set system data
◦ get and set process, file, or device attributes
Communications
◦ create, delete communication connection
◦ send, receive messages if message passing
model to host name or process name
From client to server
◦ Shared-memory model create and gain
access to memory regions
◦ transfer status information
◦ attach and detach remote devices
Types of System Calls (Cont.)
Protection
◦ Control access to resources
◦ Get and set permissions
◦ Allow and deny user access
Examples of Windows and Unix System Calls
System Programs
System programs provide a convenient environment
for program development and execution. They can
be divided into:
◦ File manipulation
◦ Status information sometimes stored in a File
modification
◦ Programming language support
◦ Program loading and execution
◦ Communications
◦ Background services
◦ Application programs
Mostusers’ view of the operation system is defined
by system programs, not the actual system calls
System Programs
Providea 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 generally manipulate files and
directories
Status information
◦ Some ask the system for info - date, time, amount of
available memory, disk space, number of users
◦ Others provide detailed performance, logging, and
debugging information
◦ Typically, these programs format and print the output to
the terminal or other output devices
◦ Some systems implement a registry - used to store and
retrieve configuration information
System Programs (Cont.)
File modification
◦ Text editors to create and modify files
◦ Special commands to search contents of files or perform
transformations of the text
Programming-language support - Compilers,
assemblers, debuggers and interpreters sometimes
provided
Program loading and execution- Absolute
loaders, relocatable loaders, linkage editors, and
overlay-loaders, debugging systems for higher-
level and machine language
Communications - Provide the mechanism for
creating virtual connections among processes,
users, and computer systems
◦ Allow users to send messages to one another’s screens,
browse web pages, send electronic-mail messages, log
in remotely, transfer files from one machine to another
System Programs (Cont.)
Background Services
◦ Launch at boot time
Some for system startup, then terminate
Some from system boot to shutdown
◦ Provide facilities like disk checking, process
scheduling, error logging, printing
◦ Run in user context not kernel context
◦ Known as services, subsystems, daemons
Application programs
◦ Don’t pertain to system
◦ Run by users
◦ Not typically considered part of OS
◦ Launched by command line, mouse click, finger
poke
Operating System Design and
Implementation
Design and Implementation of OS not “ solvable” , but
some approaches have proven successful
Internalstructure of different Operating Systems can
vary widely
Design Goals