Unit 1. O.S
Unit 1. O.S
Unit 1. O.S
System Software
Software is a set of instructions, which is designed to perform a defined task,
and it tells the computer how to work. It is of mainly two types,
namely System software and Application software. System software
is a set of computer programs that is designed to manage system
resources. It is a collection of such files and utility programs that are
responsible for running and smooth functioning of your computer system
with other hardware. Moreover, it is solely responsible for running
the operating system (OS) and managing the computer device entirely.
Device Drivers: Device drivers are software programs that allow hardware
components to communicate with the operating system. Examples include a
printer driver, a mouse driver, and a scanner driver.
Utilities: Utilities are software programs that help maintain the proper
functioning of a computer system. Examples include antivirus programs, disk
defragmenters, and system backup programs.
Compiler Phases
The compilation process contains the sequence of various phases. Each
phase takes source program in one representation and produces output in
another representation. Each phase takes input from its previous stage.
Syntax Analysis
Syntax analysis is the second phase of compilation process. It takes tokens
as input and generates a parse tree as output. In syntax analysis phase, the
parser checks that the expression made by the tokens is syntactically correct
or not.
Semantic Analysis
Semantic analysis is the third phase of compilation process. It checks
whether the parse tree follows the rules of language. Semantic analyzer
keeps track of identifiers, their types and expressions. The output of
semantic analysis phase is the annotated tree syntax.
Code Optimization
Code optimization is an optional phase. It is used to improve the
intermediate code so that the output of the program could run faster and
take less space. It removes the unnecessary lines of the code and arranges
the sequence of statements in order to speed up the program execution.
Code Generation
Code generation is the final stage of the compilation process. It takes the
optimized intermediate code as input and maps it to the target machine
language. Code generator translates the intermediate code into the machine
code of the specified computer.
Types of Compiler
Single-Pass Compiler − In a single-pass compiler, when a line source is
processed it is scanned and the tokens are extracted. Thus the syntax of the
line is inspected and the tree structure and some tables including data
about each token are constructed..
Multi-Pass Compiler − The compiler scans the input source once and
makes the first modified structure, therefore scans the first-produced form
and makes a second modified structure, etc., until the object form is
produced. Such a compiler is known as a multi-pass compiler.
Difference between System Software and Application Software
System Software Application Software
We make use of system software for The user makes use of application
operating hardware of the computer. software to perform some specific task.
When the operating system is installed on the We install the application software
computer, then the system software is also according to the requirement of the
mounted on the machine. user.
System software works in the background. So Generally, the user interacts with the
the user is not able to interact with it. application software.
It can’t run independently because it is
It can run independently as it provides the
not able to run without the presence of
platform for the running application software.
system software.
Example: compiler, assembler, interpreter Example: word processor, web
etc.. browser, media player etc.
Introduction of Assembler
Types of Assembler
One-pass Assembler
What is a Linker?
A linker is a program in a system, also known as a link editor and binder,
which combines object modules into a single object file. Generally, it is a
program that performs the process of linking; it takes one or multiple object
files, which are generated by compiler. And, then combines these files into
an executable files. Modules are called for the different pieces of code, which
are written in programming languages. Linking is a process that helps to
gather and maintain a different piece of code into an executable file or single
file. With the help of a linker, a specific module is also linked into the system
library.
The primary function of the linker is to take objects from the assembler as
input and create an executable file as output for the loader, as it helps to
break down a large problem into a small module that simplifies the
programming task.
Source code -> compiler -> Assembler -> Object code -> Linker -> Executable file ->
Loader
What is Loader
In computer systems a loader is the part of an operating system that is responsible for
loading programs and libraries. It is one of the essential stages in the process of starting
a program, as it places programs into memory and prepares them for execution.
Operating System
operating system (OS), program that manages a computer’s
resources, especially the allocation of those resources among other
programs. Typical resources include the central processing
unit (CPU), computer memory, file storage, input/output (I/O)
devices, and network connections. Management tasks include
scheduling resource use to avoid conflicts and interference between
programs. Unlike most programs, which complete a task and
terminate, an operating system runs indefinitely and terminates only
when the computer is turned off.