Operating System Services Program Execution,I/O Operations,File System Manipulation,Communications,System Call:. - Codeprg

Breaking

programing News Travel Computer Engineering Science Blogging Earning

Friday 8 May 2020

Operating System Services Program Execution,I/O Operations,File System Manipulation,Communications,System Call:.

Operating System Services

Following are the five services provided by operating systems to the convenience of the users.

1. Program Execution:

The purpose of computer systems is to allow the user to execute programs. So the operating system
provides an environment where the user can conveniently run programs. Running a program involves the allocating and deallocating memory, CPU scheduling in case of multiprocessing.

2. I/O Operations:

Each program requires input and produces output. This involves the use of I/O. So the operating
systems are providing I/O makes it convenient for the users to run programs.

3. File System Manipulation:

The output of a program may need to be written into new files or input taken from some files. The
operating system provides this service.

4. Communications:

The processes need to communicate with each other to exchange information during execution. It may be between processes running on the same computer or running on different computers.

Communications can occur in two ways:
 (i) shared memory
 (ii) message passing

5. Error Detection:

An error is one part of the system may cause malfunctioning of the complete system. To avoid such a
situation operating system constantly monitors the system for detecting the errors. This relieves the user of the worry of errors propagating to various part of the system and causing malfunctioning.

Following are the three services provided by operating systems for ensuring the efficient operation of
the system itself.

1. Resource allocation

  • When multiple users are logged on the system or multiple jobs are running at the same time, resources must be allocated to each of them. 
  • Many different types of resources are managed by the operating system.

2. Accounting

  • The operating systems keep track of which users use how many and which kinds of computer resources.
  • This record-keeping may be used for accounting (so that users can be billed) or simply for accumulating usage statistics.

3. Protection

  • When several disjointed processes execute concurrently, it should not be possible for one process to
  • interfere with the others, or with the operating system itself.
  •  Protection involves ensuring that all access to system resources is controlled. 
  • Security of the system from outsiders is also important. 
  • Such security starts with each user having to authenticate him to the system, usually by means of a password, to be allowed access to the resources.

System Call:


  1.  System calls provide an interface between the process and the operating system.
  2.  System calls allow user-level processes to request some services from the operating system which process itself is not allowed to do.
  3. For example, for I/O a process involves a system call telling the operating system to read or write a particular area and this request is satisfied by the operating system.

The following different types of system calls provided by an operating system:
Process control:
• end, abort
• load, execute
• create process, terminate process
• get process attributes, set process attributes
• wait for time
• wait for an event, a signal event
• allocate and free memory

File Management:
• create the file, delete the file
• open, close
• read, write, reposition
• get file attributes, set file attributes

Device management:
• request devise, the 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 process, file , or device attributes
• set process , file , or device attributes

Communications:
• create , delete communication connection
• send , receive messages
• transfer status information
• attach or detach remote devices