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

  Can gained competitive advantages be sustained

What are some internal (e.g. organisational, individual, and management factors) and external factors (e.g. market, industry, social, economic, technological and political/policy factors) influencing the success or failure of organisations' attemp..

  According to the environmental protection agency

According to the Environmental Protection Agency, "rigid containers have definite retained shape and form and that are self-supporting" (EPA, n.d.) Some of the differences between rigid and non-rigid containers, according to this week's reading, "Rid..

  Analyze the elements of the cause of action

Differentiate this type of discrimination from other types of discrimination. How is the liability involved different?

  One or two most challenging issues in identifying

Discussion Question 2-1. What are the one or two most challenging issues in identifying and documenting IT acquisition requirements (i.e., the requirements for solving the problem that was defined)? Explain your reason(s) and how the issue(s) can be ..

  Formulate the lp model for union city to minimize

Relevant information on the six potential locations of the warning siren towers and distance in miles to each of the seven schools is presented in the table below. Formulate the LP model for Union City to minimize towers built.

  Grade percentage and letter grade

1. Show the calculate answer for the following problem. Show the answers for both arrays. Given the following array, INT[ ] myNumbers(7, 5)

  How many instructions executed in single time slice

Machine executed average of 5000 instructions per microseconds. How many instructions could be executed in a single time slice?

  The business objectives of an organization

How information systems are linked to the business objectives of an organization.

  Practice in a logical way

How could the organization be roughly positioned in the future.

  Chronology of the development of the internet

When looking at the chronology of the development of the Internet, which development do you believe to be the most important? Why?

  Impose appropriate field types and lengths on all fields

Impose appropriate field types and lengths on all fields

  Create an overall strategy

How do the CNCI, the National Strategy to Secure Cyberspace, and Executive Order 13636 integrate? How are they interrelated, and how do they work together to create an overall strategy?

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