Saturday, 5 November 2016

Need Of an Operating System.

             

Operating System Need:-

                                                    An operating system Plays an important role of managing software, processes, security, I/O, files etc.In multitasking system every process need to access CPU, memory and storage.When we need to access any program then it will firstly copy into the main memory then after that it will execute and after execution it will save into hard disk, so this work done by the operating system. Operating system hide all these information from the users.  In earlier system user had no idea about the internal structure of computer system. They had to design the application according to the internal structure of the system. but now a day it transparent to the user.   



Usage of operating system:-

- Allow user to execute program and communicate with the computer.
- Interaction between hardware and user.
- Loading program in memory.
- Schedule program in main memory.
-Manage CPU cycle.
-manage Memory.
- Provide Security.

Friday, 4 November 2016

Operating System Functions and services

Operating System:-
                                The responsibility of an operating system is to manage all resources in an efficient manner. So that more then one user can make of these resources simultaneously to get their work done as efficient as possible.
                               
                                 Operating system  provide an interface between hardware and users.

Operating System Services:-
 
              Following are the services that are provide by the operating system-

1.- I/o operation:- 
                               Input output operation mean to read and write operation with the program.During execution program requires input and output devices. So it is the service of operating system to provides these devices to the program. Because operating system hide these all information from the users.It is vary compulsory to provide the access of the required devices when it required, otherwise program will not be completed. Mean it is the services of operating system to give the access of the devices so that program can complete its work.

2- Program execution:- 
                                       The main purpose of operating system to provide a platform to both the program and users. When we put a job for execution in a system then during execution it may require many kind of devices like input devices for read the data and after completion it may require some output devices like printer. So these all activities encapsulates as a process. After completion of the process it will store to the hard disk. So user does not have to worry that how much memory it require . mean memory allocation de-allocation is done by operating system. Overall how to load a program in the memory, execution.  operating system all handle the situation of deadlock (it is the situation when one process require a resource but at that this resource is hold by another process. For example  see the fig given below. In which you can see that there are two process P1 and P2 and two resources R1 and R2. Where situation is P1 request for R2 resource but at that time that resource is hold by P2 and P2 request for R1 but at that R1 is hold by P1. Both P1 and P2 require both of the resources to complete its work . But according the situation it cant be completed it. so this is deadlock situation . Which is also handle by OS.  ).
                                           



3. Communication:- 
                                  Communication is the services that is also provide by the operating system. In multitasking system there are various process that can run on a computer system. During execution of any program they need to communicate with each other for exchange of the information. they can share with each other with shared memory or by the message passing.

4. File system Manipulation:-
                                                 While execution there is need to open a file and read or write a file., saving or deleting a file from disk. This is important service that is also provide by the operating system. operating system also provide the service to that back of file system.

5:-  Error handling:- 
                                  This is  the service of operating system to detect all the error and fix all these for a smooth work.You all knows that  in system there are various ways for error. That can  occur at anytime and anywhere.Operating system aware of these all error. It s the function of operating system for consistent computing.

6:- Resource management (Allocation):-
                                                                  For a process how much time it require to complete its work how much memory it require these all thing is done by operating system. With the help a scheduling technique it schedule all these things. For execution of any process it firstly copy into the main memory. So it is the service of operating system that how much memory does it require in main memory. After completion of a process  it will store in hard disk.

Function of operating system:-

-Main memory management.
-Process Management.
-File Management.
-I/o System Management .
-Secondary storage Management.
- Protection system.
-Command- Interpreter System.