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
I =PR/12 Numbers of years .Interest rate up to 1yrs . 5.50 up to 5yrs . 6.50 More than 5 yrs . 6.75 design an algorithm based on the above information

Let us assume a file of 5 records that means n = 5 And k is a sorted array of keys of those 5 records. Let key = 55, low = 0, high = 4 Iteration 1: mid = (0+4)/2 = 2

Midsquare Method :- this operates in 2 steps. In the first step the square of the key value K is taken. In the 2nd step, the hash value is obtained by deleting digits from ends of

As we talked in class, a program with two integer variables is universal. Now, we consider a special form of four variableprograms. Let G = (V; E) be a directed graph, where V is a

CIRCULARLY LINKED LISTS IMPLEMENTATION A linked list wherein the last element points to the first element is called as CIRCULAR linked list. The chains do not specified first o

Illustrates the program segment for Quick sort. It uses recursion. Program 1: Quick Sort Quicksort(A,m,n) int A[ ],m,n { int i, j, k; if m { i=m; j=n+1; k

A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is called as

In this project you will write a program to produce a discrete time simulation of a queue as shown in Fig. 1. Time is slotted on the input and the output. Each input packet follows

Define the Internal Path Length The Internal Path Length I of an extended binary tree is explained as the sum of the lengths of the paths taken over all internal nodes- from th

What is quick sort? Quick sort is a sorting algorithm that uses the idea if split and conquer. This algorithm chooses an element called as pivot element; search its position in