Know about the Definition, Need and Functions of Operating System: Operating system is an integrated set of programs that controls various resources like CPU, memory, I/O devices etc. of a computer system and acts as an interface between the user and the Computer. Whenever a job is given to computer, it is actually given to the operating system.
Need for Operating System
Computer hardware on its own is not capable of doing anything. It is basically the software of the computer which is used to control hardware resources.
The two main purposes for which we need operating system are:
Making a computer system convenient to use: It is operating system which manages parts of computer and provides the programmer interface to computer for taking instruction from the user and after taking instructions, these instruction are convened into machine code.
It is operating system which first get loaded on the memory when computer is switched on and after that it takes over the entire control of the system and remain in the memory until the computer is switched off. It makes the user to run various application programs.
Managing the resources of a computer system: A computer must know how many devices are attached to it, how many of them are engaged, how many free, what programs to execute, when to allocate memory, how long has it been working and provides a necessary direction to the hardware and users.
- Operating Systems: Concepts
- Operating Systems Interview Questions You’ll Most Likely Be Asked (Job Interview Questions Series)
FUNCTIONS OF OPERATING SYSTEM
Operating system is the master control of a computer system and perform many functions other than controlling the hardware of computer system. Some of the important function of operating system are:
Processor management means managing the time of CPU. Today’s modern computers can do several things at the same time.
This is achieved by processor management. It is the task of CPU to process the job assigned to it.
The CPU processes instruction one by one. In multiprogramming environment, the system can handle more than one program at a time.
Multiprogramming improves the overall efficiency of the computer system by getting more work done in the less time by sharing the time of CPU among a number of active programs which are present in the memory at the same time.
It is task of operating system to handle the problem of assigning various jobs for processing. This function of OS is called Job Scheduling.
It is up to operating system to decide which job is to be processed first and also decide the priorities to different jobs. The benefits of multiprogramming are:
- It increases the CPU utilization.
- It provides higher total job output.
Operating systems also manages the allocation of memory to specific jobs.
Memory management means the main memory management which should be properly managed for the overall performance of the computer.
The memory management module of an operating system takes care of this requirement. When we process the job, the operating system retrieves it from the disk and loads it into its memory.
Before loading it checks whether memory is available or not. If the memory is available it allocates it to the job and the execution is over the job is removed from the memory and freed memory is allocated to another job.
So the main function of memory management module of operating system are:
- In keeps track of which parts of memory are in use and which parts are not in use.
- It allocates memory to processes when they need it.
- It decollates the memory when the processes are done.
- It keeps track of size of memory.
A file is a collection of related information. The file management module of an operating system take care of file related activities, such as accessing, creating, naming, protecting in order to enable easy sharing of files between programs and their protection against illegal actions.
The major functions of file management are:
- It provides the file naming freedom to the user and permits controlled sharing of files.
- it keeps track of information, its location, use, status etc.
- it provides security against loss of information due to system failures.
- It provides long and short term storage of file.
- it allocates information i.e. opens a file.
- It deallocates information i.e. closes a file.
It is the operating system which communicates with the devices attached to a computer.
It is operating system which manages its peripheral devices by sending them commands in its own proprietary language and the software which deal with each device is called a driver.
Each peripheral device has its own driver which translate the electrical signals of the hardware subsystem., instructions of operating system and application software.
The main functions performed by device management module of operating system are:
- It decides what is an efficient way to allocate the device. If it is shared it decides who gets it and how much he is to get. This process is known as I/O scheduling.
- It keeps track of I/O devices, channels and control unit.