[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Why can I not find an answer to this anywhere?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 3

File: 8_06_HardwareSupport.jpg (66KB, 621x322px) Image search: [Google]
8_06_HardwareSupport.jpg
66KB, 621x322px
I am reading Silberschatz Operating System Concepts, and now, on the topic of virtual memory management,
this one fucking detail escapes me. I have without exaggerating been googling for hours with no luck.
It's like everyone describing this is just skipping this tiny detail in their explanation.

TL;DR: WHAT IS THE DIFFERENCE BETWEEN AN ABSOLUTE AND A PHYSICAL MEMORY ADDRESS??

So, what I think I understand is this:
Every application has its own logical (virtual) address space, where each address reference is translated in the
MMU at run-time if run-time address binding is the scheme in use, which apparently is the case in most
multi-purpose operating systems.

According to the book, address-binding can in some instances (e.g. within drivers) need to be mapped to
absolute addresses at compile-time, or to relocatable or relative addresses at compile-time and then to
absolute addresses at the program’s load-time, in contrast to delaying the address binding to run-time with
aid of base/bounds registers.
The book gives the example of a relocatable address as: 8 bytes _from this point_ (so an address location
is defined by it's relative position to something else),
and an absolute address as: _At_ byte 1008.

The book says that if an application binds its symbolic (eg int var) addresses to absolute addresses at
compile-time, this process cannot be moved around in memory, as the absolute address is directly tied
to its position in main memory.

What then simply escapes me is the difference between a physical and absolute address. If an absolute
address refers to an absolute point in memory, is it not the same as a physical address, then? I have honestly
been searching for an answer for hours. Please help me understand this /g/, my autism is flaring up. I suppose
it's possible that the reason I'm struggling to understand this is because my understanding of some underlying
concepts are flawed.

pic related I guess I didn't know what to put.
>>
>>60110172
because your question is flawed.
idiot. l2compute.
>>
are you using the term googling for using a shitty web search engine?

https://stackoverflow.com/questions/11349318/what-is-the-difference-between-physical-and-absolute-address
>>
We talk about absolute/relative memory addresses when we are talking about memory within a program.
We talk about virtual/physical memory when we are talking about how the kernel allocates certain sections of memory to programs.

An absolute memory address can refer to memory in an allocated _virtual_ memory but also _physical_ memory because the kernel translates _virtual_ memory to an actual _physical_ address.

Most operating systems give place their programs in virtual memory for safety reasons.

Hope that helps OP
>>
>>60110210
I have read that answer, but I still don't see how an absolute address is different from a physical address. From what
I have gathered, an absolute address does not need to undergo address binding in the MMU - but he says that all
virtual addresses will eventually be mapped to physical addresses when accessing RAM.

When accessing RAM? Where along the way, if not in the MMU?

>>60110215
Thanks for that. I get that an absolute address still refers to a virtual memory address - but does it not correspond exactly to
the physical address? And is it the kernel that translates a virtual memory address (let's say an absolute address) to a
physical address, and not a hardware mechanism?
>>
>>60110204
Cheers. I've just been finding so many seemingly conflicting answers everywhere.
>>
File: 1024px-MMU_principle_updated.png (124KB, 1024x641px) Image search: [Google]
1024px-MMU_principle_updated.png
124KB, 1024x641px
>>60110291
Every address in a computer is virtual simply because if you have 2GB RAM sticks their addresses must be made available somehow to your kernel. Typically they are mapped in a linear fashion. So when you try to access memory beyond 2GB the MMU knows its supposed to refer to the other memory stick.
I made an error when I said the kernel does this translation. So yes, the MMU does the hardware-level memory translations.
You never deal with physical addresses in your programs and not even if you are writing a kernel.

Physical memory is literally the hardware-level stuff. Even with absolute memory addressing, you are still addressing the linearly mapped address space of 2 RAM sticks for example.

This at least is my understanding.
>>
>>60110172
>TL;DR: WHAT IS THE DIFFERENCE BETWEEN AN ABSOLUTE AND A PHYSICAL MEMORY ADDRESS??

Memory space can be virtual or physical.
Addressing can be relative or absolute.

Those are orthogonal things.
>>
>>60110291
>an absolute address does not need to undergo address binding in the MMU
This is wrong.

Keep in mind, even if you have a fixed, absolute memory address, since it is virtual, the physical address it corresponds to can change at any time (pagin/swapping & caching).

> is it the kernel that translates a virtual memory address
Yes; it's up to the kernel to decide whether virtual memory addressing is used or not. However, since every modern hardware has an MMU, that will be utilized. But it would be entirely possible for the kernel to implement virtual memory addressing without any hardware support.
>>
>>60110386
lmao this thread is why no one can have a real discussion on /g
nothing but retards spewing mostly false facts, while being entirely devoid of experienced/intelligent individuals willing to read their walls of text and point out how utterly wrong and stupid they is be are.
>>
>>60110386
>Even with absolute memory addressing, you are still addressing the linearly mapped address space of 2 RAM sticks for example.

I think I'm starting to grasp it. So say that a process references an absolute location such as byte 240000. Where along the way does that become a physical address?

>>60110397
>Yes; it's up to the kernel to decide whether virtual memory addressing is used or not. However, since every modern hardware has an MMU, that will be utilized.

I read somewhere that in generic driver software, symbolic variables are bound to relocatable addresses at compile-time, and then mapped to absolute addresses at load-time for performance reasons -- memory references don't need to go through the base register. Is this wrong?
>>
>>60110390
>>60110390
>>60110390
>>60110390
>>60110390
Faggits.
>>
File: one-bus.gif (4KB, 393x432px) Image search: [Google]
one-bus.gif
4KB, 393x432px
>>60110556
>Where along the way does that become a physical address?
That is beyond my own understanding. But as I said before, as I understand this, it should be done in the MMU.
Also if you really really care "where" this happens try reading the following:
http://www.cdf.toronto.edu/~ajr/258/notes/micro/one-bus.html

MAR = Memory address register
MDR = Memory data register
^- Registers used to access memory in the cpu
IR = instruction register
PC = program counter (i think)

In greatly simplified terms: The bus are wires x-bits wide containing data/address depending on whether the CPU is asking for data or data is being delivered from the memory. (its been a long time since I've studied this so correct me if I am wrong)
More relevant info:
https://en.wikipedia.org/wiki/Memory_data_register
http://stackoverflow.com/questions/20548769/mdr-mar-registers-in-relation-to-assembly-language#20550269
>>
Lol fags discussing technology
>>
>>60110763
Cheers anon, greatly appreciated. I'm pretty sure I get it now.
Thread posts: 15
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.