Suppose we wish to sort the following values: 84, 22, 19, 11, 60, 68, 31, 29, 58, 23, 45, 93, 48, 31, 7. Assume that: we have three pages of memory for sorting; we will use an external sorting algorithm with a 2-way merge; a page only holds two values. We do not use double buffering and we use quick sort in pass 0 to produce the initial runs. For each sorting pass, show the contents of all temporary files except that you should fully utilize the buffers by sorting every 3 pages into a run in pass 0. Could you show step by step detailed explaination for this?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Suppose we wish to sort the following values: 84, 22, 19, 11, 60, 68, 31, 29, 58, 23, 45, 93, 48, 31, 7. Assume that: we have three pages of memory for sorting; we will use an external sorting algorithm with a 2-way merge; a page only holds two values. We do not use double buffering and we use quick sort in pass 0 to produce the initial runs. For each sorting pass, show the contents of all temporary files except that you should fully utilize the buffers by sorting every 3 pages into a run in pass 0. Could you show step by step detailed explaination for this?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Suppose we wish to sort the following values: 84, 22, 19, 11, 60, 68, 31, 29, 58, 23, 45, 93, 48, 31, 7. Assume that: we have three pages of memory for sorting; we will use an external sorting algorithm with a 2-way merge; a page only holds two values. We do not use double buffering and we use quick sort in pass 0 to produce the initial runs. For each sorting pass, show the contents of all temporary files except that you should fully utilize the buffers by sorting every 3 pages into a run in pass 0. 

But the question states that in the first pass quick sort algorithm is to be used. Could you explain that step?? How do we create array blocks? is there a formula?? 

Page 1
Ink have Athe follauing values in Ahe
fallowing
guven quedion
84, 22,19, 1L, 60,68, 31, 29,58,23,45,93,48,
In finst
all
31,7
Lotepue mege
thevaluio
84,22/|19, 11 Go, 68 31,29 |58,23 15,93/ 4631 7
[22,84||1,19 60, 68
29,31|23,58 15,93 31,48 7
,19
22,84
2931
60,68
23,46
58,93
7,31|
48
14,19
22,29
31,60
68 84
7,23
31,45
48,58
93
7,11
19,22
2329
31,31
45,48
58,60
68,84
93
Transcribed Image Text:Page 1 Ink have Athe follauing values in Ahe fallowing guven quedion 84, 22,19, 1L, 60,68, 31, 29,58,23,45,93,48, In finst all 31,7 Lotepue mege thevaluio 84,22/|19, 11 Go, 68 31,29 |58,23 15,93/ 4631 7 [22,84||1,19 60, 68 29,31|23,58 15,93 31,48 7 ,19 22,84 2931 60,68 23,46 58,93 7,31| 48 14,19 22,29 31,60 68 84 7,23 31,45 48,58 93 7,11 19,22 2329 31,31 45,48 58,60 68,84 93
Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY