Operating systems handle many activities from user programs to system programs. Each activity is encapsulated as a process, which includes the code, data, and resources needed for execution. Operating systems provide several key services including program execution, I/O operations, file system manipulation, communication, error detection, and resource allocation and protection. They load and execute programs, handle synchronization and communication between processes, and provide interfaces for file input/output and management.
Operating systems handle many activities from user programs to system programs. Each activity is encapsulated as a process, which includes the code, data, and resources needed for execution. Operating systems provide several key services including program execution, I/O operations, file system manipulation, communication, error detection, and resource allocation and protection. They load and execute programs, handle synchronization and communication between processes, and provide interfaces for file input/output and management.
Operating systems handle many activities from user programs to system programs. Each activity is encapsulated as a process, which includes the code, data, and resources needed for execution. Operating systems provide several key services including program execution, I/O operations, file system manipulation, communication, error detection, and resource allocation and protection. They load and execute programs, handle synchronization and communication between processes, and provide interfaces for file input/output and management.
OPERATING SYSTEM STRUCTURE Operating systems handle many kinds of activities
from user programs to system programs like printer
WHAT ARE OPERATING SYSTEM SERVICES? spooler, name servers, file server, etc. Each of these activities is encapsulated as a process. An Operating System provides services to both the A process includes the complete execution context users and to the programs. (code to execute, data to manipulate, registers, OS It provides programs an environment to execute. resources in use). Following are the major activities of It provides users the services to execute the an operating system with respect to program programs in a convenient manner. management: Loads a program into memory. Following are a few common services provided by an Executes the program. operating system: Handles program's execution. Program execution Provides a mechanism for process I/O operations synchronization. File System manipulation Provides a mechanism for process Communication communication. Error Detection Provides a mechanism for deadlock handling. Resource Allocation Protection File System Manipulation A file represents a collection of related information. Operating systems handle many kinds of activities Computers can store files on the disk (secondary from user programs to system programs like printer storage), for long-term storage purpose. Examples of spooler, name servers, file server, etc. Each of these storage media include magnetic tape, magnetic disk and activities is encapsulated as a process. optical disk drives like CD, DVD. Each of these media A process includes the complete execution context has its own properties like speed, capacity, data transfer (code to execute, data to manipulate, registers, OS rate and data access methods. resources in use). Following are the major activities of A file system is normally organized into directories an operating system with respect to program for easy navigation and usage. These directories may management: contain files and other directions. Following are the Loads a program into memory. major activities of an operating system with respect to Executes the program. file management Handles program's execution. Program needs to read a file or write a file. Provides a mechanism for process The operating system gives the permission to the synchronization. program for operation on file. Provides a mechanism for process Permission varies from read-only, read-write, communication. denied and so on. Provides a mechanism for deadlock handling. Operating System provides an interface to the user to create/delete files. I/O Operation Operating System provides an interface to the An I/O subsystem comprises of I/O devices and user to create/delete directories. their corresponding driver software. Drivers hide the Operating System provides an interface to create peculiarities of specific hardware devices from the users. the backup of file system. An Operating System manages the communication between user and device drivers. Communication In case of distributed systems which are a collection I/O operation means read or write operation with of processors that do not share memory, peripheral any file or any specific I/O device. devices, or a clock, the operating system manages Operating system provides the access to the communications between all the processes. Multiple required I/O device when required. processes communicate with one another through communication lines in the network. Program Execution The OS handles routing and connection strategies, and the problems of contention and security. Following are the major activities of an operating system with It is a method of interaction with the OS through respect to communication: the system programs. It is a technique in which a Two processes often require data to be computer system program requests a service from the transferred between them OS kernel. Both the processes can be on one computer or on The Application Program Interface (API) helps to different computers, but are connected through a connect the OS functions with user programs. It serves computer network. as a bridge between a process and the OS, enabling user- Communication may be implemented by two level programs to request OS services. System calls may methods, either by Shared Memory or by only be accessed using the kernel system, and any Message Passing. software that consumes resources must use system calls.
Error Handling Types of System Call
Errors can occur anytime and anywhere. An error Process Control may occur in CPU, in I/O devices or in the memory It is responsible for file manipulation jobs, hardware. Following are the major activities of an including creating files, deleting files, reading, opening, writing, closing, etc. operating system with respect to error handling; The OS constantly checks for possible errors. File Management The OS takes an appropriate action to ensure It is responsible for file manipulation jobs, correct and consistent computing. including creating files, opening files, deleting files, closing files, etc. Resource Management In case of multi-user or multi-tasking environment, Device Management resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. Following These are responsible for device manipulation, are the major activities of an operating system with including reading from device buffers, writing respect to resource management: into device buffers, etc. The OS manages all kinds of resources using Information Maintenance schedulers. These are used to manage the data and its share CPU scheduling algorithms are used for better between the OS and the user program. Some utilization of CPU. common instances of information maintenance are getting time or date, getting system data, setting time or date, setting system data, etc. Protection Considering a computer system having multiple Communication These are used for interprocess communication users and concurrent execution of multiple processes, the (IPC). Some examples of IPC are creating, various processes must be protected from each other's sending, receiving messages, deleting activities. communication connections, etc. Protection refers to a mechanism or a way to control the access of programs, processes, or users to the What is System Program? resources defined by a computer system. Following are System programming may be defined as the act of the major activities of an operating system with respect creating System Software by using the System to protection Programming Languages. A system program offers an The OS ensures that all access to system environment in which programs may be developed and resources is controlled. run. In simple terms, the system programs serve as a link The OS ensures that external I/O devices are between the user interface (UI) and system calls. Some protected from invalid access attempts. system programs are only user interfaces, and others are The OS provides authentication features for each complex. For instance, a compiler is complicated system user by means of passwords. software. The system program is a component of the OS, and SYSTEM CALL AND SYSTEM PROGRAM it typically lies between the user interface (UI) and What is System Call? system calls. The system user view is defined by the system programs, not the system call, because the user view interacts with system programs and is closer to the editors, relocatable loaders, Overlay loaders, and user interface. loaders. Communication Types of System Program System program offers virtual links between File Management processes, people, and computer systems. Users It is a collection of specific information saved in may browse websites, log in remotely, a computer system's memory. File management communicate messages to other users via their is described as manipulating files in a computer screens, send emails, and transfer files from one system, including the creation, modification, and user to another. deletion of files. Status Information Layered Structure of Operating System Status information is information about the input, output process, storage, and CPU utilization time, how the process will be computed in how much memory is necessary to execute a task. File Modification These system programs are utilized to change files on hard drives or other storage media. Besides modification, these programs are also utilized to search for content within a file or to change content within a file. Programming-Language Support The OS includes certain standard system The layered structure approach breaks up the programs that allow programming languages operating system into different layers and retains much such as C, Visual Basic, C++, Java, and Pearl. more control on the system. The bottom layer (layer 0) is There are various system programs, including the hardware, and the topmost layer (layer N) is the user compilers, debuggers, assemblers, interpreters, interface. These layers are so designed that each layer etc. uses the functions of the lower-level layers only. It Program Loading and Execution simplifies the debugging process as if lower-level layers After Assembling and Compiling, the program are debugged, and an error occurs during debugging. The must be loaded into the memory for execution. A error must be on that layer only as the lower-level layers loader is a component of an operating system have already been debugged. responsible for loading programs and libraries, and it is one of the most important steps to starting a program. The system includes linkage
Differences between System Call and System Program in Operating System
Features System Call System Program
Definition It is a technique in which a It offers an environment for a
computer system program program to create and run. requests a service from the OS kernel.
Request It fulfils the low-level requests It fulfils the high-level request or
of the user program. requirement of the user program. Programming It is usually written in C and C+ It is commonly written in high-level Languages + programming languages. programming languages only. Assemble-level language is used in system calls where direct hardware access is required. User View It defines the interface between It defines the user interface (UI) of the services and the user process the OS. provided by the OS. Action The user process requests an OS It transforms the user request into a service using a system call. set of system calls needed to fulfil the requirement. Classification It may be categorized into file It may be categorized into file manipulation, device management, program loading and manipulation, communication, execution, programming-language process control, information support, status information, file maintenance, and protection. modification, and communication.