Unit 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

UNIT-I

SYSTEM SOFTWARE

Introduction:

• System software is a type of computer program that is designed to run a computer's


hardware and application programs.
• If we think of the computer system as a layered model, the system software is the
interface between the hardware and user applications.
• The operating system is the best-known example of system software.
• System software is used to manage the computer itself.
• It runs in the background, maintaining the computer's basic functions so users can run
higher-level application software to perform certain tasks.
• Essentially, system software provides a platform for application software to be run on
top of.

Important Features Of System Software:


Computer manufacturers usually develop the system software as an integral part of the
computer. The primary responsibility of this software is to create an interface between the
computer hardware they manufacture and the end user.

System software generally includes the following features:

1. High speed. System software must be as efficient as possible to provide an effective


platform for higher-level software in the computer system.

2. Hard to manipulate. It often requires the use of a programming language, which is more
difficult to use than a more intuitive user interface (UI).

3. Written in a low-level computer language. System software must be written in a


computer language the central processing unit (CPU) and other computer hardware can
read.

4. Close to the system. It connects directly to the hardware that enables the computer to
run.

5. Versatile. System software must communicate with both the specialized hardware it runs
on and the higher-level application software that is usually hardware-agnostic and often
has no direct connection to the hardware it runs on. System software also must support
other programs that depend on it as they evolve and change.
Loader
• A loader is a major component of an operating system that ensures all necessary
programs and libraries are loaded, which is essential during the startup phase of
running a program.
• It places the libraries and programs into the main memory in order to prepare them for
execution. The loader is a component of an operating system that carries out the task
of preparing a program or application for execution by the OS.
• It does this by reading the contents of the executable file and then storing these
instructions into the RAM, as well as any library elements that are required to be in
memory for the program to execute.
• This is the reason a splash screen appears right before most programs start, often
showing what is happening in the background, which is what the loader is currently
loading into the memory. When all of that is done, the program is ready to execute.
The following are the responsibilities of a loader:

1. Validate the program for memory requirements, permissions, etc.


2. Copy necessary files, such as the program image or required libraries, from the disk
into the memory
3. Copy required command-line arguments into the stack
4. Link the starting point of the program and link any other required library
5. Initialize the registers
6. Jump to the program starting point in memory

Linkers:

• Linker is a program in a system which helps to link a object modules of


program into a single object file. It performs the process of linking. Linker
are also called link editors.
• Linking is process of collecting and maintaining piece of code and data into
a single file.
• Linker also link a particular module into system library. It takes object
modules from assembler as input and forms an executable file as output for
loader.
• Linking is performed at both compile time, when the source code is
translated into machine code and load time, when the program is loaded into
memory by the loader.
• Linking is performed at the last step in compiling a program.
Source code -> compiler -> Assembler -> Object code -> Linker -> Executable file
-> Loader
Linking is of two types:
1. Static Linking –
It is performed during the compilation of source program. Linking is performed
before execution in static linking

Static linker perform two major task:


• Symbol resolution – It associates each symbol reference with exactly one symbol
definition .Every symbol have predefined task.
• Relocation – It relocate code and data section and modify symbol references to the
relocated memory location.
2. Dynamic linking – Dynamic linking is performed during the run time. This
linking is accomplished by placing the name of a shareable library in the executable
image.

Difference between Linker and Loader

S.No. LINKER LOADER

1 A linker is an important utility program that takes the object A loader is a vital
files, produced by the assembler and compiler, and other code component of an
to join them into a single executable file. operating system
that is accountable
for loading
programs and
libraries.

2 It uses an input of object code produced by the assembler and It uses an input of
compiler. executable files
produced by the
linker.

3 The foremost purpose of a linker is to produce executable The foremost


files. purpose of a loader
is to load
executable files to
memory.

4 Linker is used to join all the modules. Loader is used to


allocate the address
to executable files.

5 It is accountable for managing objects in the program’s space. It is accountable


for setting up
references that are
utilized in the
program.
Loader Function: The loader performs the following functions:
1) Allocation
2) Linking
3) Relocation
4) Loading
Allocation:
• Allocates the space in the memory where the object program would be loaded for
Execution.
• It allocates the space for program in the memory, by calculating the size of the program.
This activity is called allocation.
• In absolute loader allocation is done by the programmer and hence it is the duty of the
programmer to ensure that the programs do not get overlap.
• In reloadable loader allocation is done by the loader hence the assembler must supply the
loader the size of the program.
Linking:
• It links two or more object codes and provides the information needed to allow references
between them.
• It resolves the symbolic references (code/data) between the object modules by assigning all
the user subroutine and library subroutine addresses. This activity is called linking.
• In absolute loader linking is done by the programmer as the programmer is aware about the
runtime address of the symbols.
• In relocatable loader, linking is done by the loader and hence the assembler must supply to
the loader, the locations at which the loading is to be done.
Relocation:
• It modifies the object program by changing the certain instructions so that it can be loaded
at different address from location originally specified.
• There are some address dependent locations in the program, such address constants must be
adjusted according to allocated space, such activity done by loader is called relocation.
• In absolute Loader relocation is done by the assembler as the assembler is aware of the
starting address of the program.
• In relocatable loader, relocation is done by the loader and hence assembler must supply to
the loader the location at which relocation is to be done.
Loading:
Brings the obect program into memory for execution
Bootstrapping
• actions taken when a computer is first powered on
• The hardware logic reads a program from address 0 of ROM
1. Rom is installed by the manufacturer
2. ROM contains bootstrapping program and some other routines that controls hardaware
Bootstrapping is a loader
• loads OS from disk into memory and makes it run
• The location of OS on disk usually starts at the first sector
• Starting address in memory is usually fixed to 0
• no need of relocation
• This kind of loader is simple
1. No relocation
2. No linking
3. Called “absolute loader”

You might also like