Bhanu Choudhary CS257 Section 1 ID: 101.  Introduction  Addresses in Client-Server Systems  Logical and Structured Addresses  Pointer Swizzling 

Slides:



Advertisements
Similar presentations
CS4432: Database Systems II Buffer Manager 1. 2 Covered in week 1.
Advertisements

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.
Tuples vs. Records CREAT TABLE MovieStar ( Name CHAR (30), Address VARCHAR (255), Gender CHAR (1), DataOfBirth Date ); Tuples are similar to records or.
1. What problems we would have during:  Insertion  Deletion  Update 2.
 Presented By:Payal Gupta  Roll Number:106 (225 in scetion 2)  Professor :Tsau Young Lin.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
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.
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.
12.5 Record Modifications Sadiya Hameed ID: 206 CS257.
Computer Organization and Architecture
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
13.6 Representing Block and Record Addresses Ramya Karri CS257 Section 2 ID: 206.
Representing Data Elements By Ameya Sabnis CS 257 Section II Representing Block and Record Addresses.
DISK STORAGE INDEX STRUCTURES FOR FILES Lecture 12.
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
13.6 Representing Block and Record Addresses
Computer Architecture Lecture 28 Fasih ur Rehman.
CMPT 454, Simon Fraser University, Fall 2009, Martin Ester 75 Database Systems II Record Organization.
Chapter 3 Representing Data Elements 1.How to lay out data on disk 2.How to move it to memory.
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.
Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright © 2004 Pearson Education, Inc.
CS 4432lecture #51 Data Items Records Blocks Files Memory Next:
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 11 File-System Implementation Slide 1 Chapter 11: File-System Implementation.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Representing Block & Record Addresses
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
W4118 Operating Systems Instructor: Junfeng Yang.
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 Query Processing Part 1: Managing Disks. 2 Main Topics on Query Processing Running-time analysis Indexes (e.g., search trees, hashing) Efficient algorithms.
1 Record Modifications Chapter 13 Section 13.8 Neha Samant CS 257 (Section II) Id 222.
File System Implementation
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Computer Organization
Next: Data Items Records Blocks Files Memory CS 4432 lecture #5.
Module 11: File Structure
File-System Implementation
Day 21 Virtual Memory.
Secondary Storage Management 13.5 Arranging data on disk
Day 22 Virtual Memory.
Chapter 11: File System Implementation
Database Management Systems (CS 564)
9/12/2018.
Day 20 Virtual Memory.
CS 245: Database System Principles Notes 03: Disk Organization
Chapter 11: File System Implementation
Disk Storage, Basic File Structures, and Buffer Management
Database Implementation Issues
Paging Lecture November 2018.
Disk storage Index structures for files
Secondary Storage Management 13.5 Arranging data on disk
Chapter 11: File System Implementation
Computer Architecture
Lecture 21: Indexes Monday, November 13, 2000.
Representing Block & Record Addresses
CS 245: Database System Principles Disk Organization
Variable Length Data and Records
DATABASE IMPLEMENTATION ISSUES
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter 11: File System Implementation
Database Implementation Issues
VIJAYA PAMIDI CS 257- Sec 01 ID:102
Database Implementation Issues
Lecture 20: Representing Data Elements
Presentation transcript:

Bhanu Choudhary CS257 Section 1 ID: 101

 Introduction  Addresses in Client-Server Systems  Logical and Structured Addresses  Pointer Swizzling  Programmer Control of Swizzling  Pinned Records and Blocks

 Address of a block and Record ◦ In Main Memory  Address of the block is the virtual memory address of the first byte  Address of the record within the block is the virtual memory address of the first byte of the record ◦ In Secondary Memory: sequence of bytes describe the location of the block in the overall system  Sequence of Bytes describe the location of the block : the device Id for the disk, Cylinder number, etc.

 The addresses in address space are represented in two ways ◦ Physical Addresses: byte strings that determine the place within the secondary storage system where the record can be found. ◦ Logical Addresses: arbitrary string of bytes of some fixed length  Physical Address bits are used to indicate: ◦ Host to which the storage is attached ◦ Identifier for the disk ◦ Number of the cylinder ◦ Number of the track ◦ Offset of the beginning of the record

 Map Table relates logical addresses to physical addresses. LogicalPhysical Logical Address Physical Address A DDRESSES IN C LIENT -S ERVER S YSTEMS (C ONTD..)

 Purpose of logical address?  Gives more flexibility, when we ◦ Move the record around within the block ◦ Move the record to another block  Gives us an option of deciding what to do when a record is deleted. Reco rd 4 Reco rd 3 Reco rd 2 Reco rd 1 Header Offset table Unused

 Having pointers is common in an object- relational database systems  Important to learn about the management of pointers  Every data item (block, record, etc.) has two addresses: ◦ database address: address on the disk ◦ memory address, if the item is in virtual memory

 Translation Table: Maps database address to memory address  All addressable items in the database have entries in the map table, while only those items currently in memory are mentioned in the translation table DbaddrMem-addr Database address Memory Address

 Pointer consists of the following two fields ◦ Bit indicating the type of address ◦ Database or memory address ◦ Example Disk Block 2 Block 1 Memory Swizzled Unswizzled Block 1

 Block 1 has a record with pointers to a second record on the same block and to a record on another block  If Block 1 is copied to the memory ◦ The first pointer which points within Block 1 can be swizzled so it points directly to the memory address of the target record ◦ Since Block 2 is not in memory, we cannot swizzle the second pointer

 Three types of swizzling ◦ Automatic Swizzling  As soon as block is brought into memory, swizzle all relevant pointers. ◦ Swizzling on Demand  Only swizzle a pointer if and when it is actually followed. ◦ No Swizzling  Pointers are not swizzled they are accesses using the database address.

 Unswizzling ◦ When a block is moved from memory back to disk, all pointers must go back to database (disk) addresses ◦ Use translation table again ◦ Important to have an efficient data structure for the translation table

 A block in memory is said to be pinned if it cannot be written back to disk safely.  If block B1 has swizzled pointer to an item in block B2, then B2 is pinned ◦ Unpin a block, we must unswizzle any pointers to it ◦ Keep in the translation table the places in memory holding swizzled pointers to that item ◦ Unswizzle those pointers (use translation table to replace the memory addresses with database (disk) addresses