Skip to main content

Operating Systems | Types and Functions

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
  • 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.

  • State transition of processes/ programs
  • 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.

  • Memory Management
  • 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

  1. 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.


  2. Multi-programming 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.


  3. Multitasking Operating Systems
  4. 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.


  5. Multiprocessing Operating Systems
  6. 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.

  7. Real time Operating Systems
  8. 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.




Comments

Popular posts from this blog

Operating Systems | Scheduling Algorithms : Round Robin

| FCFS | SJF | SRTS | Round Robin | LJF | Priority Scheduling | HRRN | Round RobinFeatures : Most popular algorithm of allPractically implementableImplementable with basic data structures like queueExtremely lesser starvationOptimum efficiency can be set by controlling time quantumThe round robin algorithm will continuously switch between processes if a process in CPU (under execution) exceeds a time limit set by OS called time quantum.Flow Chart :Scheduler allocated process to for execution.CPU starts monitoring the execution time right after from allocation.If the process completes its execution before exceeding time quantum, OS forwards the process to termination state.else, the processes gets preempted once the time quantum limit exceeded and if the process finished at this moment, OS moves the process to termination state, else it moves to ready queue and iterates over the whole process listed above.Example : Consider the following table of processes and calculate complet…

Operating Systems | Concept of Process

Hard disk drive of the system in called primary memory and secondary memory is Random Access Memory(RAM). Either a program written in High Level Language(HLL) or a executable code generated by the sequence of works done by pre-processor, compiler and assembler, resides in secondary memory of the system. To start an execution, operating system allocates some space in the main memory, for the program to be executed and loads the program in the secondary memory to the allocated space. The piece of work which is loaded by the operating system to the main memory in order to execute program is called processEvery program loaded by operating system will create a focus boundary(or process body), a partitioned memory area where all memory requirements for the execution of program is satisfied.Variable which will not change its value through out life time of process is called static variable and variables which are globally accessible in a process known as global variable.Heap area is reserved f…

Operating Systems | Scheduling Algorithms : SJF

| FCFS | SJF | SRTS | Round Robin | LJF | Priority Scheduling | HRRN | Shortest Job First(SJF)SJF algorithm schedules the shortest job(low burst time) available on main memory at the time of context switching in ready state . It can be either preemptive or non-preemptive depending on the nature of scheduler.Since the SJF select the job which is shorted among available jobs on main memory, Non-preemptive SJF algorithm will have larger waiting time if a job with longer burst time get scheduled first. In short SJF is also vulnerable to Convoy EffectTo find shortest process among min-heap would be the best data structure to be usedExample : Consider the following table of processes and calculate completion time, turn around time and waiting time using SJF algorithm with the following assumptions. No preemption.No I/O request will be there from any process.Arrival time is relative to CPU on time.Process NumberATBT103222324442View Answer

The execution of processes can be visualized …