Docsity

Multiphase Multiway Merge sort Algorithms - Assignment 1 | CPSC 608, Assignments of Deductive Database Systems

Toggle sidebar
bg1
CPSC-608 Database Systems
Fall 2008
Instructor: Dr. Jianer Chen
Office: HRBB 309B
Phone: 845-4259
Office Hours: T-TR 10:50am-12:20noon
Teaching Assistant: Yang Liu
Office: HRBB 315B
Phone: 862-4386
Office Hours: M-W 2:30pm-4:00pm (or by appointment)
Assignment # 1
(Due September 25)
1. Suppose that we want to sort a relation Rof 1M blocks, and suppose that
the main memory can hold 500 blocks. Moreover, suppose that the average
time for reading/writing a disk block is 40ms. The Two-phase Multiway
MergeSort algorithm discussed in class seems not directly applicable to this
instance.
Develop a Multi-Phase Multiway MergeSort algorithm that sorts the
relation R. Estimate the running time of your algorithm.
2. Apply any of the disk optimization methods we discussed in class to
further reduce the running time of your algorithm in Question 1. Here we
assume that the disk block read/write time 40ms consists of 31ms seek time,
8ms rotational delay, and 1ms transfer time. We also assume that a track
holds 500 blocks, and that traversing to an adjacent track on the disk takes
5ms. Estimate the running time of your algorithm.
1

Partial preview of the text

Download Multiphase Multiway Merge sort Algorithms - Assignment 1 | CPSC 608 and more Assignments Deductive Database Systems in PDF only on Docsity!

CPSC-608 Database Systems

Fall 2008

Instructor: Dr. Jianer Chen Office: HRBB 309B Phone: 845- Email: [email protected] Office Hours: T-TR 10:50am-12:20noon

Teaching Assistant: Yang Liu Office: HRBB 315B Phone: 862- Email: [email protected] Office Hours: M-W 2:30pm-4:00pm (or by appointment)

Assignment # 1

(Due September 25)

  1. Suppose that we want to sort a relation R of 1M blocks, and suppose that the main memory can hold 500 blocks. Moreover, suppose that the average time for reading/writing a disk block is 40ms. The Two-phase Multiway MergeSort algorithm discussed in class seems not directly applicable to this instance. Develop a Multi-Phase Multiway MergeSort algorithm that sorts the relation R. Estimate the running time of your algorithm.
  2. Apply any of the disk optimization methods we discussed in class to further reduce the running time of your algorithm in Question 1. Here we assume that the disk block read/write time 40ms consists of 31ms seek time, 8ms rotational delay, and 1ms transfer time. We also assume that a track holds 500 blocks, and that traversing to an adjacent track on the disk takes 5ms. Estimate the running time of your algorithm.