System software-loaders
-
Upload
kitturashmikittu -
Category
Education
-
view
23.328 -
download
0
Transcript of System software-loaders
![Page 1: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/1.jpg)
ObjectivesObjectives
•Understanding the meaning of a system software.•Understanding the concept of loaders•Knowledge of different types loaders.
![Page 2: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/2.jpg)
System SoftwareSystem Software
![Page 3: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/3.jpg)
System SoftwareSystem Software
•The subject introduces the design and implementation of system software
•System software consists of a variety of programs that support the operation of a computer
•operating system, compiler, assembler, macro processor, loader or linker, debugger, text editor, database management systems, software engineering tools, ….
![Page 4: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/4.jpg)
Loaders and Linkers
![Page 5: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/5.jpg)
Role of Role of LoaderLoader
Source
ProgramTranslator
Object
ProgramLoader
Object program ready for execution
Memory
Translator – Assembler/Compiler
![Page 6: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/6.jpg)
Role of Role of LoaderLoader
Source
ProgramAssembler
Object
ProgramLoader
Object program ready for execution
Memory
![Page 7: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/7.jpg)
Role of Loader and Role of Loader and LinkerLinkerSource
ProgramAssembler
Object
ProgramLinker
Executable Code
Loader
Object program ready for execution
Memory
![Page 8: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/8.jpg)
We know…We know…• Source Program – Assembly Language• Object Program - From assembler - Contains translated instructions and data values from the source program• Executable Code - From Linker• Loader - Loads the executable code to the specified memory locations and code gets executed.
![Page 9: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/9.jpg)
We need…We need…threethree processesprocesses•Loading - which allocates memory location and
brings the object program into memory for execution - Loader •Linking- which combines two or more separate object programs and supplies the information needed to allow references between them - Linker•Relocation - which modifies the object program so that it can be loaded at an address different from the location originally specified - Linking Loader
![Page 10: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/10.jpg)
Basic Loader Basic Loader FunctionsFunctions
• A Loader is a system program that performs the loading function
•It brings object program into memory and starts its execution
![Page 11: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/11.jpg)
Type of LoadersType of Loaders
•absolute loader •bootstrap loader•relocating loader (relative loader)
![Page 12: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/12.jpg)
Absolute Absolute LoaderLoader•Operation is very simple
•The object code is loaded to specified locations in the memory
•At the end the loader jumps to the specified address to begin execution of the loaded program
![Page 13: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/13.jpg)
Role of Absolute Role of Absolute LoaderLoader
Object
Program
AbsoluteLoader
Object program ready for execution
Memory
1000
2000
![Page 14: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/14.jpg)
Absolute Absolute LoaderLoader
•Advantage - Simple and efficient
•Disadvantage - the need for programmer to specify the actual address - difficult to use subroutine libraries• We have algorithm – next slide
![Page 15: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/15.jpg)
Object ProgramObject Program
![Page 16: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/16.jpg)
Format-1(a) (in Format-1(a) (in PowerPoint)PowerPoint)
Space for 2 inch x 2 inch
size Picture
Space for 2 inch x 2 inch
size Picture
![Page 17: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/17.jpg)
Object Code Object Code RepresentationRepresentation•Each byte of assembled code is given using its
hexadecimal representation in character form•Easy to read by human beings•Each byte of object code is stored as a single byte •Most machine store object programs in a binary form•We must be sure that our file and device conventions do not cause some of the program bytes to be interpreted as control characters
![Page 18: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/18.jpg)
A Simple A Simple Bootstrap LoaderBootstrap Loader•When a computer is first tuned on or restarted, a special type of absolute loader, called bootstrap loader is executed•This bootstrap loads the first program to be run by the computer -- usually an operating system
![Page 19: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/19.jpg)
Example (SIC Example (SIC bootstrap loader)bootstrap loader)
•The bootstrap itself begins at address 0 •It loads the OS starting address 0x80•No header record or control information, the object code is consecutive bytes of memory
![Page 20: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/20.jpg)
Machine-Dependent Machine-Dependent Loader FeaturesLoader Features
Absolute Loader – Simple and efficient
Disadvantage is – programmer has to specify the starting address
One program to run – no problem – not for several
Difficult to use subroutine libraries efficiently
![Page 21: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/21.jpg)
RelocatioRelocationnExecution of the object program using
any part of the available and sufficient memory
The object program is loaded into memory wherever there is room for it
The actual starting address of the object program is not known until load time
![Page 22: System software-loaders](https://reader034.fdocuments.net/reader034/viewer/2022052303/554a34cdb4c90582328b4580/html5/thumbnails/22.jpg)
Relocating Relocating LoadersLoaders
•Efficient sharing of the machine with larger memory and when several independent programs are to be run together
•Support the use of subroutine libraries efficiently