Discussion :: Operating Systems Concepts - Section 1 (Q.No.20)
|Pravi said: (Feb 17, 2012)|
|It is also known as direct addressing mode. When you know the right offset of the address of the memory you need. For example if you have an array, then if you need the N-th element of the array, you just add N sizes of the variables to the starting address of the array.
As an oposite it is the sequential addressing mode (or indirect) where you cant calculate the exact address by just offset of the beginning. If the size of each element in the array is not known (for example if you have N null terminated string which size is not known) you need to traverse all the N-1 elements until you find the one you need - the N-th one :)
|Shekhar said: (Oct 20, 2012)|
|Just want to add in Pravi's comment that:
Like in books index is given and by referring to which you can directly open that particular page, similarly index is used for addressing elements in data structure.
|Chetan said: (Jan 4, 2015)|
|Index, because it is just like an array.|
|Ash said: (Jul 11, 2016)|
|What is meant by Index?|
|Varun said: (Dec 13, 2017)|
|Logically it must be structure that stores the memory location; "location is defined relative to the beginning of the data structure". This is also known as direct addressing and the option nearest to a structure attribute that stores location is "index".|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.