Representation of records, Data Structure & Algorithms

Records are mapped onto a computer store by simply juxtaposing their elements. The address of a component (field) r relative to the origin address of the record r is named the field'si offset k. It is describeded as

k  =  si 1 + s2 + ... + si-1 k0 = 0

where s is the size (in words) of the j-th element. We now realize that the fact that all elements of an array are of same kind has the welcome consequence that  k = i×s. The generality of the record structure does unfortunately not give such a simple, linear method for offset address computation, and it is therefore the best reason for the need that record elements be selectable only by fixed identifiers. This restriction has the available benefit that the respective offsets are find at compile time. The assigning greater efficiency of record field access is well-known.

The method of packing can be beneficial, if several record elements can be fitted into a single storage word. Since offsets are computable by the compiler, the offset of a field packed within a class can also be described by the compiler. This seems that on many computers packing of records causes a deterioration in access efficiency considerably lesser than that caused by the packing of arrays.

 

1155_Records.png

Posted Date: 7/27/2012 6:20:01 AM | Location : United States







Related Discussions:- Representation of records, Assignment Help, Ask Question on Representation of records, Get Answer, Expert's Help, Representation of records Discussions

Write discussion on Representation of records
Your posts are moderated
Related Questions
Using the cohen sutherland. Algorithm. Find the visible portion of the line P(40,80) Q(120,30) inside the window is defined as ABCD A(20,20),B(60,20),C(60,40)and D(20,40)

Explain the Arrays in Ruby Ruby arrays are dynamic arrays which expand automatically whenever a value is stored in a location beyond current end of the array. To the programmer

State the example of pre- and post-conditions Suppose that function f(x) should have a non-zero argument and return a positive value. We can document these pre- and post-condit

What is called the basic operation of an algorithm? The most significant operation of the algorithm is the operation contributing the most to the total running time is known as

a. Explain the sum of subset problem. Apply backtracking to solve the following instance of sum of subset problem: w= (3, 4, 5, 6} and d = 13. Briefly define the method using a sta

algorithm to search a node in linked list

Technique for direct search is    Hashing is the used for direct search.

State the complex reallocation procedure Some languages provide arrays whose sizes are established at run-time and can change during execution. These dynamic arrays have an in

A binary search tree (BST), which may sometimes also be named a sorted or ordered binary tree, is an edge based binary tree data structure which has the following functionalities:

padovan string