Table of Contents:-
- Operating System Meaning
- What is an Operating System?
- Operating System Definition
- Objectives of Operating System
- Desirable Qualities of Operating System
- Functions of Operating System
Operating System Meaning
An Operating System (OS) is a collection of programs that acts as an interface between a computer user and the computer hardware. An operating system provides an environment in which a user can execute programs with the use of software effectively. Operating Systems are viewed as resource managers, with the primary resource being the computer hardware, including processors, storage, input/output devices, communication devices, and data. Some of the functions of an operating system include implementing the user interface, sharing hardware among users, allowing users to share data among themselves, preventing users from interfering with one another, facilitating input/output, scheduling resources among users, accounting for resource usage, recovering from errors, organizing data for secure, facilitating parallel operations, and rapid access, and handling network communications.
What is an Operating System?
A computer system has four main components: the hardware, the operating system, the application software, and the users. The hardware provides the primary computing resources in a computer system. The application programs define how these resources are used to solve the computing problems of the users. The operating system plays an important role in controlling and coordinating the use of the hardware among the various application programs and system programs for the different users.
An operating system can also be considered as a resource allocator. A computer system possesses numerous resources (hardware and software) that may be necessary to solve a problem, including CPU time, memory space, file storage space, input/output devices, etc. The operating system manages these resources and assigns them to specific programs and users as required for their tasks. Given that numerous, potentially conflicting requests for resources may exist, the operating system must determine which requests are granted resources to operate the computer system reasonably and efficiently.
Operating System Definition
An operating system is a control program that manages the execution of user programs to prevent errors and improper computer use. Operating systems exist because they offer a practical solution to the problem of creating a usable computing system. The fundamental goal of an operating system is to execute user programs and solve user problems.
While there is no universally agreed-upon definition of the concept of an operating system, the following serves as a reasonable starting point:
A computer’s operating system comprises a group of programs designed to fulfil two primary purposes:
- To control allocating and utilizing the computing system’s resources among various users and tasks.
- To provide an interface between the computer hardware and the programmer, simplifying and enabling application program creation, coding, debugging, and maintenance.
An effective operating system should execute the functions as follows:
- Act as a command interpreter by providing a user-friendly environment.
- Facilitate communication with other users.
- Enable directory/file creation along with security options.
- Provide routines that handle the intricate details of input and output programming.
- Grant access to compilers to translate programs from high-level languages to machine language.
- Furnish a loader program to transfer compiled program code to the computer’s memory for execution.
- Ensure that when several active processes exist in the computer, each receives fair and non-interfering access to the central processing unit for execution.
- Manage storage and device allocation.
- Enable long-term storage of user information in the form of files.
- Allow system resources to be shared among users when appropriate and protect them from unauthorized or mischievous intervention as necessary.
Though system programs such as editors, translators, and various utility programs (such as sorting and file transfer programs) are not typically considered part of the operating system, the operating system is responsible for providing access to these resources of the system.
Objectives of Operating System
The primary objective of a computer is to execute instructions efficiently and enhance the productivity of processing resources associated with the computer system, including hardware resources, software resources, and users. In other words, maximizing CPU utilization is the main objective, as it is the primary device for executing programs or instructions. We can summarize the goals as follows:
- The primary goal of an operating system is to ensure the computer is user-friendly.
- The secondary goal is to utilize hardware efficiently.
Desirable Qualities of Operating System
The desirable qualities of an operating system are categorized in terms of usability, cost, facilities, and adaptability.
Usability
- Robustness
- Acceptance of all valid inputs and ability to handle them.
- Consistency
- Proportionality
- Convenience
- Powerfulness with high-level facilities.
Cost
- The desire for low-cost and efficient services.
- Implementation of good algorithms.
- Utilization of space/time tradeoffs and special hardware.
- Minimal overhead.
- Low maintenance cost; the system should not require constant attention.
Facilities
- Adequacy for intended use
- Completeness
- Appropriateness
Adaptability
- Tailoring to the environment and support for necessary activities without imposing unnecessary restrictions.
- Making commonly performed tasks easy.
- Adjustability over time to meet changing needs and resources, such as expanding memory and accommodating new devices or user populations.
- Extendibility or extensibility by adding new facilities and features that resemble existing ones.
Functions of Operating System
The main functions of an operating system are as follows:
- Process Management
- Memory Management
- Secondary Storage Management
- I/O Management
- File Management
- Protection
- Networking Management
- Command Interpretation
Process Management
The CPU executes many programs, and while it is mainly concerned with the execution of user programs, it is also needed for other system activities. These activities are referred to as processes. A process is essentially a program in execution. Typically, a batch job is considered a process, as is a time-shared user program or a system task such as spooling. While we may currently view a process as a job or a time-shared program, the concept is more general.
In connection with process management, the operating system is responsible for the following activities:
- Creating and deleting system and user processes.
- Suspending and resuming processes.
- Providing mechanisms for process synchronization.
- Providing mechanisms for handling deadlocks.
Memory Management
Memory is the most expensive component of a computer system. It consists of a large array of bytes or words, each with its address. Interaction is achieved through a series of reads or writes to specific memory addresses. The CPU fetches from and stores data in memory.
Various algorithms, depending on the particular situation, are used to manage memory. The selection of a memory management scheme for a specific system depends on many factors, especially the hardware design of the system. Each algorithm requires hardware support.
The operating system is responsible for various activities related to memory management, some of which are given below:
- Keeping track of the parts of memory that are currently in use and by whom.
- Deciding which processes to load into memory when memory space becomes available.
- Allocating and deallocating memory space as needed.
Secondary Storage Management
The computer system’s main purpose is to execute programs. During execution, these programs, along with the data they access, must be resident in the main memory. The computer system must provide secondary storage to supplement the main memory to ensure that all data and programs are not lost. Most modern computer systems use disks as the primary online storage for programs and data. Programs such as assemblers, compilers, editors, sort routines, and formatters are typically stored on disks until they are loaded into memory, with the disk serving as both the source and destination of their processing. Therefore, proper disk storage management is crucial to a computer system. Few alternatives exist; magnetic tape systems are generally too slow and limited to sequential access, making them more suitable for storing infrequently used files where speed is not a primary concern.
In connection with disk management, the operating system is responsible for the following activities:
- Managing free space
- Allocating storage
- Scheduling disk access.
I/O Management
One of the primary functions of an operating system is to hide the peculiarities of computer hardware devices from the user. For example, in UNIX, the input and output system hides the peculiarities of input and output devices from the majority of the operating system. In connection with I/O management, the operating system is responsible for the following activities:
- Implementing a buffer caching system
- Activating general device driver code
- Installing driver software for specific hardware devices as needed.
File Management
File management is one of the most used services of an operating system. Computers can store information in several different physical forms such as disks, drums and magnetic tape, which are the most common forms of data storage. Each of these devices has its own special characteristics and physical organization.
To enhance the user experience of the computer system, the operating system provides a consistent and logical representation of information storage. This is achieved by abstracting from the physical characteristics of data storage devices and creating a standardized storage unit called a file. The operating system then assigns these files to specific physical devices for efficient data management.
A file is a collection of interconnected information that is defined by its creator. Files commonly represent programs in both source and object forms, as well as data. Data files may be numeric, alphabetic, or alphanumeric. Files can either be free-form, such as text files, or rigidly formatted. In general, a file is a structured collection of bytes, bits, lines, or records whose meaning is defined by its developer and user. It is a very general concept in computing and information management.
The operating system implements the abstract concept of the file by managing mass storage devices, such as tapes and disks. Additionally, the operating system organizes files into directories to ease their use. Finally, when multiple users have access to files, the operating system controls who can access them and how they may be accessed.
In connection with file management, the operating system performs the following activities:
- Creates and deletes files
- Creates and deletes directories
- Supports primitives for manipulating files and directories
- Maps file onto disk storage
- Backs up files on stable (non-volatile) storage
- Protects and secures files.
Protection
Different mechanisms ensure that files, memory segments, the CPU, and other resources can be operated only by processes with proper authorization from the operating system.
For example, memory-addressing hardware ensures that a process executes only within its own address space. The timer ensures no process can control the CPU without relinquishing it. Finally, processes are not allowed to perform I/O to protect the integrity of peripheral devices. Protection controls access to computer resources by programs, processes, or users, along with enforcement.
The implementation of adequate protection measures improves reliability by detecting latent errors at the interfaces between component subsystems. Early detection can prevent contamination of a healthy subsystem by a malfunctioning one. An unprotected resource cannot defend against unauthorized or incompetent use (or misuse) by a user.
Networking
A distributed system consists of multiple processors that operate independently without sharing memory or a synchronized clock. Instead, each processor has its local memory, and the processors communicate with each other through various communication lines, such as high-speed buses or telephone lines. Distributed systems vary in size and function, involving microprocessors, workstations, minicomputers, and large general-purpose computer systems.
The processors in the system are connected through a communication network, which can be configured in several different ways. The network may be completely or partially connected. The design of the communication network must consider routing and connection strategies, as well as issues related to connection and security.
A distributed system provides users with access to various resources the system maintains. Access to shared resources enables computation speed-up, data availability, and reliability.
Command Interpretation
The command interpreter, which serves as the primary interface between the user and the rest of the system, is one of the most important components of an operating system.
Users issue many commands to the operating system via control statements. In a batch system, when a new job is initiated, or in a time-shared system when a user logs in, the system automatically executes a program responsible for reading and interpreting control statements. This program may be referred to as the control card interpreter, the command line interpreter, the shell (in Unix), and so on. Its function is quite simple: to retrieve the next command statement and execute it.
The command statements themselves encompass various tasks such as process management, I/O handling, secondary storage management, main memory management, file system access, protection, and networking.
Reference :
https://www.egyankosh.ac.in/bitstream/123456789/10329/1/Unit-1.pdf