ICS 1431 9. Linking and Sharing 9.1 Single-Copy Sharing –Why Share –Requirements for Sharing 9.2 Static Linking and Sharing –Sharing in Systems w/o Segmentation.

Slides:



Advertisements
Similar presentations
Part IV: Memory Management
Advertisements

Operating Systems1 9. Linking and Sharing 9.1 Single-Copy Sharing –Why Share –Requirements for Sharing –Linking and Sharing 9.2 Sharing in Systems without.
Assembler/Linker/Loader Mooly Sagiv html:// Chapter 4.3 J. Levine: Linkers & Loaders
Linkage Editors Difference between a linkage editor and a linking loader: Linking loader performs all linking and relocation operations, including automatic.
Linking & Loading CS-502 Operating Systems
Mr. D. J. Patel, AITS, Rajkot 1 Operating Systems, by Dhananjay Dhamdhere1 Static and Dynamic Memory Allocation Memory allocation is an aspect of a more.
CS 31003: Compilers ANIRUDDHA GUPTA 11CS10004 G2 CLASS DATE : 24/07/2013.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
Memory Management Chapter 7.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Memory Management Design & Implementation Segmentation Chapter 4.
Chapter 10 Storage management
1 COMP 144 Programming Language Concepts Felix Hernandez-Campos Lecture 33: Code Generation and Linking COMP 144 Programming Language Concepts Spring 2002.
Memory Management.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
Chapter 5: Memory Management Dhamdhere: Operating Systems— A Concept-Based Approach Slide No: 1 Copyright ©2005 Memory Management Chapter 5.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
CompSci 143A1 9. Linking and Sharing 9.1 Single-Copy Sharing –Why Share –Requirements for Sharing –Linking and Sharing 9.2 Sharing in Systems without Virtual.
Memory management. Instruction execution cycle Fetch instruction from main memory Decode instruction Fetch operands (if needed0 Execute instruction Store.
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Chapter 3 Memory Management: Virtual Memory
Operating System Chapter 7. Memory Management Lynn Choi School of Electrical Engineering.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
© 2004, D. J. Foreman 1 Memory Management. © 2004, D. J. Foreman 2 Building a Module -1  Compiler ■ generates references for function addresses may be.
Memory Management (Ch. 8).  Compilers generate instructions that make memory references.  Code and data must be stored in the memory locations that.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Silberschatz and Galvin  Operating System Concepts Module 8: Memory Management Background Logical versus Physical Address Space Swapping Contiguous.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Operating Systems Principles Memory Management Lecture 9: Sharing of Code and Data in Main Memory 主講人:虞台文.
RNJ 05/05/091 6 Further System Fundamentals (HL) ‏ 6.3 Operating Systems and Utility Software Linkers, Loaders and Library Managers.
Joonwon Lee Process and Address Space.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Static Shared Library. Non-shared v.s. Shared Library A library is a collection of pre-written function calls. Using existing libraries can save a programmer.
Lecture 5 Page 1 CS 111 Online Processes CS 111 On-Line MS Program Operating Systems Peter Reiher.
Operating Systems Lecture 31.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
CSc 453 Linking and Loading
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Operating Systems Lecture 31 Syed Mansoor Sarwar.
Chapter 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Binding & Dynamic Linking Presented by: Raunak Sulekh(1013) Pooja Kapoor(1008)
Program Execution in Linux David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Lecture 3 Translation.
Basic Paging (1) logical address space of a process can be made noncontiguous; process is allocated physical memory whenever the latter is available. Divide.
Assemblers, linkers, loaders
Memory management.
Names and Attributes Names are a key programming language feature
Computer Science 210 Computer Organization
The University of Adelaide, School of Computer Science
Linking & Loading.
Memory Management © 2004, D. J. Foreman.
Chapter 9 – Real Memory Organization and Management
Chapter 8 Main Memory.
Program Execution in Linux
CS-3013 Operating Systems C-term 2008
Computer Science 210 Computer Organization
Machine Independent Features
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Lecture 3: Main Memory.
The Assembly Language Level
Linking & Loading CS-502 Operating Systems
Operating System Chapter 7. Memory Management
Program Execution in Linux
10/6: Lecture Topics C Brainteaser More on Procedure Call
Linking & Loading CS-502 Operating Systems
An introduction to systems programming
EECE.4810/EECE.5730 Operating Systems
Presentation transcript:

ICS Linking and Sharing 9.1 Single-Copy Sharing –Why Share –Requirements for Sharing 9.2 Static Linking and Sharing –Sharing in Systems w/o Segmentation or Paging –Sharing in Paging Systems –Sharing in Segmented Systems 9.3 Dynamic Linking and Sharing 9.4 Principles of DSM –The User's View of DSM 9.5 Implementations of DSM –Implementing Unstructured DSM –Implementing Structured DSM

ICS 1432 Single-copy sharing why share –processes need to access common data –better utilization of memory (code, system tables, data bases) requirement for sharing –how to express what is shared a priori agreement (e.g., system components) language construct (e.g., shmget/shmat) –shared code must be reentrant (read-only) –stack, heap must be replicated per process

ICS 1433 Static linking/sharing linking resolves external references sharing links to the same module static linking/sharing: –resolve references before execution starts

ICS 1434 Sharing w/o segmentation/paging with one or no RR: –all memory of a process is contiguous –share user programs: possible by partial overlap only too restrictive and difficult; generally not used –share system components: agree on a starting position linker resolves references to that location Figure 9-1

ICS 1435 Sharing w/o segmentation/paging with multiple RRs –CBR’s can point to same copy of code –SBR’s can point to private copies of stack, etc. Figure 9-2

ICS 1436 Sharing in paging systems PT entries of different processes point to the same page frame data pages: unrestricted code pages: must have the same page#’s in all PTs to allow self-references Figure 9-3 Note: BR can’t be used -- paged system has no concept of function boundaries

ICS 1437 Sharing in segmented systems ST entries of different processes point to the same segment in PM data pages: unrestricted code pages: –assign same segment#’s in all STs, or –use BR: function call loads cbr self-references have the form w(CBR) other references have the form (s,w)

ICS 1438 Dynamic linking/sharing basic principles: –self-references resolved using CBR –external references are indirect via a private linkage section –external reference (S,W) is resolved to (s,w) at runtime when first used (S,W are symbolic names) –(s,w) is entered in linkage section of process –code is unchanged –subsequent references use (s,w) without involving OS

ICS 1439 Dynamic linking/sharing compiler setup prior to execution Figure 9-4(a) memory after execution of load instruction Figure 9-4(b)

ICS Distributed shared memory