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
What is the name of the FOLDER in which the file named "script" is contained?
yulyashka [42]

Answer:

The default location for local logon scripts is

  • the Systemroot\System32\Repl\Imports\Scripts folder

5 0
2 years ago
Is a class of software used to meet organization-wide business needs and typically shares data with other enterprise application
yuradex [85]

Answer:enterprise

Explanation:

5 0
1 year ago
Read 2 more answers
The Joint Photographic Experts Group developed the ___________ graphic format.
jolli1 [7]
1. <span>The Joint Photographic Experts Group developed the jpeg graphic format. 
2. </span><span>It is important to include the alt attribute of the tag because some people use text-only Web browsers. </span>
4 0
3 years ago
Read 2 more answers
The main purpose of a honeypot is Select one:
masya89 [10]

Answer:

d. To help security professionals better understand and protect against threats to the system

Explanation:

The main purpose of a honeypot is to attract potential hackers and allow them to have access to a network system that is not the actual live network with close monitoring. This is done so as to learn and understand the intentions of the hacker and how they execute an attack. With this knowledge security professional are in a better position to deal with potential threats and keep the network secure.

4 0
3 years ago
Claire wants to be a digital media coordinator. What requirements does she need to fulfill in order to pursue this career?
NemiM [27]

Answer:

Check below for the answer and explanations

Explanation:

Digital media coordinators are professionals that create and manage digital contents. They create and manage websites, blogs, social media platforms, e-commerce sites, etc.

To be a practitioner in this field, Claire needs a first degree in any of digital media, social sciences, communications, computer science and similar courses.

She needs to have a good knowledge of computer software, a high reasoning skill and a laudable communications skill.

5 0
3 years ago
Other questions:
  • Create a Python for loop script of exactly 2 lines of code that generates a sequence of integer numbers that start in zero and g
    12·1 answer
  • What are smart mobile devices?
    6·2 answers
  • Becky is preparing a document for her environmental studies project. She wants to check her document for spelling and grammar er
    5·2 answers
  • Does Windows 7 support secure boot in UEFI? Windows eight? Linux UBUNTU version 14?
    8·1 answer
  • The staff of the ___________________ will need to enter, maintain, and retrieve data from electronic health records within a hos
    9·1 answer
  • 27. If X and Y are int type variables,
    14·1 answer
  • How many megapixels is in a macbook air 2017 camera
    10·1 answer
  • Please help
    11·1 answer
  • PLZ HELP What will be the output? class num: def init (self.a): self. number = a mul* __(self. b) return self. number + b. numbe
    7·1 answer
  • What are the different alignment options available in Microsoft​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!