CS FundamentalsVery hardGATE CS · PSU (ISRO/BARC)
A file of 1000 blocks is sorted by external merge sort with M = 11 buffer blocks (sorted runs of M blocks are created in pass 0, then (M − 1)-way merges). How many passes in total are needed, and how many block transfers if each pass reads and writes every block once?
- A. 4 passes, 8,000 transfers
- B. 3 passes, 6,000 transfers
- C. 3 passes, 3,000 transfers
- D. 2 passes, 4,000 transfers
Correct answer: B. 3 passes, 6,000 transfers
Pass 0 makes ⌈1000/11⌉ = 91 runs; each merge pass divides the run count by 10, needing 2 merge pass(es). Total 3 passes × 2 × 1000 = 6,000 transfers.
More DBMS and SQL questions
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- T1 has 3 operations, T2 has 2 and T3 has 2. How many concurrent schedules (interleavings that keep each transaction's own order) exist…
- A query must list departments whose average salary exceeds 50000, considering only employees hired after 2020. Which clause placement is…
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…
- R(A, B, C, D, E) has functional dependencies CE → A, A → CE, BE → A, BC → E, E → BC. What is the highest normal form R satisfies?
- A transaction has executed its final statement, but its commit record is not yet on stable storage. Which state is it in?