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
you want to implement a protocol on your network that allows computers to find the ip address of a host from a logical name. whi
aniked [119]

The protocol that should be implemented is that one needs to enable hosts on the network to find the IP address.

<h3>What is IP address?</h3>

It should be noted that IP address simply means a unique address that defines a device on the internet.

In this case, the protocol that should be implemented is that one needs to enable hosts on the network to find the IP address.

Learn more about IP address on:

brainly.com/question/24930846

#SPJ12

7 0
1 year ago
Zohan uses the following analogy to describe a concept of object-oriented programming. A button can have many uses. When it is p
Vika [28.1K]

Answer:

Polymorphism

Explanation:

You can have a basic button class that gets inherited by other classes.

class Button {

function pushButton(){}

}

class ElevatorButton extends Button{};

class BigRedButton extends Button{};

With these new classes, they inherit from the basic button class. They can decide what happens when the method pushButton() is called.

You don't need to worry about what pushButton() actually does, you can just call it if the object is of the type "Button" and you can expect it to work.

4 0
2 years ago
What is a good monitor for console gaming? (Any price)
likoan [24]

Answer:

I personally use a alienware

Explanation:

7 0
3 years ago
Read 2 more answers
________ is an encryption standard used for secure transactions such as credit card processing and online banking. TLS DMZ White
Fynjy0 [20]

Answer:

TLS

Explanation:

In the field of computer security, TLS refers to Transport Layer Security it is closely related to the Secure Sockets Layer (SSL) although TLS is more commonly used these days. They are both techniques in cryptography that provides for the safe transfer of information between two parties (servers, systems and user applications)

TLS particularly provides a balance between transmission speed and data security through the use of symetric and asymmetric cryptography and the encryption and decryption key is the session key at both ends (sender and reciever), as such TLS has found usage in most advanced data exchange systems like credit card processing and online banking.

8 0
3 years ago
13. Which Windows feature allows users to control software operations by clicking and pointing with a mouse?
Thepotemich [5.8K]
The correct answer is option D.
i.e. graphic user interface allows users to control software operations by clicking and pointing with a mouse.

GUI is a type of interface that allows the user to interact through computer graphics.
8 0
3 years ago
Other questions:
  • 4. Discuss the advantages and disadvantages of using the same system call interface for both files and devices. Why do you think
    5·1 answer
  • What is an example of a transition effectl
    7·1 answer
  • Which line of code will print I can code on the screen?
    13·1 answer
  • The association between a UCS and a CS can be extended to include more stimuli (more stimuli related to the CS can elicit the CR
    7·1 answer
  • What is a relationship between a object and a class?
    7·1 answer
  • The Python print function
    9·1 answer
  • Which type of network involves buildings in multiple cities connecting to each other?
    8·1 answer
  • What factors do network consultants consider when determining the network needs of a business? Use the space provided below to a
    6·1 answer
  • Give 5 comparisons of the three employees with the highest net pay
    5·2 answers
  • Digital Media Equipment: Best Practices Quiz
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!