Representing Block & Record Addresses

Slides:



Advertisements
Similar presentations
DAT2343 File Storage and Access © Alan T. Pinck / Algonquin College; 2003.
Advertisements

Storing Data: Disk Organization and I/O
CS4432: Database Systems II Buffer Manager 1. 2 Covered in week 1.
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.
Representing Block and Record Addresses Rajhdeep Jandir ID: 103.
CS 4432lecture #61 CS4432: Database Systems II Lecture #6 Professor Elke A. Rundensteiner.
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.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Disk Storage Copyright © 2004 Pearson Education, Inc.
Introduction to Database Systems 1 Storing Data: Disks and Files Chapter 3 “Yea, from the table of my memory I’ll wipe away all trivial fond records.”
Bhanu Choudhary CS257 Section 1 ID: 101.  Introduction  Addresses in Client-Server Systems  Logical and Structured Addresses  Pointer Swizzling 
13.6 Representing Block and Record Addresses
Chapter 3 Representing Data Elements 1.How to lay out data on disk 2.How to move it to memory.
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.
Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright © 2004 Pearson Education, Inc.
12.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 12: File System Implementation Chapter 12: File System Implementation.
Disk & File System Management Disk Allocation Free Space Management Directory Structure Naming Disk Scheduling Protection CSE 331 Operating Systems Design.
Section 13.2 – Secondary storage management (Former Student’s Note)
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.
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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Lec 5 part1 Disk Storage, Basic File Structures, and Hashing.
1 Record Modifications Chapter 13 Section 13.8 Neha Samant CS 257 (Section II) Id 222.
Query Processing Part 1: Managing Disks 1.
CS 140 Lecture Notes: Virtual Memory
Computer Organization
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
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
9/12/2018.
CS 140 Lecture Notes: Virtual Memory
Chapter 11: File System Implementation
Disk Storage, Basic File Structures, and Buffer Management
Secondary Storage Management 13.5 Arranging data on disk
Chapter 11: File System Implementation
Computer Architecture
Computer-System Architecture
Module 2: Computer-System Structures
Overview Continuation from Monday (File system implementation)
Lecture 21: Indexes Monday, November 13, 2000.
CS 140 Lecture Notes: Virtual Memory
Lecture 15: Midterm Review Data Storage
Overview: File system implementation (cont)
CS 245: Database System Principles Disk Organization
File-System Structure
Module 2: Computer-System Structures
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter 11: File System Implementation
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
CS 140 Lecture Notes: Virtual Memory
Lecture 15: Data Storage Tuesday, February 20, 2001.
Lecture 20: Representing Data Elements
Presentation transcript:

Representing Block & Record Addresses

Outline Types of Addresses Pointer Swizzling Returning Blocks to Disk Automatic swizzling Swizzling on demand No swizzling Programmer control of swizzling Returning Blocks to Disk Pinned Records and Blocks

Types of Addresses What is address? continued.. Commonly, database system consists of Client – Server architecture Client application uses virtual address space Server uses database address space, referred to as blocks continued..

Types of Addresses Physical Address Logical Address Byte strings referring to the place within secondary storage where data(record) is saved Logical Address Arbitrary string of bytes of some fixed length that maps to physical address continued..

Types of Addresses Physical Address Host name: My PC Disk name:Megatron747 Cylinder # 10 (total #216 ) Track (Surface) # 3 (total # 24) (within cylinder) (A sector has total # of 212 bytes. Block # 2 (total # 4 sectors) (total # 28 sectors per track (average) ) ) Offset of the beginning record at10th byte

Types of Addresses Physical Properties Rotation 11 miliseconds Acceleration of disk arms is about 5Gravational force Start and stop need 1 milisecond

Types of Addresses Disk name:Megatron747 Compute the bytes in the following devices Cylinder Track Block

Map Table

More on Logical Address Purpose Easy updating of records Structured address

Pointer Swizzling As discussed earlier, every record in memory has two forms of addresses We can use either to access record When block is moved from secondary storage to main memory pointers within block are “swizzled”,i.e translated from database address space (Server) to virtual address space (Client) Consists of a bit indicating if pointer is currently a database address or memory address The database or memory pointer itself

1 Pointer Swizzling

Types of Swizzling Automatic Swizzling Swizzling on Demand Whenever a block is moved to main memory swizzle all its pointers Swizzling on Demand Leave all pointers unswizzled when block is first loaded into memory, swizzle the pointer only if we need to follow it Programmer Control of Swizzling No Swizzling Never swizzle the pointers. Advantage is there is no need to load record in main memory

Returning Blocks to Disk When a block is moved from memory back to disk, any pointers within that block must be unswizzled, i.e. memory address must be replaced by database address.

Pinned Records and Blocks ‘Pinned’ means if the block cannot be written back to disk safely Indicated by a bit located in the header of the block To write a pinned block back to disk we need to ‘unpin’ the block Unswizzle any pointers associated to it