Unit I J1
Unit I J1
Unit I J1
Every computer must have an operating system to run other programs. The
operating system coordinates the use of the hardware among the various system
programs and application programs for various users. It simply provides an
environment within which other programs can do useful work.
The operating system is a set of special programs that run on a computer
system that allows it to work properly. It performs basic tasks such as
recognizing input from the keyboard, keeping track of files and directories on
the disk, sending output to the display screen, and controlling peripheral
devices.
Purposes and Tasks of Operating Systems
Several tasks are performed by the Operating Systems and it also helps in
serving a lot of purposes which are mentioned below. We will see how Operating
System helps us in serving in a better way with the help of the task performed by
it.
Purposes of an Operating System
• It controls the allocation and use of the computing System’s resources
among the various user and tasks.
• It provides an interface between the computer hardware and the
programmer that simplifies and makes it feasible for coding and debugging
of application programs.
Tasks of an Operating System
1. Provides the facilities to create and modify programs and data files using an
editor.
2. Access to the compiler for translating the user program from high-level
language to machine language.
3. Provide a loader program to move the compiled program code to the
computer’s memory for execution.
4. Provide routines that handle the details of I/O programming.
I/O System Management
The module that keeps track of the status of devices is called the I/O traffic
controller. Each I/O device has a device handler that resides in a separate
process associated with that device.
The I/O subsystem consists of
• A memory Management component that includes buffering caching and
spooling.
• A general device driver interface.
Drivers for Specific Hardware Devices
Below mentioned are the drivers which are required for a specific Hardware
Device. Here we discussed Assemblers, compilers, and interpreters, loaders.
Assembler
The input to an assembler is an assembly language program. The output is an
object program plus information that enables the loader to prepare the object
program for execution. At one time, the computer programmer had at his disposal
a basic machine that interpreted, through hardware, certain fundamental
instructions. He would program this computer by writing a series of ones and
Zeros (Machine language) and placing them into the memory of the
machine. Examples of assembly languages include
Compiler and Interpreter
The High-level languages– examples are C, C++, Java, Python, etc (around 300+
famous high-level languages) are processed by compilers and interpreters. A
compiler is a program that accepts a source program in a “high-level language
“and produces machine code in one go. Some of the compiled languages are
FORTRAN, COBOL, C, C++, Rust, and Go. An interpreter is a program that does
the same thing but converts high-level code to machine code line-by-line and not
all at once. Examples of interpreted languages are
• Python
• Perl
• Ruby
Loader
A Loader is a routine that loads an object program and prepares it for execution.
There are various loading schemes: absolute, relocating, and direct-linking. In
general, the loader must load, relocate and link the object program. The loader
is a program that places programs into memory and prepares them for execution.
In a simple loading scheme, the assembler outputs the machine language
translation of a program on a secondary device and a loader places it in the core.
The loader places into memory the machine language version of the user’s
program and transfers control to it. Since the loader program is much smaller
than the assembler, those make more core available to the user’s program.
Components of an Operating Systems
There are two basic components of an Operating System.
• Shell
• Kernel
Shell
Shell is the outermost layer of the Operating System and it handles the interaction
with the user. The main task of the Shell is the management of interaction
between the User and OS. Shell provides better communication with the user and
the Operating System Shell does it by giving proper input to the user it also
interprets input for the OS and handles the output from the OS. It works as a way
of communication between the User and the OS.
Kernel
The kernel is one of the components of the Operating System which works as a
core component. The rest of the components depends on Kernel for the supply
of the important services that are provided by the Operating System. The kernel
is the primary interface between the Operating system and Hardware.
Functions of Kernel
The following functions are to be performed by the Kernel.
• It helps in controlling the System Calls.
• It helps in I/O Management.
• It helps in the management of applications, memory, etc.
Types of Kernel
There are four types of Kernel that are mentioned below.
• Monolithic Kernel
• Microkernel
• Hybrid Kernel
• Exokernel
For more, refer to Kernel in Operating System.
Difference Between 32-Bit and 64-Bit Operating Systems
32-Bit Operating System 64-Bit Operating System
32-Bit OS is required for running of 32-Bit 64-Bit Processors can run on any
Processors, as they are not capable of of the Operating Systems, like 32-
running on 64-bit processors. Bit OS or 64-Bit OS.
32-Bit Operating System 64-Bit Operating System