|
Operating System Services
Program execution – system capability to load a program into memory and to run it. I/O operations – since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O. 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.
Additional Operating System Functions
Additional functions exist not for helping the user, but rather for ensuring efficient system operations. 1. Resource allocation – allocating resources to multiple users or multiple jobs running at the same time. 2. 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. 3. Protection – ensuring that all access to system resources is controlled.
System Calls
System calls provide the interface between a running program and the operating system. 1. Generally available as assembly-language instructions. 2. Languages defined to replace assembly language for systems programming allow system calls to be made directly (e.g., C, C++) Three general methods are used to pass parameters between a running program and the operating system. 1. Pass parameters in registers. 2. Store the parameters in a table in memory, and the table address is passed as a parameter in a register. 3. Push (store) the parameters onto the stack by the program, and pop off the stack by operating system.
Passing of Parameters As A Table
Types of System Calls
1. Process control 2. File management 3. Device management 4. Information maintenance 5. Communications
MS-DOS Execution
At System Start-up Running a Program
UNIX Running Multiple Programs
Communication Models Msg Passing Shared Memory Communication may take place using either message passing or shared memory.
|