Loaders - SlideShare [PDF]

Apr 9, 2013 - Advantages and Disadvantages Advantages of Compile-and-go loaders: Simple and easier to implement. No addi

21 downloads 19 Views 387KB Size

Recommend Stories


Definisi kenyamanan - SlideShare [PDF]
Jan 8, 2015 - Definisi Kenyamanan Kolcaba (1992, dalam Potter & Perry, 2005) megungkapkan kenyamanan/rasa nyaman adalah suatu keadaan telah terpenuhinya kebutuhan dasar manu…

Holt.doc - SlideShare [PDF]
Jun 21, 2010 - ... Alternatives •Vocabulary Workshop Tests •Test Answer Keys Available upon request, one per teacher, year of purchase 0030573998/Media Literacy and Communication Skills, 106.92 122.96 VCR and First Course Monitor •Support and P

Maine explosion - SlideShare [PDF]
Dec 19, 2013 - Which do you think would have been the most reliable story? Why ... Document B: New York Times (Modified) MAINE'S HULL WILL DECIDE Divers Will Inspect the Ship's Hull to Find Out Whether the Explosion Was from the Outside or ... Now, f

myntra ppt - SlideShare [PDF]
Mar 12, 2013 - Capabilities Order Processing and Delivery: Myntra attempts to order and ship every order within 24 hrs.It offers free shipping within India on all products It can ship internationally to all major countries. Technological: Myntra

Teater Bangsawan - SlideShare [PDF]
Dec 3, 2011 - Pada masa itulah anak-anak bangsawan berjaya mengolah, membentukdan menentukan gaya teater dramatik bangsawan sebagaimana yang ..... Dengan adanya kemampuankumpulan untuk mengetengahkan pelakon handalan yang berbakat,dan denganpenggunaa

Bmi - SlideShare [PDF]
Aug 3, 2012 - BMIWhat is BMI?How do you use BMI?By Kathryn Kotula, R.D., M.S., M.P.H..

Recruitment And Selection - SlideShare [PDF]
Apr 2, 2010 - EXECUTIVE SUMMARY People form an integral part of the organization. The efficiency and ... Recruitment and selection form the process of hiring the employees. ... Determine the present and future requirement of the organization in conju

Recruitment And Selection - SlideShare [PDF]
Apr 2, 2010 - EXECUTIVE SUMMARY People form an integral part of the organization. The efficiency and ... Recruitment and selection form the process of hiring the employees. ... Determine the present and future requirement of the organization in conju

Historia GRUPO GEA - SlideShare [PDF]
Apr 1, 2011 - Online Course - LinkedIn Learning. Folleto historia admon. Claudia Espinosa. Cómo hacer una práctica de lectura. jcrojo. Ensayos de Historia Económica. jcrojo. La aparición de la gran empresa moderna. jcrojo. Continuación estrategi

Sd1ips ips riduwan - SlideShare [PDF]
Feb 2, 2011 - Gambar 3.3 keluargatuliskan contoh-contoh sikap kasih sayang ayahdan ibu kepada dirimu Ilmu P. 2. kasih sayang antar keluarga. ... dalam keluarga 1. ...... yosef beragama kristen gusti beragama hindu Gambar 4.4belajar bersama mereka sal

Idea Transcript


SlideShare Explore Search You

Upload Login Signup

Search

Submit Search

Home Explore Presentation Courses PowerPoint Courses by LinkedIn Learning Search Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

1 of 33

Loaders 8,632 views Share Like Download ...

Loader & its Functions A loader is a system program, which takes the object code of a program as input and prepares ...

Mohd Arif, Software Engineer Follow Published on Apr 9, 2013

Published in: Technology 0 Comments 6 Likes Statistics Notes

Full Name Comment goes here. 12 hours ago Delete Reply Block Are you sure you want to Yes No Your message goes here Cont…. Assembly program object code file Label opcode address Program... Share your thoughts… Post Be the first to comment

Jasmine Kalsi 1 month ago

SohamSatpati1 2 months ago

sharadrokade123 2 months ago Types of Loader1.- Compile-and-Go Loaders:2.- Absolute Loader3.- Bootstrap Loader4.- Operating System: Loading application... VishalKondle 4 months ago

mamtaparihar15 5 months ago Show More No Downloads Views Total views 8,632 On SlideShare 0 From Embeds 0 Number of Embeds 3 Actions Shares 0 Downloads Compile-and-Go Loaders: A compile and go loader is one in which the assembler itself does the processes of compiling... 275 Comments 0 Likes 6 Embeds 0 No embeds No notes for slide

Loaders 1. 1. Loaders 2. 2. Loader & its Functions A loader is a system program, which takes the object code of a program as input and prepares it for execution. Loader Function : The loader performs the following functions : Allocation - The loader determines and allocates the required memory space for the program to execute properly. Linking -- The loader analyses and resolve the symbolic references made in the object modules. Relocation - The loader maps and relocates the address references to correspond to the newly allocated memory space during execution. Loading - The loader actually loads the machine code corresponding to the object modules into the allocated memory space and makes the program ready to execute. 3. 3. Cont…. Assembly program object code file Label opcode address Program name: start H01 ; This is Starting address text: x200 e02 ; a comment Length of text in bytes: x14 a03 start .begin x200 Starting address data: x20A d04 here LOAD sum Length of data in bytes: 8 e05 ADD a r06 STORE sum 000100000000100107 LOAD b 001000000000100108 SUB one 001100000000011109 STORE b 00010000000010000A SKIPZ 0100000000001000 Text0B JMP here 00110000000001100C LOAD sum 10010000000000000D HALT 10001111111110000E sum .data x000 00010000000000010F a .data x005 011100000000000010 b .data x003 000000000000000011 one .data x001 000000000000010112 .end start Data 0000000000000011 0000000000000001 4. 4. Types of Loader1.- Compile-and-Go Loaders:2.- Absolute Loader3.- Bootstrap Loader4.- Operating System: Loading application programs 3.1- The Process concept. 3.2- Creating a process.5.- Relocating Loaders 4.1- Relocation bits 4.2- Relocation maps (modification records) Advantages and Disadvantages Advantages of Compile-and-go loaders: Simple and easier to implement. No additional ... 5. 5. Compile-and-Go Loaders: A compile and go loader is one in which the assembler itself does the processes of compiling then place the assembled instruction inthe designated memory loactions. The assembly process is first executed and then the assembler causes a transfer to the first instruction of the program. E.G. WATFOR FORTRAN compiler This loading scheme is also called assmble-and-go 6. 6. Advantages and Disadvantages Advantages of Compile-and-go loaders: Simple and easier to implement. No additional routines are required to load the compiled code into the memory. Dis advantages of Compile-and-go loaders: Wastage im memory spave due to the presence of the assembler. There is a need to re-assemble the code every time it is to be run. It becomes increasingly difficult to handle large number of segments when the input code is written in a variety of HLL say one routine in pascal and one in FORTRAN and so on. Such loader make designing modular programs and systems near impossible. 7. 7. Absolute LoaderAssembler object code file Program name: start Absolute loader: Starting address text: x200 Length of text in bytes: x14 Header The absolute loader will load the Starting address data: x20A Length of data in bytes: 8 program at memory location x200: 0001000000001001 1.- The header record is checked to 0010000000001001 verify that the correct program has 0011000000000111 0001000000001000 been presented for loading. 0100000000001000 Text section 0011000000000110 2.- Each text record is read and 1001000000000000 1000111111111000 moved to the indicate address in 0001000000000001 memory 0111000000000000 0000000000000000 3.- When the “end” record (EOF) is 0000000000000101 0000000000000011 Data section encountered, the loader jumps to the 0000000000000001 specified address to begin execution. 8. 8. Cont…. The four functions as performed in and absolute loader are : 1.Allocation 2.Linking 3.Relocation 4.Loading Advantages of Absolute Loader: Simple, easy to design and implement. Since more core memory is available to the user there is no memory limit. Dis advantages of Absolute Loader: The programmer must specifically tell the assembler the address where the program is to be loaded. When subroutines are referenced, the programmer must specify their address whenever they are called. 9. 9. Loading object code into memory Object code file (disk) Run time environmentProgram name: start HeaderStarting address text: x200Length of text in bytes: x14 TextStarting address data: x20ALength of data in bytes: 8 Data0001000000001001001000000000100100110000000001110001000000001000 Heap0100000000001000 Text section00110000000001101001000000000000100011111111100000010000000000010111000000000000000000000000000000000000000001010000000000000011 Data

section0000000000000001 Stack 10. 10. Bootstrapping: Computers execute programs stored in main memory, and initially the operating system is on the hard disk. When the computer is turned on it does not have an operating system loaded in memory and the hardware alone cannot do the operations of an OS. To solve this paradox a special program called bootstrap loader is created. 11. 11. Bootstrapping continued… This program does not have the full functionality of an operating system, but it is capable of loading into memory a more elaborated software (i.e. loader2) which in its turn will load the operating system. Once the OS has been loaded the loader transfers the control of the computer system to the operating system. 12. 12. Bootstrapping continued… Early programmable computers had toggle switches on the front panel to allow the operator to place the bootloader into the program store before starting the CPU. In modern computers the bootstrapping process begins with the CPU executing software contained in ROM at a predefined address whose elementary functionality is to search for devices eligible to participate in booting, and load a small program from a special section of a device. 13. 13. Bootstrapping continued…CPU MEMORY I/O OPERATIONS BOOT PROG I/O ROM OS LOADER 2 14. 14. Bootstrapping continued… CPU MEMORY LOADER2 I/O OPERATIONS BOOT PROG I/O ROM OS LOADER 2 15. 15. Bootstrapping continued… In earlier computers data had to be hand loaded as specified before, but nowadays a small piece of software called loader helps us to avoid the manual Absolute LoaderAssembler object code file Program name: start Absolute loader: Starting addres... loading. 0 OS will be loaded here LC = Location Counter 99998 LC = 0 100000 READ STORE LC LC LC + 1 LOADER 2 IF (EOF) PC 0 ELSE JMP 100000 16. 16. Bootstrapping continued… CPU OS LOADER2 I/O OPERATIONS BOOT PROG I/O ROM OS LOADER 2 17. 17. Bootstrapping continued… The above diagram can be explained in the following steps. 1. Check hardware 2. Initiate I/O to load the loader 2 program into memory 3. Loader 2 loads the OS and passes control to it 18. 18. Conclusion We have seen that once the OS has control over the system , it can create an environment for programs to run. The operating system will load device drivers and other programs that are needed for the normal operation of the computer system. 19. 19. Operating system 20. 20. The Process Concept 21. 21. Programs and processesOnce the operating system takes control of thecomputer system, an applications program (objectmodule) can be loaded into memory to be executed.When the program is loaded into memory a process iscreated. What is a process? 22. 22. Process Definition: A program in execution An asynchronous activity The “locus of control” of a procedure in execution It is manifested by the existence of a process control block (PCB) in the operating system. 23. 23. Process Continued… The activity of a process is controlled by a data structure called Process Control Block(PCB). A PCB is created every time a program is loaded to be executed. So, a process is defined by a PCB-Program couple. 24. 24. Structure of the PCB Pointer to next PCB ….. Process name or ID Base codePROGRAM Limit….Code IP or PC Stack Pointer S T Registers A State C K MODE Interrupt Flags . …. 25. 25. Program Load PCB OS code stackProcess Creation Create 26. 26. Create Process Creation OS stackPCB Load object file heap header bss data data code code symbolProcess working space table Memory Disk 27. 27. Process working space (run-time environment) stack Dynamic link, return address, Local variables, function Parameters, …malloc(n); heap Dynamically allocated variablesint z; bss Global and static variablesint y = 7; data Constants / initialized datax = 4; code Program text (write protected) Process working space or Run-time environment 28. 28. Process working space sum Local Local bss: means “block started void sub(float total, int part ) { by symbol” and has that Local int List[5]; name for historical reasons. float sum; Local … stack Local } Local Parametermalloc(n); heap Parameterint z; bss Dynamic Linkint y = 7; data Return Addressx = 4; code 29. 29. Relocating LoadersAbsolute loaders loads a program on a specificmemory location but it is often desirable to havetwo or more programs residing in memory sharingthe different resources of a computer system.It would be impractical to assign starting addressesto each program to plan program execution.A loader able to load a program into memorywherever Cont…. The four functions as performed in and absolute loader are : 1.Allocation 2.Linking 3.Relocation 4.L... there is room for it is called a relocatingloader. 30. 30. Relocation bitsAssemblers generate code that starts at address zero but it can also emitwith each line of text (code) relocation bits indicating what fields in theobject code must be modified when the program is loaded in an addressdifferent from zero.For example, if the program will be loaded at address 40, a relocation bits equal to “1”indicates what part of the instruction must be modified: Loc# Len reloc text Loc# text 00 3 011 13 33 35 00 13 74 76 31. 31. source program before relocation after relocation Label opcode address address Loc# Len reloc text Loc# text00 copy zero older 00 3 011 13 33 35 40 13 73 7503 copy one old 03 3 011 13 34 36 43 13 34 3606 read limit 06 2 011 12 38 46 12 7808 write old 08 2 01 08 36 48 08 7610 comp load older 10 2 01 03 35 50 03 7512 add old 12 2 01 02 36 52 02 76 14 2 01 07 37 54 07 7714 store new 16 2 01 06 38 56 06 78 18 2 01 01 30 58 01 7016 sub limit 20 2 01 08 37 60 08 7718 brpos finalL 22 3 011 13 36 35 62 13 76 7520 write new 25 3 011 13 37 36 65 13 77 76 28 2 01 00 10 68 00 5022 copy old older25 copy new old 30 2 01 08 38 70 08 37828 br comp 32 2 01 11 72 1130 final write limit 33 1 0 00 73 0032 stop 34 1 0 01 74 0133 zero CONST 0 35 7534 0ne CONST 1 36 7635 older SPACE 37 7736 old SPACE 38 7837 new SPACE38 limit SPACE Relocation constant to be added is 40 32. 32. 2.- Relocation maps (modification records)Interleaving relocation bits with the program text makes cumbersome theprocess of loading the text directly into memory.This problem can be resolve by collecting all relocation bits into a singlecontiguous relocation map that we will call the relocation section of theobject code file.The relocation section will be appended to the text and data sections.The header will contain the entry point and length of the relocation sectionin the object module. 33. 33. Program name: startStarting address textLength of text in bytes HeaderStarting address dataLength of data in bytesStarting address reloc. Sect.Length of relocation section Text section Data section Relocation section

Loading object code into memory Object code file (disk) Run time environmentProgram name: start ...

Recommended

Bootstrapping: Computers execute programs stored in main memory, and initially the operating system is on the hard disk. W...

Visual Aesthetics for Elearning Online Course - LinkedIn Learning

Bootstrapping continued… This program does not have the full functionality of an operating system, but it is capable...

Bootstrapping continued… Early programmable computers had toggle switches on the front panel to allow the operator t...

Learning to Write a Syllabus Online Course - LinkedIn Learning

Bootstrapping continued…CPU MEMORY I/O OPERATIONS BOOT PROG I/O ...

Learning to Run Webinars Online Course - LinkedIn Learning

Bootstrapping continued… CPU MEMORY LOADER2 I/O OPERATIONS BOOT P... Introduction to loaders Tech_MX

Loaders Sathasivam Rangasamy

Linkers Tech_MX

Linkers And Loaders Satpal Parmar Bootstrapping continued… In earlier computers data had to be hand loaded as specified before, but nowadays a small p...

Linker and loader Akshay Khatri

Bootp and dhcp Mohd Arif

Arp and rarp Mohd Arif English Español Português Français

Deutsch About Dev & API Blog Terms Privacy Copyright Support

Bootstrapping continued… CPU OS LOADER2 I/O OPERATIONS BOOT ...

LinkedIn Corporation © 2018 × Share Clipboard × Email

Enter email addresses Add a message From



Send Email sent successfully.. Facebook Bootstrapping continued… The above diagram can be explained in the following steps. 1. Check hardware 2. Initia... Twitter LinkedIn Link Public clipboards featuring this slide

×

Conclusion We have seen that once the OS has control over the system , it can create an environment for programs ...

Operating system No public clipboards found for this slide Select another clipboard ×

The Process Concept

Programs and processesOnce the operating system takes control of thecomputer system, an applications program (objectmodule... Looks like you’ve clipped this slide to already. Search for a clipboard Create a clipboard

You just clipped your first slide! Clipping is a handy way to collect important slides you want to go back to later. Now customize the name of a clipboard to store your clips. Name* Best of Slides



Description Add a brief description so others know what your Clipboard is about. Visibility Others can see my Clipboard Cancel Save Save this presentationTap To Close

Process Definition: A program in execution An asynchronous activity The “locus of control” of a pr...

Process Continued… The activity of a process is controlled by a data structure called Process Control Block(PCB). ...

Structure of the PCB Pointer to next PCB ….. Process name or ID B...

Program Load PCB OS code stackProcess Creatio...

Create Process Creation OS stackPCB Load ...

Process working space (run-time environment) stack Dynamic link, return address, ...

Process working space sum Local Local...

Relocating LoadersAbsolute loaders loads a program on a specificmemory location but it is often desirable to havetwo or mo...

Relocation bitsAssemblers generate code that starts at address zero but it can also emitwith each line of text (code) relo...

source program before relocation after relocation Label opcode address addres...

2.- Relocation maps (modification records)Interleaving relocation bits with the program text makes cumbersome theprocess o...

Program name: startStarting address textLength of text in bytes HeaderStarting address dataLength of data in bytes...

Upcoming SlideShare

Loading in …5

×

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.