Jump to content

Talk:Overlay (programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Atlant (talk | contribs) at 13:35, 18 January 2007 (Physical? Or virtual?: More...). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

About that merge

I reverted the changes to this article, but I left standing the change of Overlays to a redirect, and I'm about to remove the mergefrom tag from here. There was really nothing in the other article worth saving and a fair share of what it had to say was misleading. Atlant 17:21, 13 July 2006 (UTC)[reply]

I thought my merge was cleaner. Why not restore the many wiki links that you reverted? Which is clearer:
Mine: This operation is similar to virtual memory, but is not fully automatic or transparent to the programmer in the same way; instead, the overlay strategy...
Revert: This operation is similar to virtual memory, but is not usually not fully-automatic or transparent to the programmer; instead, the overlay strategy...
Shouldn't this be a compsci stub like I had it? I think you may want to go back and pick and choose the reverts you're not happy with, it is not all junk. — RevRagnarok Talk Contrib Reverts 17:37, 13 July 2006 (UTC)[reply]
The biggest problem with your merge was the overall tone. It immediately dove into the multi-pass compiler stuff, and that's only a small corner of the much larger world of overlays and what they're used for. I'd be happy to do another edit of this article, comparing your diffs, but I haven't got the time right now, and the revised article was just too far off base. Maybe this evening...
Atlant 17:45, 13 July 2006 (UTC)[reply]

Physical? Or virtual?

I'm a new wikipedian so please don't be too harsh if I'm breaking some rules. I did my homework reading through the help pages but still...

I'd like to change the article referring to Overlays because, in my opinion, the association with Virtual Memory concept is not appropriate. More, the "virtual address space" in the first sentence is wrong. It should be quite the opposite, physical memory, that I would accept.

Virtual address space is an abstract concept representing the collection of memory locations in a system with a certain number of address lines. For example, the virtual address space of a CPU with 16-bit address bus is 64K (65536) locations.

I'm open to discussions, but I think this is a better definition of Overlays.

--- Overlaying is a programming method that allows programs to be larger than the CPU's main program memory (or whatever block of memory the CPU is supposed to draw its instruction from, in case not all main memory is available at a certain moment, or not all memory is available for that program).

This method assumes dividing a program into self-contained machine code object blocks (called "overlays") not bigger than the maximum block of available program memory. The overlays are supposed to be loaded (from external memory or support where the program resides) into the CPUs main memory in order to be executed.

Embedded systems would normally use overlays because of the limitation of physical memory (internal memory for systems-on-chip). ---

Adsp 12:56, 18 January 2007 (UTC)[reply]

I'm sorry, but if you insist on "physical memory", you would be wrong. Overlays were widely used in systems that had, say, 16-bit virtual address spaces but had larger physical address spaces (for example, 22-bits). What such overlays allowed was the running of programs larger than 64K. For example, using overlays, I personally wrote a program that was about 1.5 Meg in size and still "fit" within the 64K virtual address space of a PDP-11.
Where it gets confusing is that overlays are not necessarily swapped to and from the backing storage (e.g., disk). Systems that have large amounts of physical memory will often store many or all of the overlays in physical memory, swapping them in and out of the virtual address space as needed. This process (of exchanging virtual->physical address mappings) is obviously orders of magnitude faster than swapping information to/from the disk and in such a system, you could change overlays tens or hundreds of times per second with very little performance penalty.
Be careful that you're not confusing virtual memory with virtual address space.
Atlant 13:32, 18 January 2007 (UTC)[reply]