Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write a program to simulate searching over a hashed file, with different assumptions for the sizeof file pages.Write a program to perform equality search operations on the hashed file produced by yourwHash program in previous section. The executable name of this program must be sHash and it mustbe able to be executed using the command:

> ./sHash search_2013 hashed pagesize

 

where search_2013 is the name of the file containing the ID keys to be searched for; hashedis the output file of your wHash program; and pagesize is an integer value that specifies thesize of the disk page that you are simulating. (Note: the pagesize parameter that you specifyfor searching should match the pagesize parameter that you used for constructing the hashedfile, otherwise your results will not make sense.)

Your program must take advantage of the assumption that hashed is a file whose structure has been created by hashing on the ID key. Your program should read in required parts of thefile, one "page" at a time. For example, if the pagesize parameter is 100, your program shouldfetch 100 records in a single read from disk. These can then be scanned, in-memory, for amatch.

If a match is found, the program must print the matching record to stdout. If no match is found, a suitable message should be printed. In addition, the program must output the total timetaken to do all the search operations in milliseconds to stdout. For example, if the time takento do the reading is 123:45 ms, the output would be:

Time: 123.45 ms

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9543491

Have any Question?


Related Questions in Computer Engineering

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Calculate the present worth of all costs for a newly

Calculate the present worth of all costs for a newly acquired machine with an initial cost of $30,000, no trade-in value, a life of 15 years, and an annual operating cost of $13,000 for the first 4 years, increasing by 1 ...

Qion leadership paradox and inter-team relationsa

Question: Leadership Paradox and Inter-team Relations A. What is the leadership paradox? Give some reasons why a leader can encounter difficulty in newly formed teams or groups using a participative management system. Su ...

An array a1 n is said to have a majority element if more

An array A[1 . . . n] is said to have a majority element if more than half of its entries are the same. Given an array, the task is to design an efficient algorithm to tell whether the array has a majority element, and, ...

Question research different information systems management

Question : Research different information systems management disaster response plans of major organizations that have had to respond to fairly recent disasters. Discuss the results of the organization's recovery efforts.

Assignmenta in the slides and textbook one of the examples

Assignment (a) In the slides and textbook, one of the examples features a class for counting up. An interface which defines this functionality is given below: public interface IncrementCounter { //Increments the counter ...

Explain the risk of having hacking tools installed on your

Explain the risk of having hacking tools installed on your computer and why you should contact local law enforcement agencies before installing those tools.

When selecting a new computer identify the key components

When selecting a new computer, identify the key components that drive the performance of the machine. And, if you were to spend additional funds on increasing the computer's performance, which component would provide the ...

Question suppose f is a function that returns the result of

Question : Suppose f is a function that returns the result of reversing the string of symbols given as its input, and g is a function that returns the concatenation of the two strings given as its input. If x is the stri ...

Question suppose that you are working with gps data from an

Question : Suppose that you are working with GPS data from an Excel spreadsheet and that you map it in ArcMap. However, you are surprised that the data points are in Australia instead of Chile? What could be the possible ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As