Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CMPT 454 L2 - Data Storage and Disk Access Exam with Complete Solutions, Exams of Database Management Systems (DBMS)

A comprehensive overview of data storage and disk access concepts, covering topics such as memory hierarchy, hard disk drives (hdds), solid-state drives (ssds), buffer management, and disk scheduling algorithms. It includes detailed explanations, examples, and complete solutions to exercises, making it a valuable resource for students studying computer science or related fields.

Typology: Exams

2024/2025

Available from 02/14/2025

lyudmila-hanae
lyudmila-hanae šŸ‡ŗšŸ‡ø

1

(2)

7.8K documents

1 / 58

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMPT 454 L2 - Data Storage and Disk Access Exam
With Complete Solutions
Data Storage and Disk Access involves what?
- Memory Hierarchy
- HDs
- HD reliability and efficiency
- SSD
- Buffer Management
- Data Storage
What would be "ideal" memory (6 unrealistic characteristics)
- Unlimited capacity
- High Bandwidth
- Instantaneous access
- Persistent
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a

Partial preview of the text

Download CMPT 454 L2 - Data Storage and Disk Access Exam with Complete Solutions and more Exams Database Management Systems (DBMS) in PDF only on Docsity!

CMPT 454 L2 - Data Storage and Disk Access Exam With Complete Solutions

Data Storage and Disk Access involves what?- Memory Hierarchy

  • HDs
  • HD reliability and efficiency
  • SSD
  • Buffer Management
  • Data Storage What would be "ideal" memory (6 unrealistic characteristics)- Unlimited capacity
  • High Bandwidth
  • Instantaneous access
  • Persistent
  • Reliable
  • Free DB data must be stored in ________ __________, but operated (and registers) on in___________ ____________ persistent storagemain memory

Persistent StorageNon-volatile storage on a secondary storage medium such as a hard disk.

Transfer of data from memory to storage is very ________-__________. It requires_________ management and includes a ___________ time consuming careful buffer Volatile Memory consists of:SRAM: registers and L1, L2, and L3 caches

What are the 2 main types of secondary memoryHDD and SSD

HDD and their propertiesHard disk drive

  • Most of persistent storage device
  • Cheap
  • Relatively unreliable
  • Significantly slower than primary memory SSDSolid State Drive
  • Faster
  • Expensive
  • Increasing use in DBs

Persistent Memory consists of:Non-volatile RAM: NVM, NVRAM, SCM NVMNon-volatile memory

NVRAMNon-volatile RAM

SCMStorage Class Memory

Characteristics of NVRAM:- Byte-addressable

  • Persistent
  • Differ w/ speed, capacity, and cost
  • large capacity and cheap For Classic DBMS:"Main memory is assumed to be much SMALLER OR LARGER than persistent storage?" smaller For Classic DBMS:"Performance is primarily determined by _______ __________ speed." storage access For Classic DBMS:"Transaction processing occurs in ______ ____________ as DB resides in __________ main memory, storage For Classic DBMS:_______ must be transferred b/w main memory and storage

In-Memory DBMS:______ _____ of DRAM allows for large _______ ________ to store entire (or at least working) DB

In-Memory DBMS implications1. No I/O during execution of transactions

  1. Changes must still be made persistent
  2. Violates many assumptions of classic DBMS What is a benefit when making changes w/in In-Memory DBMSPerform in the background

Can In-Memory DBMS make use of persistent memory still?Yes

Traditional DB requires both....persistent memory working/transient memory _____________ are performed on data as it's transferred from ________ to ________________ Operationsdisk to main memory

arcs called __________concentric rings called tracks called sectors Sectors contain ________ sequence of _________contiguous, bytes

Cylinderset of tracks with same diameter on all surfaces

BlocksUnits which are read from OR written to

When disk is formatted, the block size is set to... Otw block size is ______a small number of sectors (4 - 16 kB) 4 kB Blocks are separated by...fixed sized gaps which contain ctrl info

Blocks can be addressed by...1. Cylinder #

  1. Surface #
  2. Block # LBALogical Block Address: IDs a block by numbering from 0 to block capacity - 1 (like an array) Blocks map to _______ as a ______-_______ abstractionpages higher-level Sector is an ________ of a trackarc
  1. (Initial read of disk block)
  2. Consider inserting new record into disk block (which contains existing records) Do blind writes require an initial reading of a disk blockYes

Visually explain writing data to a disk1. New record from main memory

  1. Overwrite existing data Difference b/w (no) read-modify-write cyclesNo read => writing over existing data

Disk head for each ___________surface

Do disk heads move separately or together?separately

Disk head arrayDisk heads move together in identical positions respective to their surfaces

Where must a disk head be in order to read/write a blockover it

Can multiple disk heads read/write simultaneously?No, only one at time

Time to access a block on a disk is composed of:1. Seek time

  1. Rotational Delay
  2. Transfer time Seek timeTime in which disk head pivots over the desired track Radial movement Rotational Delay

Average Rotational Delay0.5 * MAX(rotational delay)

Transfer time depends on...Request size

Transfer time for entire track(1 000ms * 60s) / disk rpm for the entire track

Transfer time for one block(1 000ms * 60s) / disk rpm / blocks per track

Minimum Seek Time 0 Disk head is on the desired track Maximum Seek TimeTime to move from innermost to outermost track

Average Seek Time

1/3 maximum seek time NOT 1/

Does practice head move at constant speed?In practice no, it accelerates/decelerates

Access Time Comparison Reorder Register, DRAM, and Cache in transfer of data speed b/w main memory and x Fastest to SlowestRegister CacheDRAM

Reducing Disk Access TimeStore related data in close proximity there are milliseconds of difference b/w accessing 2 records in adjacent blocks vs ondifferent tracks

Example methods of buffering Data1. Prefetching

  1. Double Buffering Disk Scheduling AlgorithmsRequests to read block(s) are processed in some order

FIFOFirst-come-first-served Processes requests in order in which they are received Elevator and variantseg: SCAN, LOOK, C-SCAN, C-LOOK Requests buffered and disk head moves in ONE directions processing requests Arm then reverses direction and processing requests in the opposite direction Does FIFO or Elevator algo generally perform better?Elevator

Shortest-seek...

Goals of Disk Scheduling Algorithms1. Reduce overall access time

  1. Avoid Starvation HDD failure is high when?1. at the start (DoA)
  2. at the end Creates a bathtub curve General lifespan of HDDs3-5 years

Types of Disk Failures- Intermittent