can you please explain me what exactly it is ? i have read from my book, wiki link and 1 more link. i got some basic things, can you tell me how exactly this helps process and OS ? how this thing help us to implement cache ? i think this thing is the reason why we are able to use cache. please clear this concept. thanks alot.

Recommended Answers

All 6 Replies

Read this, and then ask again: http://en.wikipedia.org/wiki/Locality_of_reference
With regard to cache, there are complex algorithms that determine if it is more efficient to use local vs. remote cache, often depending upon the frequency of access. The more frequent, the better it is to have the cache local to the system accessing it. Unfortunately, if that element is accessed by many systems, if the data it refers to changes, then there is the overhead of updating all the local copies to be considered. Infrequent changes may not be a major factor, but frequent updates can become a serious network issue.

FYI, I am in the process of designing a new distributed web page cache for our network browsers - we have thousands of servers at many world-wide data centers, including the Amazon cloud. This is a subject that I am currently doing serious research on.

yeah!! sir i have read that link. sir when we say i have 2^32 virtual address space for a process , then what exacylt this means ? that means for each process , i can have 2^32 memory refereces ? can i have so much big virtual memory ? can you clearify this first, then i will talk about locality topic with you. thanks for your response. :-)

This is basically a 32-bit address space. Each bit in a computer word represents a power of 2. If you have 4 bits, then it can represent 2^4 distinct values (including 0), or 16 values: example

0000 == 0
0001 == 1
0010 == 2
0011 == 3
0100 == 4
0101 == 5
0110 == 6
0111 == 7
1000 == 8
1001 == 9
1010 == 10
1011 == 11
1100 == 12
1101 == 13
1110 == 14
1111 == 15

IE, 16 discinct values. So 2^32 == approximately 4 billion distinct values, such as memory addresses.

for each process , why i am giving so much virtual space ? if i dont need that much space then ?

and if i have so much space for 1 process, then i need too much memory for only 3 or 4 processes . right ? clearify this to me please.

The process is initially given a limited amount of memory, the operating system expands the memory space as needed. 2^32 is the max amount of memory any 32-bit program can access -- that doesn't mean the process has that much available for its own use.

hey! someone is disliking my each and every post without any reason. :-/ i wonder who is he/she. i m noticing this thing from 6-7 days now. haha. can anyone tell me why my 3 posts are disliked above ? :p really, i don't think there is any reason. :p

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.