An operating system is an interface between user and hardware of a system and it controls allocation of resources and its retrieval.
The major functions of operating systems are
- Dynamic handling of available/allocated/free spaces of memory.
- Controlling of process state transitions efficiently.
- Maintaining of consistency in resource access by different processes synchronization methods.
- incorporation of protection and security in the system.
The main objectives of an operating systems to, to provide convenient interface to its users and it should be efficient to process complex scientific data.
The fundamental operations of an OS can be described as follows:
- Synchronization of processes
- State transition of processes/ programs
- Memory Management
What ever you do on your system is a process. Let us say your sending a request to your printer from a word document when your printer is already on duty with some other work, if the OS takes you command directly you will get a mixed-bad printout.
So in order to avoid this OS implements different techniques, which are called Synchronization Mechanism in OS to avoid clashes between resources( example: printer, files other external hardware... ) and tasks called processes.
Playing music in background along with reading article on browser- you are giving multiple works to your system at same time.
Each process running on your system might have to through lot of states, like waiting on main memory(RAM) for its turn, getting executed at processor, sometime again get back to main or secondary(HDD) memory…
All these transition of processes and handling of multiple processes from its creation to termination id controlled by OS.
Hard disk is somewhat slower memory than, main memory(RAM). For faster execution you have to load programs from HDD to RAM then execution then on processor one by one.
You might had seen HDD of 1 TB, 2 TB spaces because you have that much larger programs/ resources, but RAM of 1 GB or 4 GB...
Which means you cannot load the entire HDD into RAM, where ever your current execution had reached and what ever be the programs required for upcoming processes that only will get loaded to main memory. For that also you need a better memory manager called Operating System.
Besides simply managing the memory all CRUD( Create,Read, Update & Delete) is also under control of Operating system.
Types of Operating Systems
- Batch Operating Systems
- Batch operating systems uses first in first out algorithm(FIFO) for execution, one process at a time in CPU specifically.
- So, net processing time will be sum of burst time and I/O time.
Since batch operating systems follows FIFO scheduling model, CPU will be in idle during I/O time. So the system is less efficient compared to other types of operating systems.
- Multi-programming operating systems are extension of batch operating system.
- Where the CPU will go for next process if the current running process is requested for I/O.
- So, CPU utility and efficiency will be higher than that of batch OS.
The sequential scheduling of processes in this method, neglects the priority of the processes, hence starvation(effect of larger response time) will be larger with reference to other types of operating systems.
Strategy of temporary suspension of a process from execution is called preemption.
- Multitasking OS uses preemptive algorithm to switch between processes.
- It is a extension of Multi-programming OS.
- Here CPU switches between jobs/processes in a definite interval continuously.
- This preemption at equal intervals provides a better interactive user experience relative to other types of operating systems.
Throughput is the amount of works completed in a system over a period of time.
- Multiprocessing operating systems possess multi-core processor( dual core,quad core...) on a single system.
- Resources are distributed among them synchronously with the help of efficient algorithms.
- Ability to shift process to another core in case of failure of a core, makes multiprocessing OS much more reliable than other types of operating systems.
The Real Time OS is an operating system which processes the jobs in real time within smaller deadline. Usually used in areas of highly precise computation and faster processing is required.