2introduction of OS - Functions and Services 2
2introduction of OS - Functions and Services 2
Functions and
Services
Operating Systems 1
Introduction Operating System Components
•Process Management
•Main Memory Management
•File Management
•I/O System Management
•Secondary Storage Management (disk)
•Networking
•Protection System
•Command-Interpreter System
Operating Systems 2
Introduction Process Management
Operating Systems 5
Introduction I/O System Management
Operating Systems 6
Introduction Secondary-Storage Management
Operating Systems 7
Introduction Networking (Distributed Systems)
• Low level support for pure connectivity - message passing, FTP, file sharing,
…
• Higher level functional support: clustering, parallel processing, …
• A distributed system is a collection heterogeneous processors that do not
share memory or a clock. Each processor has its own local memory.
Connected by a network.
• The processors in the system are connected through a communication
network.
• Communication takes place using a protocol.
• A distributed system provides user access to various system resources.
• Cooperative vs independent processing.
• Access to a shared resource allows:
✓ Computation speed-up
✓ Increased data availability
✓ Enhanced reliability
Operating Systems 8
Introduction Protection System
Operating Systems 9
Introduction Command-Interpreter System
Operating Systems 10
Introduction Command-Interpreter System
Operating Systems 11
Introduction Operating System Services
•OS as a service provider via system calls & commands (typically for the
programmer).
•Program execution – system capability to load a program into memory and
to run it - address mapping and translation a key issue.
•I/O operations – since user programs cannot execute I/O operations directly,
the operating system must provide some means to perform I/O - system calls
and API.
•File-system manipulation – program capability to read, write, create, and
delete files
•Communications – exchange of information between processes executing
either on the same computer or on different systems tied together by a
network. Implemented via shared memory or message passing.
•Error detection – ensure correct computing by detecting errors in the CPU
and memory hardware, in I/O devices, or in user programs – ex:parity errors,
arithmetic “errors”, out of memory, out of disk space, program not found, …
•Memory management
Operating Systems 12
Introduction Additional Operating System Services
Additional functions exist not for helping the user, but rather for
ensuring efficient system operations.
•Resource allocation – allocating resources to multiple
users or multiple jobs running at the same time – avoiding
Deadlock.
•Accounting – keep track of and record which users use
how much and what kinds of computer resources for
account billing or for accumulating usage statistics.
•Protection – ensuring that all access to system resources is
controlled, ex: firewalls, passwords, file permissions, etc.
Operating Systems 13
Introduction System Calls
• System calls provide the interface between a running program and the
operating system– like invoking a command from inside a program.
✓ Generally available as assembly-language instructions.
✓ Languages defined to replace assembly language for systems
programming allow system calls to be made directly (e.g., C, C++) -
C language: open, close, read, write, …
• Three general methods are used to pass parameters between a
running program and the operating system.
✓ Pass parameters in registers.
✓ Store the parameters in a table in memory, and the table address
is passed as a parameter in a register – if parms complicated.
✓ Push (store) the parameters onto the stack by the program, and
pop off the stack by operating system – usually in assembly
language.
Operating Systems 14
Introduction Types of System Calls
• Process control
✓ create process, terminate process
✓ end, abort
✓ load, execute
✓ get process attributes, set process attributes
✓ wait for time
✓ wait event, signal event
✓ allocate and free memory
✓ Dump memory if error
✓ Debugger for determining bugs, single step execution
✓ Locks for managing access to shared data between processes
• File management
✓ create file, delete file
✓ open, close file
✓ read, write, reposition
✓ get and set file attributes
Operating Systems 15
Introduction Types of System Calls
• Device management
✓ request device, release device
✓ read, write, reposition
✓ get device attributes, set device attributes
✓ logically attach or detach 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
Operating Systems 16
Introduction Types of System Calls
• 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
• Protection
✓ Control access to resources
✓ Get and set permissions
✓ Allow and deny user access
Operating Systems 17
Introduction Examples of Windows and Unix System Calls
Operating Systems 18
Bibliography
❖ Silberschatz, A, Galvin, P.B, and Gagne, G., Operating System
Principles, 9e, John Wiley & Sons, 2013.
❖ Stallings W., Operating Systems-Internals and Design Principles, 7e,
Pearson Education, 2014.
❖ Harvey M. Deital, “Operating System”, Third Edition, Pearson
Education, 2013.
❖ Andrew S. Tanenbaum, “Modern Operating Systems”, Second
Edition, Pearson Education, 2004.
❖ Gary Nutt, “Operating Systems”, Third Edition, Pearson Education,
2004.
Acknowledgements
❖I have drawn materials from various sources such as mentioned in
bibliography or freely available on Internet to prepare this presentation.
❖I sincerely acknowledge all sources, their contributions and extend my
courtesy to use their contribution and knowledge for educational
purpose.
Thank You!!
?