1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
erica [24]
3 years ago
10

It takes 2 seconds to read or write one block from/to disk and it also takes 1 second of CPU time to merge one block of records.

Assume that all input, output, and CPU processing is sequential and there is no waiting time. The block size is 100 records. a) (7) Give an optimal 4-way merging scheme to merge the 6 runs into 1. b) (7) What is the total time taken by the optimal scheme

Computers and Technology
1 answer:
Alexxx [7]3 years ago
5 0

Answer:

Part a: For optimal 4-way merging, initiate with one dummy run of size 0 and merge this with the 3 smallest runs. Than merge the result to the remaining 3 runs to get a merged run of length 6000 records.

Part b: The optimal 4-way  merging takes about 249 seconds.

Explanation:

The complete question is missing while searching for the question online, a similar question is found which is solved as below:

Part a

<em>For optimal 4-way merging, we need one dummy run with size 0.</em>

  1. Merge 4 runs with size 0, 500, 800, and 1000 to produce a run with a run length of 2300. The new run length is calculated as follows L_{mrg}=L_0+L_1+L_2+L_3=0+500+800+1000=2300
  2. Merge the run as made in step 1 with the remaining 3 runs bearing length 1000, 1200, 1500. The merged run length is 6000 and is calculated as follows

       L_{merged}=L_{mrg}+L_4+L_5+L_6=2300+1000+1200+1500=6000

<em>The resulting run has length 6000 records</em>.

Part b

<u><em>For step 1</em></u>

Input Output Time

Input Output Time is given as

T_{I.O}=\frac{L_{run}}{Size_{block}} \times Time_{I/O \, per\,  block}

Here

  • L_run is 2300 for step 01
  • Size_block is 100 as given
  • Time_{I/O per block} is 2 sec

So

T_{I.O}=\frac{L_{run}}{Size_{block}} \times Time_{I/O \, per\,  block}\\T_{I.O}=\frac{2300}{100} \times 2 sec\\T_{I.O}=46 sec

So the input/output time is 46 seconds for step 01.

CPU  Time

CPU Time is given as

T_{CPU}=\frac{L_{run}}{Size_{block}} \times Time_{CPU \, per\,  block}

Here

  • L_run is 2300 for step 01
  • Size_block is 100 as given
  • Time_{CPU per block} is 1 sec

So

T_{CPU}=\frac{L_{run}}{Size_{block}} \times Time_{CPU \, per\,  block}\\T_{CPU}=\frac{2300}{100} \times 1 sec\\T_{CPU}=23 sec

So the CPU  time is 23 seconds for step 01.

Total time in step 01

T_{step-01}=T_{I.O}+T_{CPU}\\T_{step-01}=46+23\\T_{step-01}=69 sec\\

Total time in step 01 is 69 seconds.

<u><em>For step 2</em></u>

Input Output Time

Input Output Time is given as

T_{I.O}=\frac{L_{run}}{Size_{block}} \times Time_{I/O \, per\,  block}

Here

  • L_run is 6000 for step 02
  • Size_block is 100 as given
  • Time_{I/O per block} is 2 sec

So

T_{I.O}=\frac{L_{run}}{Size_{block}} \times Time_{I/O \, per\,  block}\\T_{I.O}=\frac{6000}{100} \times 2 sec\\T_{I.O}=120 sec

So the input/output time is 120 seconds for step 02.

CPU  Time

CPU Time is given as

T_{CPU}=\frac{L_{run}}{Size_{block}} \times Time_{CPU \, per\,  block}

Here

  • L_run is 6000 for step 02
  • Size_block is 100 as given
  • Time_{CPU per block} is 1 sec

So

T_{CPU}=\frac{L_{run}}{Size_{block}} \times Time_{CPU \, per\,  block}\\T_{CPU}=\frac{6000}{100} \times 1 sec\\T_{CPU}=60 sec

So the CPU  time is 60 seconds for step 02.

Total time in step 02

T_{step-02}=T_{I.O}+T_{CPU}\\T_{step-02}=120+60\\T_{step-02}=180 sec\\

Total time in step 02 is 180 seconds

Merging Time (Total)

<em>Now  the total time for merging is given as </em>

T_{merge}=T_{step-01}+T_{step-02}\\T_{merge}=69+180\\T_{merge}=249 sec\\

Total time in merging is 249 seconds seconds

You might be interested in
Ok so another weird question! So if you know what google drive is and how to upload a video why does it keep adding hours! it ke
lesya [120]

Answer:Your video may be too long and you may not have that much storage left.

Explanation:

5 0
3 years ago
In a block-style business letter, the paragraphs are double-spaced and indented. <br> True or False
Sav [38]
I am pretty sure it is true
5 0
3 years ago
Read 2 more answers
Ken Olson, president of Digital Equipment Corp. in the late 1970's, Thomas J. Watson, chairman of IBM in the early 1940's, and T
tensa zangetsu [6.8K]

Answer:

All of the above is the correct answer to the given question .

Explanation:

As the Ken olson is the Ken Olson, president of the Digital Equipment Organization . Following are the predictions of  Ken olson of the the technology that are wrong.

  • Lack of creativity regarding the current applications that the user has would consider for the  technology.
  • Lack of creativity regarding the  user or the client has liking.
  • Lack of creativity on what the government would be charging ford. Any of these

So we will choose the Option all these.

8 0
3 years ago
1. You have been contracted to design a system for a smart car. The company installed four laser radars on the car’s corners to
Alexxandr [17]

Answer:

A). Using a flowchart, show the algorithm for the car collision avoidance system.

Explanation:

5 0
2 years ago
An IT Manager is reviewing the company’s approach to data privacy for a new project. What can happen if the company does not col
photoshop1234 [79]

Answer:

The company might not be able to satisfy their customers

5 0
1 year ago
Other questions:
  • To gain one pound of fat, how many extra calories would you need to consume?
    12·1 answer
  • Assume the following JavaScript program was interpreted using staticscoping rules. What value of x is displayed in function sub1
    12·1 answer
  • Using Task Manager, you discover an unwanted program that is launched at startup. Of the following items, which ones might lead
    7·1 answer
  • A simple operating system supports only a single directory but allows it to have arbitrarily many files with arbitrarily long fi
    13·1 answer
  • Fill in the blank with the correct response.
    10·1 answer
  • Select the correct answer. Which sign or symbol will you use to lock cells for absolute cell reference?
    9·2 answers
  • Which of the following is a database concept that allows for storage and analysis for a dozen to billions of data points?
    7·1 answer
  • Why does 5 g mm wave require more cells to achieve a better signal
    6·1 answer
  • Take any software or Application that you have recently purchased, this can be a video game or any other application helping you
    7·1 answer
  • Why we use cluster computing and hadoop framework for big data sysetm​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!