Reference no: EM131076110
Integrate calls to the appropriate memory-management functions (see Exercise 2) into the pseudo code for add and remove under both the B-tree and hashing schemes. (See Exercises 3 and 9 .)
Exercise 2:
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:
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.
Exercises 3:
Describe pseudo code algorithms for insertion into and removal from a dictionary implemented externally with a hashed index file.
Exercises 9:
Describe pseudo code algorithms for insertion into and removal from an ADT dictionary implemented with an index fi le organized as a B-tree.
The variance and standard deviation of delay time
: Sales delay is the elapsed time between the manufacture of a product and its sale. According to the article "Warranty Claims Data Analysis Considering Sales Delay" (Quality and Reliability Engr. Intl., 2013: 113-123), it is quite common for invest..
|
How louis xiv characterize a kings relation with his subject
: How did Louis XIV characterize a king's relations with his subjects? How does Louis's advice compare to the way he actually ruled and the way in which other early modern rulers ran their affairs?
|
Happens to the wavelength
: If a light beam has a wavelength of 500nm in free space and it enters a new medium with a speed of light there being 2*108m/s. If the frequency does not change, what happens to the wavelength?
|
Write an article for an interface design magazine
: Smart Home Heating Control Panel design has been a success and you have been asked to write an article for an Interface Design magazine that describes how you designed and why you chose that particular interface
|
Describe pseudo code algorithms for insertion
: Describe pseudo code algorithms for insertion into and removal from a dictionary implemented externally with a hashed index file.
|
About the environmental protection
: You work for the Environmental Protection Agency - the government wants to regulate emissions of a particular pollutant and following your advice is considering a market based approach rather than a command and control approach. Given your estimates ..
|
Result of an operation is overflowed
: If the result of an operation is overflowed (exceeded than 16 bits) or underflowed then, only the lower 16-bits of the result are stored in the register and this effect is known as
|
Develop a plan to share and defend the christian worldview
: Develop a plan to share and defend the Christian worldview. The plan must take into consideration the beliefs and perspective of the worldview you have selected.
|
Rouge programmers breaking into systems
: What value for society is there in having rouge programmers breaking into systems because they say it's valuable for society as a whole? What dangers?
|