It is a program that acts as an intermediary between computer users and hardware. OS is used to manage computer system hardware. OS vary in task completion. like
- Mainframe OS design to optimized utilization of hardware.
- Personal Computer OS support games, business application and other things like these two.
- Mobiles computer OS develop to provide friendly environment in which users can easily interact with computers to execute program.
Hence some OS are designed to be convenient, some are to be efficient, and others are a combination of these two.
The creation process of OS
OS is large and complex so its creation is carryout piece by piece. Each of these pieces should be a well-delineated portion of the system. It must carefully define input, output, and functions.
What Operating System can do?
The computer system has four components hardware, operating system, application program, and user. Hardware CPU, memory, and input/output (I/O) devices provide basic computer resources. The application program such as word processor, spreadsheet, compiler, and web-browser define the way in which these resources use to solve user’s problems. So the purpose of the operating system is to control the hardware and coordinate its use among various application programs for various users.
OS functioning is similar to a government like it performs no useful function by its self but provides an environment in which other programs can do useful work.
Operating system services
For the convenience of the programmer to make the programming tasks easier operating system services are helpful.
Operating system services that help the users. These are primary and secondary services which are as following
- User interface
There are several forms of the user interface in the operating system. One is a command-line interface that uses text commands and methods for entering text. The second is a batch interface that uses commands and directives. Directives are used to control these commands are entered into files, and then these files are executed. One another user interface that we commonly use is the graphical user interface. GUI operates in a window system that points devices to direct I/O, choose for menu, make a selection, and a keyboard to enter texts.
- Program execution
A system must be able to load a program into memory and run that program. This program that is being executed, must be able enough to end its execution either normally or abnormally by indicating errors.
- I/O operation
The program that is running may require input and output, which may involve a file or an input/output device. Users cannot control input/output devices directly for efficiency and protection.
- File system manipulation
The file system is of particular interest. The program needs to read and write files and directories. They need to perform operations like create and delete by name and search for the given file also list file information. Some operating systems need permission from the owner to allow or deny access to files or directories.
In most circumstances, one process needs to exchange information with the other process. This type of communication may occur between the processes either executing on the same computer or different computers that are connected together through a computer network.
Communication may be implemented in two ways through shared memory in which two or more processes may read and write to a shared section of memory and another way is through message passing. In message passing packets of information in predefined formats are moved between processes by OS.
- Error detection
The operating system is a program that must be able to detect and correct errors constantly. The error may occur in CPU, memory, and hardware such as memory and power failure. It may also occur in I/O devices and user programs. In case of error operating system is designed to take appropriate action so that correctness and consistency can be ensured.
Another operating system function ensures the operational efficiency of the system. By sharing resources among users, the system gains efficiency.
- Resource allocation
Resources must be available for multiple users at the time when multiple users’ jobs are running simultaneously. Different types of resources are managed by the operating system. CPU cycle, main memory, and file storage may have a special allocation code whereas I/O devices have much more general request and release code.
For determining the best use of CPU, the operating system has a CPU-scheduling routine that coordinates the speed of the CPU, the job that must be executed, the number of registers available, and other factors. To allocate resources like printers, USB storage devices, and other such devices are managed.
We have to find out which users use how much and what kind of computer resources. This record help for accumulating usage statistics. This statistic may be a valuable tool for researchers such researchers who want to reconfigure the system to improve computing services.
- Protection and security
Multiple computer network users want to control the use of information. Protection involves ensuring that all access to system resources is controlled. To keep the system protected from outsiders we need security. The authentication process is very necessary for security. So security starts with authenticating users to the system by assigning a password for the purpose of gaining access to system resources.
Structure of Operating System
Types of operating system
The operating system is divided into two parts
In the environment, the user can execute 6the application using command line instruction or graphical user interface
Kernel work as a source of communication between the environment or user interface and hardware.
Responsibilities of kernel
The kernel has the following responsibilities
- Device compatibility
The kernel makes sure that only the devices that are compatible with the operating system run or use in the system.
- Device management
The kernel is responsible for managing all the devices that are connected to the computer system.
The kernel provides a file system, CPU scheduling, memory management, and other operating system function through a system call.
Types of kernel
There are two types of kernel
The monolithic structure can combine an enormous amount of functionality into one level.
- It has some performance advantages.
- Such applications, with the monolithic kernel, are easier to debug and test.
- The deployment process is very reliable.
- Implement and maintain become very difficult because it becomes larger.
- It has one other drawback that if the user wants to add new services it becomes very challenging because he has to modify the whole operating system.
- In case of failure of one service, the whole system will be crash.
We can see evidence of this type of kernel in Unix, Linux, and Windows operating systems.
An operating system called Mach was developed in the mid-1980s by researchers at Carnegie Mellon University. This system modularized the kernel using the microkernel approach. This method was based on removing all nonessentials components from the kernel and implementing components as a system and user-level programs. This results in a very smaller kernel besides that monolithic structure.
Advantages of microkernel
- A microkernel is very helpful in providing minimal process and memory management.
- It provides more security and reliability. Hence these are used in Military devices.
- It provides an essential role in communication facilities. Hence it is a prime function of the microkernel that it provides communication between the client program and the various services that are running in userspace.
- It is very difficult to decide which services should remain in the kernel and which should be implemented in userspace.
- It can carry out low-level network communication and hardware interruption.
This communication through the microkernel is provided by message passing.
If a client wants to access a file, he has to interact with the file server. The client and any services, he wants can never interact with each other. They have to communicate indirectly by exchanging messages through microkernels.
Which kernel is the best monolithic or microkernel and why?
As the microkernel is secure and reliable it is considered to be a good choice in security cases. But where high performance is needed monolithic kernel is used.
Functions of kernel
- Job scheduling
The kernel handles job scheduling. When we work on any application then instructions are forwarded through the processor. For example Ms. Word
- Job querying
To control user operation and interrupt kernel use first in first out algorithm FIFO. Every process is assigned an area/space in the main memory.
- Interrupt handling
Kernel plays an important role in interrupt handling
Deadlock process in OS
Several processes compete for a finite number of resources in a multiprogramming environment. A process request for a resource, if the requested resource is available at that time it is assigned to process otherwise, the process has to wait for the resource in the waiting state. Sometimes process keep on waiting for a long time and never come back from the waiting state.Read More…
Server: Types of server in Linux OS, server hardware, and server administration
What is a server?
The server is a computer program or device that provide services to other computer program and user. It enables a computer system to share its resources with other systems and use their resources simultaneously. Read More…