Various Operating system services



Rating - 4/5
473 views

Services of an Operating System

Operating System provides numerous crucial services to the user as well as to the application programs. We can broadly classify these services into following five categories:

  1. Process management
  2. Device management
  3. Inter-process Communication
  4. File management
  5. Error detection

Process management:

This is one of the most important roles played by an operating system. Whenever a user writes a program he is simply concerned with its logic, he never needs to bother, how long the code is, how much time will it take to be executed, what amount of space will it occupy in the memory, where will it be stored etc. This is because the operating system handles all these issues.

Initially the program is in hard disk only. Now the OS brings it to the main memory and schedules it to access the CPU. It also takes care whether the entire program or some part of the program needs to be brought in the main memory.
 

Multiprogramming (Multiple programs residing in the main memory at one time)

These Topics Are Also In Your Syllabus
1 RC 4000 link
2 What is the WAFL File System? link
You May Find Something Very Interesting Here. link
3 What is the Security Problem? link
4 Networking in WIndows XP link
5 what is compression in mutimdedia? link

Fig. Multiprogramming (Multiple programs residing in the main memory at one time)

During execution, one process might require accessing I/O devices and till then CPU might remain idle. But OS won’t let this happen because it always ensures that several processes are residing in the main memory at one time (i.e., basic concept of multiprogramming)

Device management:

We know that every program needs to perform Input and output operations during its execution but the user never needs to interact with the hardware devices directly and this is all because of operating system.
 

Device Management by Operating System

These Topics Are Also In Your Syllabus
1 Disk scheduling link
2 Disk Management link
You May Find Something Very Interesting Here. link
3 File System Structure link
4 Operating System Services link
5 User OS interface link

Fig. Device Management by Operating System

We can simply assume that till the time user performs coding, control is in his hand and whenever some I/O operation needs to be performed, the control is transferred to the operating system and once the I/O work is done, the control is transferred back to the user. In this way, OS does device management.

Inter-process Communication:

There are two types of processes. First ones are the independent processes which never need to communicate with each other and run independently.

Another type of processes are mutually dependent processes which work with mutual co-operation and hence they need to communicate with other.

These Topics Are Also In Your Syllabus
1 Multiprocessor systems link
2 Process Scheduling link
You May Find Something Very Interesting Here. link
3 Interprocess Communication link
4 Direct Memory Access link
5 Instruction Execution link

For example, there are two processes, first one is meant to send some data and the second one is there to receive the same data. Now, if the two processes are unable to communicate with each other, several problems might arise like:

  • Data might be lost
  • If the two are not running with the same pace, slower one will be overwhelmed.
  • If the two processes run without mutual co-operation, efforts of the faster process will be wasted and thereby CPU’s time is wasted too.

Inter Process Communication

Fig. Inter Process Communication


 

So, communication is a must between one or more mutually dependent processes. For this, operating system provides two types of inter-process communication mechanisms:

These Topics Are Also In Your Syllabus
1 Access Matrix link
2 What is Election Algorithms ? link
You May Find Something Very Interesting Here. link
3 Explain Reaching Agreement. link
4 What is Atomicity? link
5 Types Of Systems link
  1. Message Passing: Here processes communicate with each other by exchange of messages.
  2. Shared memory: In this mechanism, two or more processes share a common memory space and access it by mutually communicating with each other.

File Management:

This is another important service provided by the operating system. It mainly deals with the secondary memory management.
We know that all the processes require to access files at some time. They might need to read data from files, write data into them, edit them etc. But the user never needs to do anything here because the operating system acts as a file manager and provides the necessary file and folder related services to the programs in run.

Most common file and folder services provided by the operating system include:

  1. Creating files
  2. Opening files
  3. Renaming files
  4. Copying files
  5. Deleting files
  6. Searching for files
  7. Modifying files, their attributes and access permissions.


 

Operating System acts as a file manager

These Topics Are Also In Your Syllabus
1 Synchronization Hardware link
2 System Model link
You May Find Something Very Interesting Here. link
3 Deadlock Characteristics link
4 Atomicity link
5 Kernel Modules link

Fig. Operating System acts as a file manager

 

Error Detection:

An error might occur anytime in between the execution of a program and may hamper the execution process.

Therefore, the operating system keeps on detecting the errors continuously while the process is in run. This is quite like the I/O management service. If program runs smoothly, the user has the control but as soon as any error arises, control is transferred to the operating system which then does the necessary subsequent action.

These Topics Are Also In Your Syllabus
1 Process Management: Process concept link
2 Multiprocessor systems link
You May Find Something Very Interesting Here. link
3 Process Scheduling link
4 Interprocess Communication link
5 Types Of Systems link

This service can’t be allowed to the user because this may lead to misallocation or deallocation of memory or CPU’s access.

More Details….


Rating - 4/5
491 views

Advertisements
Rating - 4/5