Representing Data Elements By Ameya Sabnis CS 257 Section II Representing Block and Record Addresses.

Slides:



Advertisements
Similar presentations
Chapter 6: Memory Management
Advertisements

CS4432: Database Systems II Buffer Manager 1. 2 Covered in week 1.
The Linux Kernel: Memory Management
Dr. Kalpakis CMSC 661, Principles of Database Systems Representing Data Elements [12]
1. 1. Database address space 2. Virtual address space 3. Map table 4. Translation table 5. Swizzling and UnSwizzling 6. Pinned Blocks 2.
Chapter 11: File System Implementation
Tuples vs. Records CREAT TABLE MovieStar ( Name CHAR (30), Address VARCHAR (255), Gender CHAR (1), DataOfBirth Date ); Tuples are similar to records or.
 Presented By:Payal Gupta  Roll Number:106 (225 in scetion 2)  Professor :Tsau Young Lin.
Arrays. Memory organization Table at right shows 16 bytes, each consisting of 8 bits Each byte has an address, shown in the column to the left
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
BTrees & Bitmap Indexes
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
Representing Block and Record Addresses Rajhdeep Jandir ID: 103.
Database Implementation Issues CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 5 Slides adapted from those used by Jennifer Welch.
Chapter 12: File System Implementation
CS 4432lecture #61 CS4432: Database Systems II Lecture #6 Professor Elke A. Rundensteiner.
File System Structure §File structure l Logical storage unit l Collection of related information §File system resides on secondary storage (disks). §File.
1 Representing Data Elements Fields, Records, Blocks Variable-length Data Modifying Records Source: our textbook.
13.6 Representing Block and Record Addresses Ramya Karri CS257 Section 2 ID: 206.
Memory Management Last Update: July 31, 2014 Memory Management1.
Bhanu Choudhary CS257 Section 1 ID: 101.  Introduction  Addresses in Client-Server Systems  Logical and Structured Addresses  Pointer Swizzling 
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
13.6 Representing Block and Record Addresses
Chapter 11: File System Implementation Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Structure.
1 CMSC 341 Extensible Hashing Chapter 5, Section 6 (pp. 200 – 203)
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
Virtual Memory By Steven LaBarbera. What I plan to cover  The history of virtual memory  How virtual memory has evolved  How virtual memory is used.
Dr. T. Doom 11.1 CEG 433/633 - Operating Systems I Chapter 11: File-System Implementation File structure –Logical storage unit –Collection of related information.
Silberschatz and Galvin  Operating System Concepts File-System Implementation File-System Structure Allocation Methods Free-Space Management.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
CS 241 Section Week #9 (11/05/09). Topics MP6 Overview Memory Management Virtual Memory Page Tables.
10.1 CSE Department MAITSandeep Tayal 10 :File-System Implementation File-System Structure Allocation Methods Free-Space Management Directory Implementation.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 11 File-System Implementation Slide 1 Chapter 11: File-System Implementation.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
CHAPTER 3-3: PAGE MAPPING MEMORY MANAGEMENT. VIRTUAL MEMORY Key Idea Disassociate addresses referenced in a running process from addresses available in.
Representing Block & Record Addresses
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Chapter 31 Chapter 3 Representing Data Elements. Chapter 32 Fields, Records, Blocks, Files Fields (attributes) need to be represented by fixed- or variable-length.
1 Record Modifications Chapter 13 Section 13.8 Neha Samant CS 257 (Section II) Id 222.
CS 140 Lecture Notes: Virtual Memory
Computer Organization
Memory Management Virtual Memory.
Virtual memory.
File-System Implementation
Memory Management 6/20/ :27 PM
Chapter 11: File System Implementation
Data Structures Interview / VIVA Questions and Answers
CS 140 Lecture Notes: Virtual Memory
O.S Lecture 13 Virtual Memory.
Disk Storage, Basic File Structures, and Buffer Management
Database Implementation Issues
Chapter 11: File System Implementation
Module IV Memory Organization.
MICROPROCESSOR MEMORY ORGANIZATION
Lecture 21: Indexes Monday, November 13, 2000.
CS 140 Lecture Notes: Virtual Memory
Overview: File system implementation (cont)
Representing Block & Record Addresses
File-System Structure
DATABASE IMPLEMENTATION ISSUES
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter 11: File System Implementation
Database Implementation Issues
CS 140 Lecture Notes: Virtual Memory
Advance Database System
Database Implementation Issues
Lecture 20: Representing Data Elements
Presentation transcript:

Representing Data Elements By Ameya Sabnis CS 257 Section II Representing Block and Record Addresses

Pointer Swizzling Generally pointers and addresses are the part of records Every block or record or object has two addresses 1. Database Address: When the data or object is in the secondary storage. These are of sequence of 8 bytes. 2. Memory Address: This is typically a virtual memory address. The address are typically of 4 bytes

Pointer Swizzling A translation table is needed to translate all the database addresses in the virtual memory to their current memory address. The translation table can be shown as: Database address Memory Address Translation Table

Pointer Swizzling To avoid cost of translating from database address to memory address, several techniques are used collectively known as the Pointer Swizzling. The general idea is when the block is moved from secondary to main memory the pointer is swizzed. The pointer basically consists of a bit to show where the pointer currently is. Consider the following example

Disk Memory Block 1 Block 2 Swizzled Read into Memory Unswizzled

Types of Pointer Swizzling Automatic Swizzling Swizzling on demand No Swizzling

Automatic Swizzling In this as soon as the block is moved to memory all its pointers and addresses are entered into translation table. The translation table is created straightforwardly, as we know where in the memory the block is moved. When we enter the database address in the translation table, we may find it in table because its block is in memory. Thus we replace the database address by corresponding address and set swizzled bit true

Swizzling on Demand Here all pointers are left unswizzled when the block is moved into memory. We enter the address and the address of its pointer in the translation table along with its memory equivalent, only when we follow pointer P, inside the block memory. Swizzling on demand tries to get all its pointers swizzled quickly and efficiently.

No Swizzling No pointers are swizzled in this case. The translation table is created so that pointers will be followed in their unswizzled form. The only advantage with this is the records cannot be pinned in memory.

Returning Blocks to Disk When a block is moved back from memory to disk all its pointers are unswizzled, also its memory addresses are replaced by database addresses. Using the translation table it is possible to find out the database address corresponding to the memory address.

Pinned Records and Blocks A block is said to be pinned if it cannot be moved back to disk safely. A block is pinned when it is pointed by some swizzled pointer externally. It is necessary to unswizzled all the pointers which points to the pinned block. The translation table must record, for each database address whose data item is in memory the places in memory where the swizzled pointers to that item exist.

THANK YOU