An operating system is a broad and complex area that can be covered piece by piece. In this post, we discuss the basic concepts of an operating system by exploring what is an operating system & its role in the computer system. Secondly, we explore all the aspects of the operating system including the viewpoint of the user, programmer, and operating system by discussing the services the operating system provides, how they are implemented & the various methodologies used to design such a system. Finally describe how the operating system was created and how the computer system began an operating system.
What is an Operating System?
An Operating System is software that controls the hardware of the computer and provides a foundation for the program application. It provides an environment in which a user can easily and efficiently execute a program and also serves as an intermediary between a computer user and the hardware of the computer.
What is the role of an Operating Systems?
The role of the operating system can be described in the overall description of the computer system. A computer system can be divided into four components:
- The Hardware [such as the CPU, the memory, the (I/O) devices ]: This component provides the basic resources for the system.
- System and Application Program [such as compiler, assembler, word processors, spreadsheet}: This component defines the ways in which these programs are used to solve users computing problem.
- The Operating System: This component controls and coordinates the use of the hardware among the various application program for the various user.
- The User
And, the diagram shown below describes the view of operating system services which include main aspects of the operating system such as user & other system programs, user interface, system calls and services. we will discuss each aspect one by one in detail.
User and System Program in an Operating System
System programs provide a convenient environment for program design and implementation. It can be classified into the following parts which are as follows:
- FILE MANAGEMENT: File management system program manipulates, create, delete, copy, list, print and rename files & directories.
- STATUS INFORMATION: This program gives status information like the number of users, the volume of memory available, time & date of the system, logging & debugging information.
- FILE MODIFICATION: For creating and editing the content of files stored on disc or other storage devices, many text editors may be available. Unique commands can also be used to hunt for file information or execute text transformations.
- PROGRAM LANGUAGE SUPPORT: The user is often provided with the operating system by compilers, assemblers, debuggers and interpreters for popular programming languages (such as C, C++, Java, Visual Basic, and PERL).
- PROGRAM LOADING & EXECUTION: It must be loaded into memory to be executed until a program is assembled or compiled. Absolute loaders, relocatable loaders, linkage editors, and overlay loaders can be supported by the device. Debugging mechanisms are often needed for either higher-level or machine-language languages.
- COMMUNICATION: These programs provide the mechanism for creating virtual connections among processes, users, and computer systems. They allow users to send messages to one another’s screens, to browse web pages, to send electronic mail messages, to log in remotely, or to transfer files from one machine to another.
User Interface in an Operating System
Command-line and GUI are two main approaches that are used to interact with the operating system by the user. The first one, Command Interpreter or Command-line Interpreter allows the user to enter the commands in the high-level language which gets translated into the machine language and used by the operating system. And, The second one is the graphical user interface i.e. GUI which is commonly used by end-user.
System calls in an Operating System
System calls in an operating system offer an interface for the resources that the operating system makes available which is normally available as routine written in C & C++.
Types of System Calls
Process Control
Process control system call, performs following functions :
- end, about
- load, execute
- create process, terminate process
- get and set process attributes
- wait for time
- wait and signal event
- allocate and free memory
File Management
File Management system call, performs following functions :
- Create File, Delete File
- Open, Close
- Read, Write, Reposition
- get file attributes, set files attributes
Device Management
Device Management system call performs following functions:
- Request devices, release device
- read, write, reposition
- get and set device attribute
- logically attach and detach devices
Information Maintenance
Information Maintenance system call performs following functions:
- get and set time or data
- get and set system data
- set process file or device attributes
- get process file or device attributes
Communication
Communication system call performs following functions:
- create, delete communication connection
- the end, receive a message
- transfer status information
- attach or detach remote devices
Services of an Operating System
An operating system service provides an environment for applications to be implemented. The specific services offered vary from one operating system to another, of course, but we can define similar classes. For the programmer, these operating system services are given to make the task of programming simpler. Services of the operating system are divided into two sets:
one set consists of the services that are helpful to the user
- Program Execution: This service helps the system to load the program into memory then execute the commands. It also ensures that the program executes and ends either normally or get aborted (errors).
- I/O operations: To run a program I/O operations needed and everything can not control by end-user So, the operating system provides a way to I/O operations to provide efficiency and protection to the system.
- File System Manipulation: This service helps to read, write, search, delete and create file & directories to the system and also helps to set permission on the files and directories according to the user to deny and allow a particular file.
- Communication: Communication is needed between processes many times to exchange information in the same system or different system. It is executed through shared memory and message passing in which packets of information is shared between the processes.
- Error Detection: This service makes the system to take appropriate action for any type of error occur in the system (Like Power failure, memory failure, connection lost etc.) to ensure correctness and consistency in the system.
And, the other set consists of the services that are used to ensure the efficient functioning of the system.
- Resource Allocation: Resource Allocation is necessary to manage the system when multiple processes are running at the same time. The operating system manages many different resources in the system some maybe by the special allocation code whereas other by the general request and release code.
- Accounting: This service helps to keep track which user uses how much and what kind of resources in the system to maintain the usage statistics. These statistics help researchers to reconfigure the system to improve the quality of the system.
- Protection & Security: Protection helps to confirm that resources used by the system are controlled whereas security confirms that the user using the system is authenticate or not..
Structure of an Operating System
Simple Structure
Many commercial systems do not have systems that are specifically explained. Such operating systems frequently began as small, basic, and confined systems and then expanded beyond their original range. Originally, it was developed and introduced by a few individuals who had no idea it would become so famous. It was written to have the least space for the most features, but it was not carefully separated into modules. For example MS-DOS
Layered Approach
- Operating system Layered approach structure makes system modular.
- This layered approach OS is broken into a no. of layers in which the bottom layer(0) is called as hardware and the highest layer (n) is called as user interface.
- An operating system is an implementation of an abstract object made up of data and the operations that can manipulate those data.
- The data structure and collection of routines that can be invoked by the higher level layers are a standard Operating System layer.
Advantages of layered Approach
- Simplicity of construction & debugging: The layer are selected so, that uses functions & services of only global level layers. This approach also simplifies debugging & system verification.
- Each layer is applied with only those operations that are given by global level and these layer does not need to know how these activities are carried out and also wants to know what these operations are doing.
Disadvantages of layered Approach
- Defining the different layers is the biggest challenge in the layered approach although a layer can only use lower level layers and effective implementation is therefore necessary.
- Less efficient then other techniques: when a user program execute an I/O operation it executes a system call that is trapped at the I/O layer. This layer calls the memory management layer which intern call the CPU Scheduling layer, when is then passed through the hardware.
Monolithic Kernel
- A Monolithic kernel is a large single piece of code which is composed of several logical and different program pieces.
- It is one signal program where all the functional components of OS have access to all data and routines. Such a program, with the passage of time grows more and more complex and become difficult to maintain.
- To avoid this problem modern monolithic kernels are structured in strictly functional units in which one unit cannot directly access data and routines of other unit and the units follow strict communication protocols to avail services from one another and every part of the OS run on the kernel mode which is the half of running process.
- The basic structure of the monolithic OS is consist of following points:
- A main program that invokes the requested service procedure.
- Set of services procedure that carry out the system cause.
- A set of utility procedure that help the services procedure.
Micro Kernel
- A Micro Kernel system is one that provide only the minimum functionalities in the kernel and hence it is quite small and complex
- The aim of a kernel is to provide the most basic functionalities to construct the minimal operating system services .These services include Synchronization Primitive, Processor Scheduler, Interrupt dispatcher etc. And the remaining functionalities are implemented through autonomous process called OS system service process which is also called servers in contrast, and its application process are called as clients.
- Micro Kernel structure is shown below:
Re-entrant Kernel
- A re-entrant program is one that does not modify itself at any global data.
- Multiple processes or threads can execute re-entrant programs concurrently without interfering one another. They can share the re-entrant program but have their own private data.
- A re-entrant kernel is one where many processor threads can execute the same kernel programs concurrently without affecting one another.
- In Non- Re-entrant kernels the process does not modify kernel programs but can modify kernel data.
Discover more from easytechnotes
Subscribe to get the latest posts sent to your email.
Really helpful
Content is good
Thanks. You will see more posts related to the operating system.