Thursday 25 February 2016

OPERATING SYSTEM SIMPLIFIED 


What is Operating System?

Operating system is a software that provides an interface between User and Hardware.
Hardware means devices such as CPU, printer, monitor, etc.

So, If user has to access the hardware directly he will need to write a LOT OF CODE!!
For example, in C we use the function printf(). Printf internally calls system calls
(system calls:operating system functions used to access hardware).

Without system calls the user will need to write the entire code to access the monitor and other hardware.

Therefore, operating system simplifies this interaction between the user and the hardware.





GOALS OF OPERATING SYSTEM

Primary Goal of operating system is to provide a simple interface to the user.

Secondary Goals are:

·       Allocate resources
·       Manage memory, processes, files, security, etc.
·       Efficiency

TYPES OF OPERATING SYSTEMS

·       Batch operating systems:


o   The programs or jobs were given to the computer in a queue and the computer used to execute them one by one.
o   If a job requires I/O then the CPU will stay idle till the job completes its input/output.
o   The primary responsibility is to place the job into the queue
o   DISADVANTAGES:CPU utilization is less, therefore the throughput of the system is very low.

·       Multiprogramming Operating Systems:



o   Each resource has a queue
o   If a job is not using CPU it is taken out of CPU queue and placed in I/O queue
o   Therefore, it has better CPU utilization and throughput

·       Multitasking operating system:
o   It is an extension to multiprogramming operating system
o   Jobs are executed on the CPU in a time sharing environment
o   This takes place like:
§  For a particular amount of time J1 is executed
§  When the time expires,  job J2 preempts J1.
§  J2 is scheduled the CPU
§  Eg:windows, linux.
§   

·       Multiprocessor OS:


o   One system with multiple processors
o   OS is required to support hardware
o   Advantages:
§  Increased throughput of the system
§  Reliability: If one CPU fails other will take care of it. This is called fault tolerance
§  Economical: Buying one system with 5 cpu is cheaper than buying 5 different systems


No comments:

Post a Comment