Вы находитесь на странице: 1из 12

OPERATING SYSTEM STRUCTURES

Lecture Series By :
Er. Kanwalvir Singh Dhindsa

Website ::
www.dhindsa.info

http://groups.google.com/group/os-2007

1
O.S. by Er. K.S.Dhindsa © 2007
Operating System Services
 User interface - Almost all operating systems have a
user interface (UI).Varies between Command-Line (CLI),
Graphics User Interface (GUI), Batch

 Program execution - The system must be able to


load a program into memory and to run that program, end
execution, either normally or abnormally (indicating error)

 I/O operations - A running program may require I/O,


which may involve a file or an I/O device

 File-system manipulation - Obviously, programs


need to read and write files and directories, create and
delete them, search them, list file Information, permission
2
management
O.S. by Er. K.S.Dhindsa © 2007
Operating System Services

 Another set of OS functions exists for ensuring the


efficient operation of the system itself via resource sharing

 Resource allocation - When multiple users or multiple


jobs running concurrently, resources must be allocated
to each of them
 Many types of resources - Some (such as CPU
cycles,main memory, and file storage) may have
special allocation code, others (such as I/O devices)
may have general request and release code

 Accounting - To keep track of which users use


how much and what kinds of computer resources

3
O.S. by Er. K.S.Dhindsa © 2007
Operating System Services

 Protection and security - The owners of


information stored in a multiuser or networked
computer system may want to control use of that
information, concurrent processes should not interfere
with each other
 Protection involves ensuring that all access to
system resources is controlled
 Security of the system from outsiders requires user
authentication, extends to defending external I/O
devices from invalid access attempts

 If a system is to be protected and secure,


precautions must be instituted throughout it. A chain is
only as strong as its weakest link. 4
O.S. by Er. K.S.Dhindsa © 2007
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 Program Interface (API) rather than
direct system call use
• Three most common APIs are Win32 API for
Windows, all versions of UNIX, Linux, and Mac
OS X), and Java

5
O.S. by Er. K.S.Dhindsa © 2007
Types of System Calls

• PROCESS CONTROL
{end,abort;load,execute;wait event,signal event}
• FILE MANAGEMENT
{create,delete;open,close;read,write;get file attributes}
• DEVICE MANIPULATION
{request,release;read,write;get,set}
• INFORMATION MAINTENANCE
{get time,set time;get process,file or device attributes}
• COMMUNICATIONS
{create,delete comm connection;send,receive
messages;attach or detach remote devices}
6
O.S. by Er. K.S.Dhindsa © 2007
SYSTEM PROGRAMS

• System programs provide a convenient environment


for program development and execution. These can
be divided into:
– File manipulation
– Status information
– File modification
– Programming language support
– Program loading and execution
– Communications
– Application programs
• Most users’ view of the operation system is defined by
system programs, not the actual system calls
7
O.S. by Er. K.S.Dhindsa © 2007
INTER-PROCESS COMMUNICATION (IPC)

• Mechanism for processes to communicate and to


synchronize their actions
• Message system – processes communicate with each
other without resorting to shared variables
• IPC facility provides two operations:
– send(message) – message size fixed or variable
– receive(message)
• If P and Q wish to communicate, they need to:
– establish a communication link between them
– exchange messages via send/receive
• Implementation of communication link
– physical (e.g., shared memory, hardware bus)
– logical (e.g., logical properties)

8
O.S. by Er. K.S.Dhindsa © 2007
Direct Communication

• Processes must name each other explicitly:


– send (P, message) – send a message to
process P
– receive(Q, message) – receive a message
from process Q
• Properties of communication link
– Links are established automatically
– A link is associated with exactly one pair of
communicating processes
– Between each pair there exists exactly one link
– The link may be unidirectional, but is usually bi-
directional
9
O.S. by Er. K.S.Dhindsa © 2007
Indirect Communication

 Messages are directed and received from mailboxes


(also referred to as ports)
 Each mailbox has a unique id
 Processes can communicate only if they share a mailbox

Properties of communication link


 Link established only if processes share a common mailbox
 A link may be associated with many processes
 Each pair of processes may share several communication links
Link may be unidirectional or bi-directional

Primitives are defined as:


send(A, message) – send a message to mailbox A
receive(A, message) – receive a message from mailbox A
10
O.S. by Er. K.S.Dhindsa © 2007
SYSTEM COMPONENTS

 PROCESS MANAGEMENT

 MAIN MEMORY MANAGEMENT–

 FILE MANAGEMENT

 I/O SYSTEM MANAGEMENT

 SECONDARY STORAGE MANAGEMENT

 NETWORKING

 PROTECTION SYSTEM

COMMAND-INTERPRETER SYSTEM (SHELL)


11
O.S. by Er. K.S.Dhindsa © 2007
OPERATING SYSTEM STRUCTURES

Lecture Series By :
Er. Kanwalvir Singh Dhindsa

Website ::
www.dhindsa.info

http://groups.google.com/group/os-2007

12
O.S. by Er. K.S.Dhindsa © 2007

Вам также может понравиться