What data structure is appropriate to support operations

Assignment Help Basic Computer Science
Reference no: EM131076041

The problem of managing the blocks of an external data fi le indexed by either a B-tree or an external hashing scheme is similar to that of managing memory for internal structures. When an external structure such as a data fi le needs more memory (for example, to insert a new record), it gets a new block from a free list that the system manages. That is, if the fi le contains n blocks, the system can allocate to it an ( n + 1) th block. When the fi le no longer needs a block, you can deallocate it and return it to the system. The complication in the management of external storage is that a block allocated to a fi le may have available space interspersed with data. For example, after you have removed a record from the middle of a data fi le, the block that contained that record will have space available for at least one record. Therefore, you must be able to keep track of blocks that have space available for one or more records as well as recognize when blocks are completely empty (so that you can return them to the system). Assuming the existence of allocate Block and return Block functions that get empty blocks from and return empty blocks to the system, write pseudo code implementations of the following external memory-management functions:

862_f2c55829-5be0-45e0-8790-b4616654dcb7.png

What data structure is appropriate to support these operations? You may assume that you can distinguish slots of a block that do not contain a record from those that do. You can make this distinction either by having a convention for null values within a record or by adding an empty/full flag.

Reference no: EM131076041

Questions Cloud

Develop training materials for new it employees : Your team is in charge of computer support at a major U.S. retailer. Business has been growing fast, and your company is about to open several new facilities across the country. Management has asked your team to develop training materials for new ..
Write a pseudo code program for shifting data : write a pseudo code program for shifting data to make a gap at some specified location of a sorted fi le. Pay particular attention to the details of shifting the last item out of one block and into the first position of the next block.
Calculation of their respective roa and roe : Show your calculation of their respective ROA and ROE; footnote which financial statement the numbers are picked from. For example, assets (balance sheet).
Design post to elicit multiple point of view from colleagues : Design your posts to elicit multiple points of view from your colleagues. Validate your assertions with references to credible sources.
What data structure is appropriate to support operations : What data structure is appropriate to support these operations? You may assume that you can distinguish slots of a block that do not contain a record from those that do. You can make this distinction either by having a convention for null values w..
E calls for the purchase of earthmoving equipment : Keller Construction is considering two new investments. Project E calls for the purchase of earthmoving equipment. Project H represents an investment in a hydraulic lift. Keller wishes to use a new present value profile in comparing the projects. ..
Price-taking firm has a short run cost function : A price-taking firm has a short run cost function SC(q) = 3q^2 + 18q + 600. Calculate the profit for this firm if the price is P = 72. Using either an integral or geometry, calculate the producer surplus for the firm at P = 72. Explain how the Produc..
Economy-net taxes and government spending : Suppose that in an economy, net taxes and governemnt spending are independent of income. It is determined that when government spending falls by $200 billion income falls by $800 billion. What is the MPS? What is the MPC?
Equals the nominal rate minus the inflation rate : The Fisher equation tells us that the real interest rate approximately equals the nominal rate minus the inflation rate. Suppose the inflation rate increases from 3% to 5%.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How can these limitations be overcome

What are the data limitations that occur when creating cookies from JavaScript® language? How can these limitations be overcome?

  What role would the pmt function and vlookup function play

What role would the PMT function and the VLOOKUP function play in what-if analysis? Include in your answer an explanation of what what-if analysis and how those functions fit in with it

  What input function is used to read a single character

What functions are used instead of the >> and

  The average and how many scored below

Professor Merlin has asked you to help him. He has 100 total students in his four classes but he is not sure that all of them took his last exam. He wants to average the grades for his last exam in four sections of his medieval literature course and ..

  Write the definition of the function

Write the definition of the function, leavesCount, that takes as a parameter a pointer to the root node of a binary tree and returns the number of leaves in a binary tree. Add this function to the class binaryTreeType and create a program to test ..

  Exception handling to deal with input or output errors

Exception handling to deal with input or output errors

  When would this result in no more total traffic

When would this result in no more total traffic, for queries not found in any DNS cache, than with a local name server? When might this result in a better DNS cache hit rate and possibly less total traffic?

  Design and implementation of an ecc public key system

Design and implementation of an ECC public key system to provide encryption/decryption and digital signature sign and verification in C or C ++ or Java.  You can use Diffie-Hellman key exchange protocol and the underlying field Fp or other key exchan..

  Describe when you would want to use double hashing

Briefly describe when you would want to use double hashing. Also, provide an example of a rule that can be used for a double hashing probe sequence.

  Find out the total sum of all loan amounts in the bank

Find out the total sum of all loan amounts in the bank.

  What ways is the zara model counterintuitive

Part 1 1. In what ways is the Zara model counterintuitive? In what ways has Zara's model made the firm a better performer than Gap and other competitors?2. What do you believe are the most significant long-term threats to Netflix? How is Netflix tryi..

  Describe the importance of using sub queries

Extracting and interpreting data can be very valuable to an organization. Describe the importance of using sub queries in a database system. Provide at least two business case scenarios to support your response.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd