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
The ?-Notation (Lower Bound) This notation provides a lower bound for a function to within a constant factor. We write f(n) = ?(g(n)), if there are positive constants n 0 and

how to do a merge sorting

Q. Prove the hypothesis that "A tree having 'm' nodes has exactly (m-1) branches".      Ans: A tree having m number of nodes has exactly (m-1) branches Proof: A root

What is A Container Taxonomy It's useful to place containers in a taxonomy to help understand their relationships to one another and as a basis for implementation using a class


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 fiel

Q. Write down an algorithm to insert a node in between any two nodes in a linked list         Ans. Insertion of a the node after the given element of the listis as follows

AVL trees are applied into the given situations: There are few insertion & deletion operations Short search time is required Input data is sorted or nearly sorted

In this unit, we described about the data structure Queue. It had two ends. One is front from where the elements can be removed and the other is rear where the elements can be inse

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)