UNIT III LOADERS AND LINKERS PART A

Size: px
Start display at page:

Download "UNIT III LOADERS AND LINKERS PART A"

Transcription

1 PART A UNIT III LOADERS AND LINKERS 1. Define Absolute Loader and Bootstrap Loader. The loader, which is used only for loading but not for relocation or linking is known as absolute loader. e.g. Bootstrap loader Bootstrap Loader is a special type of absolute loader which loads the first program to be run by the computer usually an operating system. 2. What is Relocating Loader? Loaders that allow program relocation are called relative loaders or relocating loaders. There are two methods of relocation they are 1. Relocation by modification record. 2. Relocation by bit mask method. 3. What is the need of ESTAB. ESTAB is used to store the name and address of the each external symbol. It also indicates in whichcontrol section the symbol is defined. 4. Write about the loader options INCLUDE &DELETE. The general format of INCLUDE is INCLUDE program_name (library name) This command directs the loader to read the designated object program from a library and treat it as theprimary loader input. The general format of DELETE command is DELETE Csect-name It instructs the loader to delete the named control sections from the set of programs loaded. 5. What is the use of the variable PROGADDR, CSADDR and CSLTH. PROGADDR is a variable which holds the beginning address of the memory, where the linked program is to be loaded.the startingaddress is obtained from the operating system. CSADDR is a variable which holds the starting address of the control section which is currently being read. CSLTH is the length of the control section. 6. Write the two passes of a Linking Loader. During pass1external symbols used in the source program are stored along with its address in the external symbol table, ESTAB. Actual loading, relocation and linking is done during pass Define Automatic Library Search. In many linking loaders the subroutines called by the program being loaded are automaticallyfetched from the library, linked with the main program and loaded.this feature is referred to asautomatic library search. 8. Give the difference between Linking Loader and Linkage Editors. Linking loader: a) The relocation and linking is performed each timethe program is loaded. It requires two passes. b) Linking loader performs linking during the load time. Linkage editor:a) It produces a linked version of a program which is written in a file. Here the loading can be accomplished in a single pass. b) Linkage editor performs the linking operation before the load time.

2 9. Define Dynamic Linking Loader. Dynamic Linking Loader postpones the linking process until execution time. The subroutine is loaded and linked to the program after its first call during run time.it has the ability to load the routine only when they are needed. The dynamic linking avoids loading of entire library for each execution. 10. What is meant by Static Executable and Dynamic Executable? In static executable, all external symbols are bound and ready to run. In dynamic executable some symbols are bound at run time. PART B 1. Explain about Machine-Dependent Loader Features. i)relocation ii)program Linking MACHINE DEPENDENT LOADER FEATURES Relocation. Program linking. RELOCATION: Relocation is process which modifies object program at different address from ther original location. Relocation factor is defined as Relocation factor p =L_orign p -t_origin p L_orign p =linked origin of program p t_origin p =translated origin of program p Loaders that allow program relocation are called relative loaders or relocation loaders. There are two methods of relocation they are 3. Relocation by modification record 4. Relocation by bit mask method Relocation by modification record method Modification record Describe part of object code to be changed when program relocated. To change each value one modification record needed. Included between text record and end record in object program. Help to mention starting Address, length of field for value to be altered. Advantage Easy to specify relocation. Disadvantage For many instruction to be modified more modification records are needed. Algorithm Refer loaders and linkers 3.11 in text book.

3 Relocation by bit mask method There is no need for modification record. Relocation bit Related with word in object code. Gathered into bit mask. Mask represented as three hexadecimal digits. Character underlined for identification. If relocation bit 1, program starting address added to word. Relocation bit 0 indicates no modification. Underline _ indicates bit mask. Object code for SIC/XE is H^copy^000000^00107A T^000000^1E^FFC^.. T^00001E ^15^E00^.. E^ Where T refers to text record is the starting address of program. 1E length of text record. FFC, E00 refer bit mask to indicate object code modification. SIC relocation loader algorithm (Bit mask method) Refer page 3.12 System Software in text book. Self relocating programs It is used to classify programs. Define way in which programs has to be modified. The different types of programs are 1. Non relocatable programs Can be executed only in area starting on translated origin. 2. Relocatable programs Relocate desired area of memory. 3. Self relocating program, Perform relocation on its own address sensitive instructions. Execute in any area of memory. Useful in time sharing operating systems. Program linking Basic concept is control section(cs). CS is part of program that maintains identity after assembly. Loaded and relocated independently of others. Programmers assemble, load and manipulate separately. Can be assembled together or independently. Process of linking more than one control section is called program linking. Refer in text book. Each LIST terminates by END. Label at beginning and end of program are external symbols. 2. Explain in detail about the Algorithm and Data Structures of a Linking Loader. Algorithm and Data Structures for Linking Loader Linking loader Uses modification record for relocation.

4 Linking loader s input is set of object programs. Linking- done between two programs or control sections. Data structures used in linking loader 1. ESTAB (External Symbol Table) ESTAB StoresName and address of external symbol. The table also indicates in which control section the symbol is defined. Table is organized as hash table. It makes easy to perform add and delete operation. PROGADDR It is a variable. Contains the beginning address in memory where the linked program is to be loaded. PROGADDR value is given to the loader by the operating system. CSADDR It is a variable. Contains starting address of the control section currently being scanned. Value is added to relative address within control section. CSLTH Contain length of control section. While reading END record, CSLTH added to CSADDR. CSADDR give starting addresso of next control section. Passes of linking loader Have 2 pass pass1, pass2. Pass1 assign address to external symbols. Pass2 perform loading, relocation and linking. Pass1 Beginning load address got from OS. This address becomes starting address of CS. Control section name from Header record, external symbols in Define record are entered into ESTAB. While reading END record, CSLTH is added to CSADDR. All the external symbols present in the control sections to be loaded is stored in the ESTAB along with the address. Load map helps to see symbols with address. Control Section Symbol name Address Length LIST PROG END LIST E PROG2 40C3 END2 40D3 LIST3 40E PROG END Interplay between passes of loader

5 From assembler & compiler Memory Objectprogra m input Copy of Objectprogra m in Object program input Loader Pass 1 Algorithm for pass1 of linking loader Refer in text book External Two pass linking Symbol loader scheme table Loader Pass 2 Segment loaded Memory Pass 2 Perform loading, relocation and linking of object program. CSADDR contains starting address of CS. Object code moved to specific address. When reading Modification Record, ESTAB isused to get symbol value. After loading, control goes to starting address of loaded program. Algorithm for pass2 of linking loader Refer in text book Modification record using reference number Helps to make change in object program. Reference number assigned to external symbol. Reference number underlined for easy identification. Reference number 01 assigned to CS name. Advantages of Reference number Avoid multiple search of ESTAB while loading CS. For each CS External reference symbol is looked in ESTAB. Modification value got by indexing array of values. 3. Discuss in detail about Machine-independent Loader features a. Automatic Library Search b. Loader Options MACHINE INDEPENDENT LOADER FEATURES Automatic library search Allow Programmer to use standard subroutines without including them in loaded program. All routines retrieved from library when needed during linking. Linking loader includes routines from subprogram library and this library is called standard system library (ssl).

6 SSL allow programmer to use subroutines from more libraries. Subroutines fetched from library, linked with main program and then loaded. Automatic library call or search feature allow programmer to specify subroutine names as external references in source program. Keep track of external symbols External symbols are referred in program by entering them in ESTAB. Address assigned to symbol whenever definition isencountered. Undefined symbol in ESTAB represent unresolved external references. Loader search library. Unresolved external references even after scanning through the entire program and the library is treated as errors. Library search Library contains compiled version of subroutines. Done by scanning Define records of object program. When subroutines called more than one time both name entered into directory. Entries refer to copy of object program. Loader options Allow user to specify options for modifying standard processing. There are two loader options namely 1. Control statement 2. Static analysis of data It uses special command language for options. Command can be given by - Control statement - Command statement Options specified as part of Job Control Language (JCL). Options allow selection of alternative sources of input. Types of control statement There are four control statements namely 1. INCLUDE 2. DELETE 3. CHANGE

7 4. LIBRARY INCLUDE Direct loader to read object program from library. Syntax INCLUDE PROGRAM.NAME(library_name) DELETE Help to delete entire control section. Change external references within program. Syntax DELETEcsect_name CHANGE This command helps to change name for entire program. Syntax CHANGE name1, name2 Example INCLUDE READ (UTLIB) INCLUDE WRITE (UTLIB) DELETE RDREC DELETE WRREC CHANGE RDREC, READ CHANGE WRREC, WRITE LIBRARY Include library routines to satisfy external references. Specify alternate library search. Loader search user specified library before standard library search. User can specify library as LIBRARY MYLIB. Static analysis of data Helps to analyze unresolved external references. Performs analysis of data using routines like STDDEV, PLOT, CORREL from library. Calculating stddev, mean, median done by command like NO CALL STDDEV, MEAN, MEDIAN

8 Advantage 1. NO CALL command instructs loader to leave the external references unresolved. 2. Avoid overhead of loading and linking. 3. Save memory space. 4. Provide large options like specifying location where execution begins. 4. Explain in detail about the Linkage Editor Linkage Editors A linkage editor produces a linked version of the program (called load module or an executable image), which is written to a file or library for later execution. Object program Library Linking loader Memory When the user is ready to run the linked program, a simple relocating loader can be used to load the program into memory. The only object code modification necessary is the addition of an actual load address to relative values within the program. The linkage editor performs relocation of all control sections relative to the start of the linked program. Thus all items that need to be modified at load time have values that are relative to the start of the linked program. This means that the loading can be accomplished in one pass with no external symbol required. This involves less overhead than using a linkage loader. If a program is to be executed many times without being reassembled, the use of a linkage editors, reduces the overhead required, Resolution of external references and library searching are only performed once. A linking loader searched libraries and resolves external references every time the program is executed.

9 Even though linking is performed prior to load time in the case of linkage editor information s about external references is retained in the linked program. This makes relinking, modifying external references etc., If this information is not retained, the linked program can only be loaded and executed and it cannot be reprocessed by the linkage editor. Linkage editors can perform many useful functions besides simply preparing an object program for execution. Linkage Editors Object program Library Linkage editor Linked program Relocating loader Memory Difference between linking loader and linkage editor S.No Linking loader Linkage editor 1. Performs linking and relocation at load time. Loads the linked program directly 2. into the memory. Therefore steps for writing and reading the linked program are avoided. Linking loaded searches libraries 3. and resolves external references every time the program is executed Linking is done prior to load time Writes a linked version of program, into a file which is later executed by the relocation loader. Resolution of external references and library searching are performed only once in linkage editor. 4. Used in situations where program has to reassembled for every Linkage editor can be efficiently used when a program is to be executed many

10 execution Eg: program development and testing 5. Linking loader has less flexibility and control times without being reassembled, each time Linkage editors offer more flexibility and control 6. Less complexity and overhead Increase in complexity and overhead Consider for example, The program CALCULATE that uses a large number of subroutine. Suppose that one subroutine name PROJECT used by the program is changed. After the new version of PROJECT is reassembled the linkage editor can be used to replace this subroutine. The following is a typical sequence of linkage editor commends which is used to accomplish this task. INCLUDE CALCULATE (PROGLIB) DELETE PROJECT (Delete the project subroutine) INCLUDE PROJECT (NEWLIB) (Include the new version) REPLACE CALCULATE (PROGLIB) Linkage editors can also be used to build packages of subroutine or other control sections that are generally used together, like to read and write data blocks, to encode and decode the data blocks etc., In linkage editor could be combine the appropriate subroutines into a package with a command sequence like the following, INCLUDE READ (UTLIB) INCLUDE WRITE (UTLIB) INCLUDE ENCODE (UTLIB) INCLUDE DECODE (UTLIB) INCLUDE BLOCK (UTLIB) INCLUDE DEBLOCK (UTLIB) SAVE LNKMOD (SUBLIB) The linked module LNKMOD could be indexed in the directory of SUBLIB. Search of SUBLIB would retrieve LNKMOD, which has all the references between the READ, WRITE resolved, so linkage need not reprocessed when each time the program is linked.

11 Linkage editors often allow the user to specify that external references are not to be resolved automatic library search. In such case only the external references between user written routines would be resolved. Linking loader is used to combine linked user subroutine with LNKMOD at execution time. 5. i) Explain in detail about the Bootstrap loader. It s a type of absolute loader which is executed first whenever computer is turned on or restarted. Load first program that is to be executed from the computer. Bootstrap begins at address 0 in machine memory. Load program at starting address 80.each object code on device represented as two hexadecimal digits. After object code loaded bootstrap jumps to address 80. Program execution starts from address 80. Process of bootstrap loader is done by GETC subroutine. This subroutine read and converts pair of character from device. When end of file is read from device it jumps to address 80. Program relocation is not needed when computer is just switched on and there is no program in memory. Bootstrap loader program in ROM Absolute loader program reside permanently in ROM. When system is on program executed from ROM. Bootstrap loader program in storage devices If bootstrap program is in external storage devices built in hardware read program from memory to particular location. Control transferred to memory address where program is stored. ii) Explain in detail about Dynamic Linking Loader. Dynamic Linking Loader Linkage editors perform linking operations before the program is loaded for execution. Linking loaders perform these same operations at load time. A subroutine is loaded and linked to the rest of the program when it is first called. This type of function is called dynamic linking, dynamic loading or load on call. Dynamic linking is often used to allow several executing programs to share one copy of a subroutine or library.

12 Dynamic linking also makes it possible for one object to be shared by several programs. Dynamic linking provides the ability to load the routines involved are large or have many external references; this can result in substantial savings of time and memory space. It avoids the necessity of loading the entire library for each execution. There are number of different mechanism that can be used to accomplish the actual loading and linking of a called subroutine. In this method in which routines that are to be dynamically loaded must be called via on operating system service request. This method could also be thought of as a request to a part of the loader that is kept in memory during execution of the program. A) Instead of executing a JSUB instruction, that refers to an external symbol, the program makes a load and call service request to the operating system. Dynamic loader(part of the operating system) Load and call Errorhandle User program (A)

13 B) The operating system examines its internal tables to determine whether the routine is already loaded or not. If necessary, the routine is loaded from this specified user or system libraries. Dynamic loader User program Error handle Library Dynamic loading User program Error handle (B) (C) C)Control is then passed from the operating system to the routing being called. D) When the called subroutine completes it processing it returns to its caller. The operating system then returns control to the program that issued the request. Dynamic loader Dynamic loader User program Error handle User program Error handle (D) (E)

14 The control be returned in this way so that the operating system knows when the called subroutine has completed its execution. After the subroutine is completed the memory that was allocated to load it may be released and used for other purpose. Control may be simply be passed from the dynamic loader to the called routine. E) When dynamic linking is used, the binding of the name to an actual address is delayed from load time until execution time. This delayed binding gives greater flexibility. 6. Explain in detail about MS-DOS Linker MS DOS linker It is used for Pentium and X86 systems. MS DOS compiler and assemblers produce object modules. Object module has the file extension as.obj. Each object module describes structure of program. It also contain binary image of translated instructions and program data. It combines one or more object modules to form a complete executable program with extension.exe. Ms-Dos Object Module: Record type Description Function THEADR Translator header Record Specify name of object module. TYPEDEF PUBDEF EXTDEF LNAMES SEGDEF GRPDEF LEDDATA LIDATA FIXUPP MODEND External symbols and references Segment definition and grouping Translated instructions and data Relocation and linking information End of object module Contain list of external symbol. LNAME contain list of segment, class names used in program. SEGDEF describe segment in object module. Include name, length and alignment. GRPDEF specify how segment combined into groups. LEDDATA contains translated instruction, data from source program. LIDATA specify translated instructions and data occur in repeated position. Resolve external references and perform address modification. Mark end of module. Contain reference to entry point of program.

15 Object record formats THEADRC (Translator Header Record) 80H Length T_modulename Check_sum LNAMES record (List of Names Record) 96H Length Name list Check_sum SEGDEF record (Segment Definition Record) 98H Length Attributes (1-4) Segment Length (2) Name index (1) Check_sum EXTDEF record ( External Names Definition Record) 8CH Length External reference list Check_sum PUBDEF record (Public Name definition record) 90H Length Base(2-4) Name Offset(2) Check_sum LEDDATA record (Enumerated data (Binary Image)) A0H Length Segment index (1-2) Data offset (2) data Check_sum FIXUPP record 9CH Length Location(1) Fix Frame Target Target. Check_sum dat(1) datum(1) datum(1) offset(2) MODEND record (Module End Record) 8AH Length Type(1) Start addr(5) Check_sum Object module format Has sequence of object records. Each object record describe feature of program in object module. There are 14 types of object records. It contains 5 types of information. 1. Binary image

16 2. External references 3. Public definitions 4. Debugging information i.e., line number in source program 5. Miscellaneous information i.e., comments in source program Object record format Length(1 byte) name Process of MS-DOS link Perform two passes namely pass1 and pass2. During PASS1: 1. Starting address of each segment is computed 2. Place segments in executable program in same order. 3. The symbol table is constructed in which an address is associated with segment and external symbol 4. If there are unresolved external symbols, LINK searches specific library. During PASS2 LINK 1. Extract translated instructions and data from object modules. 2. Build image of executable program in memory. 3. Memory less uses temporary disk file. 4. Pass 2 of link process LEDDATA and LIDDATA record with the FIXUPP record. 5. Place binary data from LEDDATA and LIDDATA records into memory image. Relocations performed and external references are resolved. 6. Relocation that involve starting address of the segment are added to the table of segment FIXUPPS. 7. File has header that contain Fixup segment table. Memory requirement information. Initial content for CS (Counter Segment) and SP(Segment Pointer) registers. 8. After memory image complete LINK write it to executable file (.EXE).

Chapter 3 Loaders and Linkers

Chapter 3 Loaders and Linkers Chapter 3 Loaders and Linkers Three fundamental processes: Loading brings the object program into memory for execution. Relocation modifies the object program so that it can be loaded at an address different

More information

UNIT III LOADERS AND LINKERS

UNIT III LOADERS AND LINKERS UNIT III LOADERS AND LINKERS INTRODUCTION Loader is a system program that performs the loading function. Many loaders also support relocation and linking. Some systems have a linker (linkage editor) to

More information

UNIT III - LOADERS AND LINKERS

UNIT III - LOADERS AND LINKERS 3.1 Introduction to Loaders UNIT III - LOADERS AND LINKERS A loader is the part of an operating system that is responsible for loading programs into memory and prepares them for execution. Loading a program

More information

This contains the following three processes, and they are,

This contains the following three processes, and they are, Chapter 3 Loaders and Linkers This Chapter gives you Basic Loader Functions Machine-Dependent Loader Features Machine-Independent Loader Features Loader Design Options Implementation Examples 30 Introduction

More information

3.3 Machine-Independent Loader Features

3.3 Machine-Independent Loader Features 3.3 Machine-Independent Loader Features Loading and linking are often thought of as operating system service functions. Machine independent loader features: 3.3.1 Automatic Library Search 3.3.2 Loader

More information

Prepared By : Ms. Sanchari Saha ( Asst. Professor) Department : Computer Science & Engineering

Prepared By : Ms. Sanchari Saha ( Asst. Professor) Department : Computer Science & Engineering Subject Name: System Software Subject Code: 10CS52 Prepared By : Ms. Sanchari Saha ( Asst. Professor) Department : Computer Science & Engineering Date : 20-10-2014 UNIT-4 LOADERS & LINKERS Engineered for

More information

LOADERS AND LINKERS 1. BASIC LOADER FUNCTIONS 2. DESIGN OF AN ABSOLUTE LOADER 3. A SIMPLE BOOTSTRAP LOADER 4. MACHINE DEPENDENT LOADER FEATURES

LOADERS AND LINKERS 1. BASIC LOADER FUNCTIONS 2. DESIGN OF AN ABSOLUTE LOADER 3. A SIMPLE BOOTSTRAP LOADER 4. MACHINE DEPENDENT LOADER FEATURES UIT III LOADERS AD LIKERS 1. BASIC LOADER FUCTIOS 2. DESIG OF A ABSOLUTE LOADER 3. A SIMPLE BOOTSTRAP LOADER 4. MACHIE DEPEDET LOADER FEATURES 5. RELOCATIO 6. PROGRAM LIKIG 7. ALGORITHM AD DATA STRUCTURES

More information

Chapter 3: Loaders and Linkers

Chapter 3: Loaders and Linkers Department of Electr rical Eng ineering, Chapter 3: Loaders and Linkers 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu 3.1 Basic Loader Functions 3.1.1 Design of an Absolute Loader 3.1.2 A Simple

More information

Loaders. Systems Programming. Outline. Basic Loader Functions

Loaders. Systems Programming. Outline. Basic Loader Functions Loaders Systems Programming Chapter 3 Linkers and Loaders A loader is a system program that performs the loading function. many also support relocation & linking others have a separate linker and loader

More information

Chapter 3 Loaders and Linkers

Chapter 3 Loaders and Linkers Chapter 3 Loaders and Linkers Outline 3.1 Basic Loader Functions 3.2 Machine-Dependent Loader Features 3.3 Machine-Independent Loader Features 3.4 Loader Design Options 3.5 Implementation Examples Introduction

More information

Chapter 3 Loaders and Linkers

Chapter 3 Loaders and Linkers Chapter 3 Loaders and Linkers Outline 3.1 Basic Loader Functions 3.2 Machine-Dependent Loader Features 3.3 Machine-Independent Loader Features 3.4 Loader Design Options 3.5 Implementation Examples Introduction

More information

Chapter 3 Loaders and Linkers -- Loader Design Options

Chapter 3 Loaders and Linkers -- Loader Design Options Chapter 3 Loaders and Linkers -- Loader Design Options Loaders Linkage editor Linking before loading Dynamic linking Linking at the execution time Bootstrap loader Linkage editors Difference between a

More information

By: Bhargavi Goswami Assistant Professor Sunshine Group of Institutions Rajkot, Gujarat, India. Mob:

By: Bhargavi Goswami Assistant Professor Sunshine Group of Institutions Rajkot, Gujarat, India.   Mob: Linkers By: Bhargavi Goswami Assistant Professor Sunshine Group of Institutions Rajkot, Gujarat, India. Email: bhargavigoswami@gmail.com Mob: +918140099018 Steps for Execution: Performed By: Translator

More information

1.Program to find factorial of a given number

1.Program to find factorial of a given number 1.Program to find factorial of a given number DATA SEGMENT X DW 06H FACT DW? DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV AX,01H ;Set the value of AX as 01H. MOV CX,X

More information

UNIT I - INTRODUCTION

UNIT I - INTRODUCTION UNIT I - INTRODUCTION 1. Define system software. It consists of variety of programs that supports the operation of the computer. This software makes it possible for the user to focus on the other problems

More information

Gechstudentszone.wordpress.com

Gechstudentszone.wordpress.com CHAPTER -2 2.1 Basic Assembler Functions: The basic assembler functions are: ASSEMBLERS-1 Translating mnemonic language code to its equivalent object code. Assigning machine addresses to symbolic labels.

More information

Chapter 2. Assembler Design

Chapter 2. Assembler Design Chapter 2 Assembler Design Assembler is system software which is used to convert an assembly language program to its equivalent object code. The input to the assembler is a source code written in assembly

More information

Chapter 3 Loaders and Linkers -- Machine-Dependent Loader Feature

Chapter 3 Loaders and Linkers -- Machine-Dependent Loader Feature Chapter 3 Loaders and Linkers -- Machine-Dependent Loader Feature Motivation Shortcoming of an absolute loader Programmer needs to specify the actual address at which it will be loaded into memory. It

More information

Compile: compiler. Load: loader. compiler linker loader memory. source object load code module module 2

Compile: compiler. Load: loader. compiler linker loader memory. source object load code module module 2 Part III Storage Management Chapter 8: Memory Management Fall 2010 1 Address Generation Address generation has three stages: Compile: compiler Link: linker or linkage editor Load: loader compiler linker

More information

AS-2883 B.Sc.(Hon s)(fifth Semester) Examination,2013 Computer Science (PCSC-503) (System Software) [Time Allowed: Three Hours] [Maximum Marks : 30]

AS-2883 B.Sc.(Hon s)(fifth Semester) Examination,2013 Computer Science (PCSC-503) (System Software) [Time Allowed: Three Hours] [Maximum Marks : 30] AS-2883 B.Sc.(Hon s)(fifth Semester) Examination,2013 Computer Science (PCSC-503) (System Software) [Time Allowed: Three Hours] [Maximum Marks : 30] Note: Question Number 1 is compulsory. Marks : 10X1

More information

2.1. Basic Assembler Functions:

2.1. Basic Assembler Functions: 2.1. Basic Assembler Functions: The basic assembler functions are: Translating mnemonic language code to its equivalent object code. Assigning machine addresses to symbolic labels. SOURCE PROGRAM ASSEMBLER

More information

UNIT 1: MACHINE ARCHITECTURE

UNIT 1: MACHINE ARCHITECTURE VTU QUESTION PAPER SOLUTION UNIT 1: MACHINE ARCHITECTURE 1. a) Give the target address generated for the following machine instruction: (i) 032600h (ii) 03C300h (iii) 0310C303h if (B)=006000, (PC)=003000,

More information

MODULE 5 LINKERS AND LOADERS

MODULE 5 LINKERS AND LOADERS MODULE 5 LINKERS AND LOADERS Execution phases The execution of a program involves 4 steps:- 1) Translation Converting source program to object modules. The assemblers and compilers fall under the category

More information

12: Memory Management

12: Memory Management 12: Memory Management Mark Handley Address Binding Program goes through multiple steps from compilation to execution. At some stage, addresses in the program must be bound to physical memory addresses:

More information

UNIT II ASSEMBLERS www.noyesengine.com www.technoscriptz.com 1 1. BASIC ASSEMBLER FUNCTIONS 2. A SIMPLE SIC ASSEMBLER 3. ASSEMBLER ALGORITHM AND DATA STRUCTURES 4. MACHINE DEPENDENT ASSEMBLER FEATURES

More information

CSCI341. Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory

CSCI341. Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory CSCI341 Lecture 22, MIPS Programming: Directives, Linkers, Loaders, Memory REVIEW Assemblers understand special commands called directives Assemblers understand macro commands Assembly programs become

More information

Main Memory (Part I)

Main Memory (Part I) Main Memory (Part I) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Main Memory 1393/8/5 1 / 47 Motivation and Background Amir

More information

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition Chapter 8: Memory Management 8.1 Silberschatz, Galvin and Gagne 2009 Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are

More information

CS5460/6460: Operating Systems. Lecture 21: Shared libraries. Anton Burtsev March, 2014

CS5460/6460: Operating Systems. Lecture 21: Shared libraries. Anton Burtsev March, 2014 CS5460/6460: Operating Systems Lecture 21: Shared libraries Anton Burtsev March, 2014 Recap from last time We know what linkers and loaders do Types of object files Relocatable object files (.o) Static

More information

CS1203-SYSTEM SOFTWARE UNIT I-INTRODUCTION

CS1203-SYSTEM SOFTWARE UNIT I-INTRODUCTION CS1203-SYSTEM SOFTWARE UNIT I-INTRODUCTION 1. Define system software. It consists of variety of programs that supports the operation of the computer. This software makes it possible for the user to focus

More information

8086 ALP TOOLS (CH 2) CHAPTER 2

8086 ALP TOOLS (CH 2) CHAPTER 2 1 CHAPTER 2 In this chapter, we shall discuss the Assembly Language Program development tools, PC memory structure and Assembler directives. Books to be Referred: 1. Microprocessors and Interfacing 2nd

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,

More information

Memory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358

Memory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358 Memory Management Reading: Silberschatz chapter 9 Reading: Stallings chapter 7 1 Outline Background Issues in Memory Management Logical Vs Physical address, MMU Dynamic Loading Memory Partitioning Placement

More information

Compiler, Assembler, and Linker

Compiler, Assembler, and Linker Compiler, Assembler, and Linker Minsoo Ryu Department of Computer Science and Engineering Hanyang University msryu@hanyang.ac.kr What is a Compilation? Preprocessor Compiler Assembler Linker Loader Contents

More information

CS2304-SYSTEM SOFTWARE 2 MARK QUESTION & ANSWERS. UNIT I INTRODUCTION

CS2304-SYSTEM SOFTWARE 2 MARK QUESTION & ANSWERS. UNIT I INTRODUCTION CS2304-SYSTEM SOFTWARE 2 MARK QUESTION & ANSWERS. UNIT I INTRODUCTION 1. Define System Software. System software consists of a variety of programs that supports the operations of a computer. Eg. Compiler,

More information

Assemblers. System Software by Leland L. Beck. Chapter 2

Assemblers. System Software by Leland L. Beck. Chapter 2 Assemblers System Software by Leland L. Beck Chapter 2 1 Role of Assembler Source Program Assembler Object Code Linker Executable Code Loader 2 Chapter 2 -- Outline Basic Assembler Functions Machine-dependent

More information

UNIT 1: MACHINE ARCHITECTURE

UNIT 1: MACHINE ARCHITECTURE VTU QUESTION PAPER SOLUTION UNIT 1: MACHINE ARCHITECTURE 1. Give the target address generated for the following machine instruction: (i) 032600h (ii) 03C300h (iii) 0310C303h if (B)=006000, (PC)=003000,

More information

CS2422 Assembly Language & System Programming

CS2422 Assembly Language & System Programming CS2422 Assembly Language & System Programming November 30, 2006 Today s Topic Assembler: Basic Functions Section 2.1 of Beck s System Software book. Reading Assignment: pages 43-52. Role of Assembler Source

More information

CSE 4/521 Introduction to Operating Systems. Lecture 12 Main Memory I (Background, Swapping) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 12 Main Memory I (Background, Swapping) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 12 Main Memory I (Background, Swapping) Summer 2018 Overview Objective: 1. To provide a detailed description of various ways of organizing memory hardware.

More information

Memory Management (1) Memory Management

Memory Management (1) Memory Management EECS 3221 Operating System Fundamentals No.8 Memory Management (1) Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University Memory Management A program usually resides on a

More information

Memory Management (1) Memory Management. CPU vs. memory. No.8. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Memory Management (1) Memory Management. CPU vs. memory. No.8. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University EECS 3221 Operating System Fundamentals No.8 Memory Management (1) Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University Memory Management A program usually resides on a

More information

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional

More information

MIPS (SPIM) Assembler Syntax

MIPS (SPIM) Assembler Syntax MIPS (SPIM) Assembler Syntax Comments begin with # Everything from # to the end of the line is ignored Identifiers are a sequence of alphanumeric characters, underbars (_), and dots () that do not begin

More information

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1 Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1 Chapter 9: Memory Management Background Swapping Contiguous Memory Allocation Segmentation

More information

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science Memory Management CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture are based on those from Operating Systems Concepts, 9th ed., by Silberschatz, Galvin,

More information

M2 Instruction Set Architecture

M2 Instruction Set Architecture M2 Instruction Set Architecture Module Outline Addressing modes. Instruction classes. MIPS-I ISA. Translating and starting a program. High level languages, Assembly languages and object code. Subroutine

More information

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 370: OPERATING SYSTEMS [MEMORY MANAGEMENT] Matrices in Banker s algorithm Max, need, allocated Shrideep Pallickara Computer Science Colorado

More information

Outlook. Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium

Outlook. Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium Main Memory Outlook Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium 2 Backgound Background So far we considered how to share

More information

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses. 1 Memory Management Address Binding The normal procedures is to select one of the processes in the input queue and to load that process into memory. As the process executed, it accesses instructions and

More information

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation

More information

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 8: MEMORY MANAGEMENT By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the

More information

Introduction SIC, RISC & CISC 0. Introduction to Systems Programming This course aims at: Understanding what is going on behind the scenes The design and implementation of system software, such as Assemblers

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Machine dependent Assembler Features

Machine dependent Assembler Features Machine dependent Assembler Features Assembler Features Machine Dependent Assembler Features Instruction formats and addressing modes (SIC/XE) Program relocation Machine Independent Assembler Features

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example:

More information

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program. Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile program compiler Compiled program Step 2: run input Compiled program output Language Translation compilation is translation

More information

Chapter 8: Memory-Management Strategies

Chapter 8: Memory-Management Strategies Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and

More information

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#: Computer Science and Engineering 331 Midterm Examination #1 Fall 2000 Name: Solutions S.S.#: 1 41 2 13 3 18 4 28 Total 100 Instructions: This exam contains 4 questions. It is closed book and notes. Calculators

More information

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping

More information

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L17 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Was Great Dijkstra a magician?

More information

Background. Contiguous Memory Allocation

Background. Contiguous Memory Allocation Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific

More information

Computer Hardware and System Software Concepts

Computer Hardware and System Software Concepts Computer Hardware and System Software Concepts Introduction to concepts of System Software/Operating System Welcome to this course on Computer Hardware and System Software Concepts 1 RoadMap Introduction

More information

Unit 2 -- Outline. Basic Assembler Functions Machine-dependent Assembler Features Machine-independent Assembler Features Assembler Design Options

Unit 2 -- Outline. Basic Assembler Functions Machine-dependent Assembler Features Machine-independent Assembler Features Assembler Design Options Unit 2 -- Outline Basic Assembler Functions Machine-dependent Assembler Features Machine-independent Assembler Features Assembler Design Options Introduction to Assemblers Fundamental functions translating

More information

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide

More information

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine Machine Language Instructions Introduction Instructions Words of a language understood by machine Instruction set Vocabulary of the machine Current goal: to relate a high level language to instruction

More information

Systems Programming Assemblers Part 4 Control Sections

Systems Programming Assemblers Part 4 Control Sections Systems Programming Assemblers Part 4 Control Sections Prof. Dr. Hani Mahdi Department of Computer Science Al-Isra University, Amman, Jordan 1 1 Control Sections A Control Section is a part of the program

More information

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapter 8: Main Memory. Operating System Concepts 9 th Edition Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L16 Deadlocks, Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Where we are: Deadlocks

More information

Objectives. ICT106 Fundamentals of Computer Systems Topic 8. Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8

Objectives. ICT106 Fundamentals of Computer Systems Topic 8. Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8 Objectives ICT106 Fundamentals of Computer Systems Topic 8 Procedures, Calling and Exit conventions, Run-time Stack Ref: Irvine, Ch 5 & 8 To understand how HLL procedures/functions are actually implemented

More information

9.1 Background. In Chapter 6, we showed how the CPU can be shared by a set of processes. As a result of

9.1 Background. In Chapter 6, we showed how the CPU can be shared by a set of processes. As a result of Chapter 9 MEMORY MANAGEMENT In Chapter 6, we showed how the CPU can be shared by a set of processes. As a result of CPU scheduling, we can improve both the utilization of the CPU and the speed of the computer's

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

Generating Programs and Linking. Professor Rick Han Department of Computer Science University of Colorado at Boulder

Generating Programs and Linking. Professor Rick Han Department of Computer Science University of Colorado at Boulder Generating Programs and Linking Professor Rick Han Department of Computer Science University of Colorado at Boulder CSCI 3753 Announcements Moodle - posted last Thursday s lecture Programming shell assignment

More information

CIT 595 Spring System Software: Programming Tools. Assembly Process Example: First Pass. Assembly Process Example: Second Pass.

CIT 595 Spring System Software: Programming Tools. Assembly Process Example: First Pass. Assembly Process Example: Second Pass. System Software: Programming Tools Programming tools carry out the mechanics of software creation within the confines of the operating system and hardware environment Linkers & Loaders CIT 595 Spring 2010

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Chapter 8 Memory Management

Chapter 8 Memory Management Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous

More information

System Programming Loaders and Linkers

System Programming Loaders and Linkers System Programming Loaders and Linkers Introduction: In this chapter we will understand the concept of linking and loading. As discussed earlier the source program is converted to object program by assembler.

More information

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array

More information

Assembly Language Programming Linkers

Assembly Language Programming Linkers Assembly Language Programming Linkers November 14, 2017 Placement problem (relocation) Because there can be more than one program in the memory, during compilation it is impossible to forecast their real

More information

Administrivia. Deadlock Prevention Techniques. Handling Deadlock. Deadlock Avoidance

Administrivia. Deadlock Prevention Techniques. Handling Deadlock. Deadlock Avoidance Administrivia Project discussion? Last time Wrapped up deadlock Today: Start memory management SUNY-BINGHAMTON CS35 SPRING 8 LEC. #13 1 Handling Deadlock Deadlock Prevention Techniques Prevent hold and

More information

Building a Runnable Program and Code Improvement. Dario Marasco, Greg Klepic, Tess DiStefano

Building a Runnable Program and Code Improvement. Dario Marasco, Greg Klepic, Tess DiStefano Building a Runnable Program and Code Improvement Dario Marasco, Greg Klepic, Tess DiStefano Building a Runnable Program Review Front end code Source code analysis Syntax tree Back end code Target code

More information

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation

More information

Chapter 8: Memory- Management Strategies

Chapter 8: Memory- Management Strategies Chapter 8: Memory Management Strategies Chapter 8: Memory- Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and

More information

Chapter 9 Memory Management

Chapter 9 Memory Management Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

COMPILER DESIGN LEXICAL ANALYSIS, PARSING

COMPILER DESIGN LEXICAL ANALYSIS, PARSING COMPILER DESIGN LEXICAL ANALYSIS, PARSING 1. Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the Physical main storage location

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

! What is main memory? ! What is static and dynamic allocation? ! What is segmentation? Maria Hybinette, UGA. High Address (0x7fffffff) !

! What is main memory? ! What is static and dynamic allocation? ! What is segmentation? Maria Hybinette, UGA. High Address (0x7fffffff) ! Memory Questions? CSCI [4 6]730 Operating Systems Main Memory! What is main memory?! How does multiple processes share memory space?» Key is how do they refer to memory addresses?! What is static and dynamic

More information

UNIT II ASSEMBLERS. Figure Assembler

UNIT II ASSEMBLERS. Figure Assembler 2.1 Basic assembler functions UNIT II ASSEMBLERS Assembler Assembler which converts assembly language programs into object files. Object files contain a combination of machine instructions, data, and information

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of

More information

Model Answer of System Software B. Tech. (4 th Semester Examination) Paper Code: AR Branch: Information Technology

Model Answer of System Software B. Tech. (4 th Semester Examination) Paper Code: AR Branch: Information Technology Model Answer of System Software B. Tech. (4 th Semester Examination) Paper Code: AR-9083 Branch: Information Technology Time Allowed: 3hours Maximum Marks: 100 Part-A (All questions are compulsory) Objective

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the

More information

Memory Management and Protection

Memory Management and Protection Part IV Memory Management and Protection Sadeghi, Cubaleska RUB 2008-09 Course Operating System Security Memory Management and Protection Main Memory Virtual Memory Roadmap of Chapter 4 Main Memory Background

More information

Machine Code and Assemblers November 6

Machine Code and Assemblers November 6 Machine Code and Assemblers November 6 CSC201 Section 002 Fall, 2000 Definitions Assembly time vs. link time vs. load time vs. run time.c file.asm file.obj file.exe file compiler assembler linker Running

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Operating System Concepts 8 th Edition,! Silberschatz, Galvin and Gagne 2009! Chapter 8: Memory Management Background" Swapping " Contiguous Memory Allocation" Paging" Structure

More information

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts Memory management Last modified: 26.04.2016 1 Contents Background Logical and physical address spaces; address binding Overlaying, swapping Contiguous Memory Allocation Segmentation Paging Structure of

More information

Lec 13: Linking and Memory. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements

Lec 13: Linking and Memory. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements Lec 13: Linking and Memory Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University PA 2 is out Due on Oct 22 nd Announcements Prelim Oct 23 rd, 7:30-9:30/10:00 All content up to Lecture on Oct

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium 8.2 Silberschatz, Galvin

More information

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management Part Four - Memory Management 8.1 Background Chapter 8: Memory-Management Management Strategies Program must be brought into memory and placed within a process for it to be run Input queue collection of

More information

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register

Memory Management. 3. What two registers can be used to provide a simple form of memory protection? Base register Limit Register Memory Management 1. Describe the sequence of instruction-execution life cycle? A typical instruction-execution life cycle: Fetches (load) an instruction from specific memory address. Decode the instruction

More information

Chapter 9: Memory Management. Background

Chapter 9: Memory Management. Background 1 Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 9.1 Background Program must be brought into memory and placed within a process for

More information