Operating System is an interface between User and Hardware and the relation is shown in the picture below:
Things handled by the Operating System
When we have many programs running simultaneously, we are supposed to allocate:
- CPU to some of them.
- Memory to some of them.
- Input Output to some of them.
These works are done by resource allocator.
NOTE: Sometime resources are sharable but sometime they are not.
Acts as a Manager
It typically manages following things:
- Amount of memory you have?
- How much memory is allocated?
- What percentage of memory is free?
- The states are managed by OS.
- All the system files present on the secondary storage is managed by OS.
- Plus any other files from other media source are also managed by Operating System.
- If a process is given some resource, then at the same time any other process or program cannot use the same resource.