Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 106

Chapter 1 || Objectives: (CLO1)

Explain the operating systems environment.


1. Describe the definition of operating system
2. Identify the basic functions of operating system
3. Describe the various operating system structure:
a) Monolithic
b) Layered
c) Microkernel
d) Networked and distributed

CHAPTER 1: INTRODUCTION TO OPERATING SYSTEM


Learning Objectives: (CLO1)
4. Describe various architecture of operating systems
used in different platforms:
 single processor system, multiprocessor system,
clustered system
5. Identify various product of operating system:
 closed source system, open source system
6. Explain the following concepts in relation to
operating system:
 Multitasking, multiprogramming, time sharing, buffering,
spooling, caching

CHAPTER 1: INTRODUCTION TO OPERATING SYSTEM


Learning Objectives: (CLO1)
7. Describe the components of operating system:
 kernel, shell, file system.
8. Describe the interaction between applications and
the operating system by using graphical
representation.
9. Identify the different interfaces of operating
systems:
 command line, voice actuated, graphical user interface
(GUI), web form.
10. Describe the relationship between system calls and
Application Programming Interface (API)

CHAPTER 1: INTRODUCTION TO OPERATING SYSTEM


Describe the definition of operating
system
What is an Operating System?
 A program that acts as an intermediary between a
user of a computer and the computer hardware.
 Operating system goals:
 Execute user programs and make solving user problems
easier.
 Make the computer system convenient to use.
 Use the computer hardware in an efficient manner.
Computer System Structure
Computer system can be divided into four components
1. Hardware – provides basic computing resources
 CPU, memory, I/O devices
2. Operating system
 Controls and coordinates use of hardware among various
applications and users
3. Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
 Word processors, compilers, web browsers, database systems,
video games
4. Users
 People, machines, other computers
4 Components of a Computer System

User 1

Applicatio 2
n
Operating
3
System

Hardware 4
Operating System Definition
 OS is a resource allocator
 Manages all resources
 Decides between conflicting requests for efficient and fair
resource use
 OS is a control program
 Controls execution of programs to prevent errors and
improper use of the computer
Operating System Definition (Cont.)
 “The one program running at all times on the
computer” is the kernel.
 Everything else is either a system program (shipped
with the operating system) or an application program
Identify the basic functions of
operating system
Basic functions of operating system

Basic Functions
of OS

Permit file Computer Schedule Resources


Interface Security Manage Control
operations operation programs Usage

Program
Create Password Memory
execution

User Processor Input & output


Delete
accounts time devices

Edit

Rename

and more

11
Describe the various operating
system structure
Monolithic, Layered, Microkernel, Networked
and distributed
Operating System Structure
The operating system structure is divided into:
1. Monolithic
2. Layered
3. Microkernel
4. Networked and distributed
1. Monolithic Architecture
 The earliest and most common OS architecture.
 Every component of OS contained in the kernel and
can directly communicate with any other (i.e by using
function system call).
 The kernel typically executes with unrestricted
access to the computer system (refer to next
diagram)
Monolithic OS kernel architecture

Application User Space

Kernel Space
System Call Interface

MM- Memory management


Kernel
PS- Process scheduler
MM PS IPC FS
IPC- Interprocess communictaion
FS- File System
I/O Net . . . I/O- Input Output manager
Net- Network manager
Monolithic System
 A monolithic system is therefore characterized by
 1 source code
 1 program generated
 but… may contain concurrency
 In a monolithic architecture
 data is read into application memory
 data is manipulated
 reports may be output
 data may be saved back to the same source or
different
 Example of monolithic OS – OS/360, VMS ,Linux .
 Advantage-Highly efficient because direct
intercommunication between components.
 Disadvantages
 difficult to isolate the source of bug and other error.
 Particularly susceptible to damage from errant and
malicious code because all code executes
unrestricted access to the system.
Monolithic System
 This approach well known as
“The Big Mess” - there is no
structure.
 All kernel routines are together,
any can call any
 A system call interface (main
program, sys calls, utility
functions)
 Examples: Linux, BSD Unix,
Windows
 Pros
 Shared kernel space
 Good performance
 Cons
 No information hiding
 Inflexible
 Chaotic
 Difficult to understand
2. Layered Architecture
 To overcome the issue of monolithic architecture by
grouping components that perform similar functions
into layers.
 Each layer communicates exclusively with those
immediately above and below it.
 Lower-level layers provide services to higher-level
layer using interfaces that hide their implementation.
 Layer OS are more modular than monolithic OS
because the implementation of each layer can be
modified without requiring any modification to other
layers.
 Each component hides how it performs its job and
presents a standard interface that other components
can use to request its services.
 Modularity imposes structure and consistency on the
OS.
 In a layer approach, a user process’s request may
need to pass through many layer before it is
services.
 Performances degrades compare to monolithic
kernel.
 Layer kernel also susceptible to damage from errant
or malicious code because all layer has unrestricted
access to the system.
 Many of today’s OS including Windows XP and Linux
implement some level of layering.
Layers of the Operating System
A LAYERED STRUCTURE:
Example of Windows 2000.

System Services

Windows Security
VM Process
MGR Reference
Manager Manager
& GDI Monitor
IO
Graphics Manager
Device Windows 2000 Kernel
Drivers

Hardware Abstraction Layer (HAL)


 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 (operations) and
services of only lower-level layers.
 Hiding information at each layer
 E.g. level 1 is processor allocation, level 1
memory management, level 2
communication, level 3 I/O, etc.
 Examples: Layered System (6 layers), MS-
DOS (4 layers)
Pros
 Layered abstraction
 Separation of concerns, elegance
Cons
 Protection, boundary crossings
Virtual Machines
 A virtual machine takes the layered approach to
its logical conclusion. It treats hardware and the
operating system kernel as though they were all
hardware.
 A virtual machine provides an interface identical
to the underlying bare hardware.
 The operating system creates the illusion of
multiple processes, each executing on its own
processor with its own (virtual) memory.
3. Microkernel Architecture
 The advent of new concepts in OS design,
microkernel is aimed at migrating services of an
operating system out of monolithic kernel into user
level process.
 Divide the OS into several processes, each which
implements a single set of services
 - Example: I/O servers, memory server, process
server
 The micro-kernel architecture strives to take out of
the kernel as much functionality as possible, so as to
limit the code executed in privileged mode and to
allow easy modifications and extensions.
 The micro-kernel architecture allows us to build a
number of different operating systems all using the
same micro-kernel.
 Thus the efficiency of the transfer from user to kernel
mode and back must be very high.
 Components above microkernel communicate
directly with one another, although using message
that pass through the microkernel itself.
 Microkernel validate messages, passes them
between the components and grants access to
hardware.
 Example: C-DAC microkernel, Mach, Windows NT,
Chorus
4. Networked and Distributed Architecture
 Networked and distributed are being used in network
operating system.
 It enables process to access resources (e.g file) that
reside on other independent computers on a
network.
 The client computers in such a network request
resources-such as files and processor time and the
server respond with the appropriate resource.
 The Client/Server Model
is a form of distributed
computing where one
program (the Client)
communicates with
another program (the
Server) for the purpose
of exchanging
information.
Describe various architecture of operating
systems used in different platforms:

single processor system, multiprocessor


system, and clustered system.
Single-Processor Systems
 These systems range from PDAs to mainframes.
 On a single-processor system,
 there is ONE main CPU capable of executing a general-
purpose instruction set, including instructions from user
processes.
 Almost all systems have other special-purpose processors as
well.
 The special-purpose processors may come in the form of
device-specific processors, such as disk, keyboard, and
graphics controllers; or, on mainframes, they may come
in the form of more general-purpose processors, such as
I/O processors that move data rapidly among the
components of the system.
…Single-Processor Systems
 Special-purpose processors:
 Run a limited instruction set and do not run user processes.
 Sometimes managed by the operating system (the operating system
sends them information about their next task and monitors their status)
 For example, a disk-controller microprocessor receives a sequence
of requests from the main CPU and implements its own disk queue
and scheduling algorithm. This arrangement relieves the main CPU
of the overhead of disk scheduling. PCs contain a microprocessor in
the keyboard to convert the keystrokes into codes to be sent to the
CPU.
 In other systems or circumstances, special-purpose processors are
low-level components built into the hardware. The operating system
cannot communicate with these processors; they do their jobs
autonomously.
 The use of special-purpose microprocessors is common and does
not turn a single-processor system into a multiprocessor. If there is
only one general-purpose CPU, then the system is a single-
processor system.
Multiprocessor Systems
 Multiprocessor system is a kind of processing
system where two or more processors work together
to process more than one program at one time. It
helps the system to complete work in shorter period
of time.
 Also known as:
 parallel systems or
 tightly coupled systems).
 Such systems have two or more processors in close
communication, sharing the computer bus and
sometimes the clock, memory, and peripheral
devices.
… Multiprocessor Systems : Advantages
1. Increased throughput
By increasing the number of processors, we
expect to get more work done in less time. The
speed-up ratio with N processors is not N,
however; rather, it is less than N. When multiple
processors cooperate on a task, a certain amount
of overhead is incurred in keeping all the parts
working correctly. This overhead, plus contention
for shared resources, lowers the expected gain
from additional processors. Similarly, N
programmers working closely together do not
produce N times the amount of work a single
programmer would produce.
… Multiprocessor Systems : Advantages
2. Economy of scale
Multiprocessor systems can cost less than
equivalent multiple single-processor systems,
because they can share peripherals, mass
storage, and power supplies. If several
programs operate on the same set of data, it is
cheaper to store those data on one disk and to
have all the processors share them than to
have many computers with local disks and
many copies of the data.
… Multiprocessor Systems : Advantages
3. Increased reliability
If functions can be distributed properly among
several processors, then the failure of one
processor will not halt the system, only slow it
own. If we have ten processors and one fails,
then each of the remaining nine processors
can pick up a share of the work of the failed
processor. Thus, the entire system runs only 10
percent slower, rather than failing altogether.
… Multiprocessor Systems: Types
The multiple-processor systems in use today are
of two types.
1. Asymmetric Multiprocessing
Some systems use asymmetric multiprocessing, in
which each processor is assigned a specific task. A
master processor controls the system; the other
processors either look to the master for instruction or
have predefined tasks. This scheme defines a master-
slave relationship. The master processor schedules
and allocates work to the slave processors.
… Multiprocessor Systems: Types
2. Symmetric Multiprocessing (SMP)
The most common systems use symmetric
multiprocessing (SMP), in which each
processor performs all tasks within the
operating system. SMP means that all
processors are peers; no master-slave
relationship exists between processors.
… Multiprocessor Systems
 Figure 1.6 (next slide) illustrates a typical SMP architecture.
 An example of the SMP system is Solaris, a commercial version of
UNIX designed by Sun Microsystems.
 A Solaris system can be configured to employ dozens of processors,
all running Solaris.
 Benefit: Many processes can run simultaneously—N processes can
run if there are N CPUs—without causing a significant deterioration
of performance.
 Weakness: We must carefully control I/O to ensure that the data
reach the appropriate processor. Also, since the CPUs are separate,
one may be sitting idle while another is overloaded, resulting in
inefficiencies.
 Virtually all modern operating systems—including Windows,
Windows XP, Mac OS X, and Linux—now provide support for SMP.
… Multiprocessor Systems: Types
… Multiprocessor Systems
 The difference between symmetric and asymmetric
multiprocessing may result from either hardware or
software.
 Special hardware can differentiate the multiple
processors, or the software can be written to allow
only one master and multiple slaves.
 For instance, Sun's operating system SunOS
Version 4 provided asymmetric multiprocessing,
whereas Version 5 (Solaris) is symmetric on the
same hardware.
… Multiprocessor Systems
 A recent trend in CPU design is to include multiple
compute cores on a single chip (multiprocessor
chips).
 Two-way chips are becoming mainstream, while N-
way chips are going to be common in high-end
systems.
 Aside from architectural considerations such as
cache, memory, and bus contention, these multi-core
CPUs look to the operating system just as N
standard processors.
Clustered Systems
 A clustered system makes use of multiple CPU's to
complete a specific task. It consists of two or more
individual systems that are tied together and share the
same storage space. They are also closely attached
through a LAN network.
 Clustered system share storage and are closely linked
via a local-area network (LAN) or a faster interconnect.
 Like multiprocessor systems, clustered systems gather
together multiple CPUs to accomplish computational
work.
 Clustered systems differ from multiprocessor systems,
however, in that they are composed of two or more
individual systems coupled together.
… Clustered Systems
 Clustering is usually used to provide high-availability
service; that is, service will continue even if one or more
systems in the cluster fail.
 High availability is generally obtained by adding a level of
redundancy in the system.
 A layer of cluster software runs on the cluster nodes.
Each node can monitor one or more of the others (over
the LAN).
 If the monitored machine fails, the monitoring machine
can take ownership of its storage and restart the
applications that were running on the failed machine.
 The users and clients of the applications see only a brief
interruption of a service.
… Clustered Systems: Structure
 Clustering structure:
 Asymmetrically
 Symmetrically
… Clustered Systems: Structure
Asymmetric Clustering
 What is: one machine is in hot-standby mode while
the other is running the applications.
 The hot-standby host machine does nothing but
monitor the active server.
 If that server fails, the hot-standby host becomes the
active server.
… Clustered Systems: Structure
Symmetric Mode
 What is: two or more hosts are running applications,
and are monitoring each other.
 This mode is obviously more efficient, as it uses all
of the available hardware.
 It does require that more than one application be
available to run.
… Clustered Systems
Other forms of clusters include:
 parallel clusters and
 clustering over a wide-area network (WAN).
Multiprocessor vs Clustered Systems

Multiprocessor Clustered Systems

Multiprocessors are Individual systems


tied together are tied together
Anything similar to LAN networking
LAN is not required
Aim: time saving Aim: high availability
Identify various product of operating
system:
closed source system, and open
source system
Closed Source Software
developed
by a single
person or
company
Distributed Only the
directly to final product
end user or is made
via vendors available

Closed Source
Software
Have
copyright/ source
patented, code is
legally
protected as kept as
intellectual secret
property
i.e. Microsoft
Windows
and Office
Closed Source Software
 Weakness: Users have no idea how it was made. You
must accept the word of a software vendor for the quality
of their own product.
 Commercial vendors have, in theory, the resources to
respond very rapidly to severe reliability or security
problems in their software. They should be able to
provide manned contact points on a 24 by 7 basis. They
should be able analyse a problem and have a fix ready in
hours.
 It takes little to medium skills to find security holes in
closed source software. It takes very advanced reverse
engineering and assembly language skills to fix closed
source software. Often the license prohibits you from
modifying the product.
Open Source Software
Open Source Software
 Weakness: its supporters.
 Strength: Most open source projects are being
worked on by developers who do it for fun and in
their own time. Most projects have no funding or
financial support. There are often no official code
reviews or quality assurance processes in place.
 With the correct knowledge it is quite trivial to find
security problems in open source software. With the
correct knowledge, it becomes trivial to use this
information for evil purposes. With the correct
knowledge, it is quite trivial to fix these problems.
permits users to study permits users to change

Open Source
Software
License

permits users to distribute


improve the software.
copies
Closed Source vs Open Source
Comparison of Open Source Vs. Closed
Source Software

Closed Source Software Open Source Software


Developed by companies / Developed by volunteers who
developers who works for works for peer recognition.
economic purposes.
Users may suggest requirements Users may suggests additional
but they may or may not be features that often get
implemented implemented.
Release is not too often. There Software is released on a daily or
may be only yearly releases. weekly basis
Market driven. High security risk. Quality driven. Highly secure
Security cannot be enhanced by A highly secure system by
modifying the source code. modifying the source code
Explain the following concepts in relation
to operating system:

multitasking, multiprogramming, time sharing,


buffering, spooling and caching
1) Multitasking
 Process of letting the operating system perform
multiple task at what seems to the user
simultaneously.
 The CPU switches from one program to the next so
quickly that it appears as if all of the programs are
executing at the same time.
2) Multiprogramming
 When two or more programs are residing in memory
at the same time, then sharing the processor is
referred to the multiprogramming.
 Multiprogramming assumes a single shared
processor.
 Multiprogramming increases CPU utilization by
organizing jobs so that the CPU always has one to
execute.
… 2) Multiprogramming
 Goal of multiprogramming is to efficiently utilize
all of the computing resources.
 When a job issues an I/O request (e.g., open a
file, read data from a file), it cannot continue
until the request is fulfilled.
 The CPU then becomes idle (the job is blocked
on the request).
3) Time Sharing
 Time-sharing is the sharing of a computing resource among
many users by means of multiprogramming and multi-tasking.
 In time sharing, the CPU executes multiple jobs by switching
among them, but switching occur so frequently that the users
can interact with each program while it is running.
 Quite often sitting at terminal using a “command line” interface
to interact with computer.
 Types in commands from keyboard.

 A system program called a shell reads command from the


command line and makes OS system calls to carry out
commands.
 Switching between users is very fast.
 Goal is to give the illusion that each user has own machine.
4) Buffering
 Buffering is a method of overlapping the
computation of a job with its execution.
 The buffer provides a waiting station where data
can rest while the slower device catches up.
 It temporarily stores input or output data in an
attempt to better match the speeds of two
devices such as a fast CPU and a slow disk
drive.
 If, for example, the CPU writes information to
the buffer, it can continue in its computation while
the disk drive stores the information.
5) Spooling
 Spooling refers to a process of transferring data by
placing it in a temporary working area where another
program may access it for processing at a later point in
time.
 Spooling refers to putting jobs in a buffer, a special area
in memory or on a disk where a device can access them
when it is ready.
 With spooling, the disk is used as a very large buffer.
Usually complete jobs are queued on disk to be
completed later.
 A typical example is the spooler for a printer. When a
print job is issued, the spooler takes care of it, sending it
to the printer if it is not busy, or storing it on disk
otherwise.
6) Caching
 Caching – copying information into faster storage system;
main memory can be viewed as a last cache for
secondary storage.
 Important principle, performed at many levels in a
computer (in hardware, operating system, software)
 Information in use copied from slower to faster storage
temporarily
 Faster storage (cache) checked first to determine if
information is there
 If it is, information used directly from the cache (fast)
 If not, data copied to cache and used there
 Cache smaller than storage being cached
 Cache management important design problem
 Cache size and replacement policy
Describe the components of operating
system:

kernel, shell and file system


Operating System Components
1) Kernel
 Represents the operating system’s basic functions
such as management of memory, processes, files,
main inputs/outputs and communication
functionalities.

2) Shell
 Allowing communication with the operating system
via a control language, letting the user control the
peripherals without knowing the characteristics of the
hardware used, management of physical addresses,
etc.
… Operating System Components
3) File System
 Allowing files to be recorded in a tree structure.
Describe the interaction between applications
and the operating system by using graphical
representation.
Identify the different interfaces of
operating systems:

command line, voice actuated, graphical user


interface GUI) and web form
User Interface
 A user interface is the system by which people
(users) interact with a machine. The user interface
includes hardware (physical) and software (logical)
components.
 User interfaces exist for various systems, and
provide a means of:
- Input, allowing the users to manipulate a system,
and/or
- Output, allowing the system to indicate the effects of
the users' manipulation.
… User Interface

 Users may also interact with the


operating system with some kind
of software user interface like
typing commands by using
command line interface (CLI) or
using a graphical user interface.
 For hand-held and desktop
computers, the user interface is
generally considered part of the
operating system.
 On large multi-user systems such
as Unix-like systems, the user
interface is generally implemented
as an application program that
runs outside the operating system.
Operating System Placement
… Components of the User Interface
The user interface has two main components:
 Presentation language, which is the computer-to-human
part of the transaction.
 Action language that characterizes the human-to-
computer portion.
Types of User Interfaces
There are several types of user interfaces:
 Command Line Interfaces.
 Graphical User Interfaces (GUIs).
 Voice Actuated Interfaces.
 Web Form Interfaces.
1) Command-Line Interface
 CLI are often used by programmers and system
administrators, in engineering and scientific
environments, and by technically advanced personal
computer users.
 Examples of CLI application:
2) Graphical User Interface (GUI)
 A graphical user interface or GUI (sometimes
pronounced gooey) is a type of user interface item that
allows people to interact with programs in more ways
than typing such as computers
 Examples: hand-held devices such as MP3 Players,
Portable Media Players or Gaming devices; household
appliances and office equipment with images rather than
text commands.
 A GUI offers graphical icons, and visual indicators, as
opposed to text-based interfaces, typed command labels
or text navigation to fully represent the information and
actions available to a user.
… Graphical User Interface (GUI)
 The actions are usually performed through direct
manipulation of the graphical elements.
 Pictures tend to make the interface more intuitive.
GUI Characteristics

Characteris tic Des cription


Windows Multiple windows allow different information to be
displayed s imultaneous ly on the user’s s creen.
Icons Icons different types of information. On s ome sys tems ,
icons repres ent files; on others, icons repres ent
process es .
Menus Commands are selected from a menu rather than typed
in a command language.
Pointing A pointing device s uch as a mouse is us ed for s electing
choices from a menu or indicating items of interes t in a
window.
Graphics Graphical elements can be mixed with text on the same
display.
3) Voice Actuated Interfaces
 It makes human interaction with computers possible
through a voice/speech platform in order to initiate
an automated service or process.
 This is the interface to any speech application.
 Controlling a machine by simply talking to it was
science fiction only a short time ago.
 However, with advances in technology, this interface
have become more common place, and people are
taking advantage of the value that these hands-free,
eyes-free interfaces provide in many situations.
… Voice Actuated Interfaces
 Voice User interface are developing rapidly
 There are two different types of voice recognition:
 Continuous speech systems, allowing for dictation.
 Speaker independence, so people can enter commands
or words at a given workstation.
4) Web Form Interfaces
 Web Form interfaces are onscreen forms displaying
fields containing data items or parameters that need
to be communicated to the user.
 Web Form interfaces may be implemented using the
Web.
… Web Form Interfaces
 A Web Form allows a user to enter data that is sent to a
server for processing.
 Web forms resemble paper forms because internet users
fill out the forms using checkboxes, radio buttons, or text
fields.
 For example, Web Forms can be used to enter shipping
or credit card data to order a product or can be used to
retrieve data (e.g: searching on a search engine).
 In addition to functioning as input templates for new
information, Web Forms can also be used to query and
display existing data in a similar manner to mail merge
forms, with the same advantages.
… Web Form Interface
NE W BOOK

Title ISBN

Author Price

Publication
Publisher date
Number of
Edition copies

Classification Loan
status
Date of
Order
purchase
status
Describe the relationship between System Calls
and Application Programming Interface (API)
System Calls & Application Program Interface
(API)
 User programs are not allowed to access system resources
directly. They must ask the OS to do that for them.
 OS provides a set of functions that can be called by user
programs to request for OS services. These functions are
called “system calls”
 System calls run in kernel mode.
 They can be called by executing a special instruction (trap or
software interrupt) which causes processor to switch to the
kernel mode and jump to a previously defined location in the
kernel.
 When the system call finishes, processor returns to the user
program and runs in user mode.
System Calls
 Programming interface to the services provided by
the OS
 Typically written in a high-level language (C or C++)
 OS Services mostly accessed by programs via a
high-level Application Program Interface (API)
rather than direct system call use
 Most common APIs:
 Win32 API for Windows,
 POSIX API for POSIX-based systems (including virtually
all versions of UNIX, Linux, and Mac OS X), and
 Java API for the Java virtual machine (JVM)
How System Calls Are Used:
 Job: Open two files in order to read data from
one file then copy them to another file.
Program ask user for
name of files.

Prompt Message
Read from
Interactive:
Name
keyboard: name
on screen, asking
for name of files
of files typed by
user
of 2
files
Mouse/Icon based:

User use mouse


Menu files shown
to select source
on window
name

New Window
appear: user
specify
destination name
Why use APIs rather than system calls?
 An application programmer designing a program
using an API can expect his program to compile and
run on any system that supports the same API.
 Actual system calls can often be more detailed and
difficult to work with than the API.
Example of Standard API
 Consider the ReadFile() function in the Win32 API—a function for reading from a
file

 A description of the parameters passed to ReadFile()


 HANDLE file—the file to be read
 LPVOID buffer—a buffer where the data will be read into and written
from
 DWORD bytesToRead—the number of bytes to be read into the buffer
 LPDWORD bytesRead—the number of bytes read during the last
read
 LPOVERLAPPED ovl—indicates if overlapped I/O is being used
API – System Call – OS Relationship
5 Major Categories Of System Call
1. Process Control
2. File Manipulation
3. Device Manipulation
4. Information Maintenance
5. Communications
1. Process Control
 end, abort
 load, execute
 create process, terminate process
 get process attributes, set process attributes
 wait for time
 wait event, signal event
 allocate memory, free memory
2. File Manipulation
 create file, delete file
 open, close
 read, write, reposition
 get file attributes, set file attributes
3. Device Manipulation
 request device, release device
 read, write, reposition
 get device attributes, set device attributes
 logically attach or detach devices
4. Information Maintenance
 get time or date, set time or date
 get system data, set system data
 get process, file, or device attributes
 set process, file, or device attributes
5. Communications
 create, delete communication connection
 send, receive messages
 transfer status information
Application Programming Interface (API)
 An API clearly defines how to call functions and what the
results are. (API is specification, not implementation)
 Examples: APIs for file system, graphics user interface,
networking, etc.
 Portability
 User programs that follow the API’s definition are portable.
 An API can provide a common interface for different
implementations of a service.
 For example, the UNIX file system API is the same for all
kinds of devices.
 X windows API has many implementations on different
machine architectures
 Using an API allows upgrading system software without
changing user programs
End of Chapter

1: INTRODUCTION TO OPERATING SYSTEM

You might also like