This is kind of one question rolled into one...
What exactly is the point of DMA and paging?
I know DMA is direct media(?) access...and I can see this being useful for CD & DVD drives, and possibly floppy...but say you're only wanting to access the hard drive...would it still be necessary (if it even is with the above casese) to implement DMA?
Pretty much, same thing with paging...if you're developing a DOS clone for example, without support for multitasking and the such...then, would paging even be useful, since there'd be no need to really have two types of memory?
I've read through tutorials and posts on osdev.org, osdever.net, and various other places on the web...but, perhaps the concept is still a lil' sketchy to me.
DMA and Paging question
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
That's kind of contradictory to say. If you have indeed bothered to look it up you should have known that it stands for Direct Memory Access.I know DMA is direct media(?) access..
DMA is meant to allow devices to write data to memory without intervention of the CPU, which should give the processor more time and in the end result in a speedup of the system.
Necessary? in most cases, no. Recommended? yes.would it still be necessary
Paging is just to map virtual addresses to different physical addresses. (So is segmentation) Wether it helps you, is something you should be able to figure for yourself. Ask your conciousness the standard questions: what are the advantages, what are the disadvantages, and are the advantages larger than the disadvantages.Pretty much, same thing with paging...
If it helps, make it your homework
I resent that...just because I mis-typed what the "M" stood for in DMA doesn't mean I didn't do research before hand...thus why I put a "(?)" next to it, because I wasn't sure if that was the right word.Combuster wrote:That's kind of contradictory to say. If you have indeed bothered to look it up you should have known that it stands for Direct Memory Access.I know DMA is direct media(?) access..
Hmmm....well then...time to find some (better) tutorials on the matter.Combuster wrote: DMA is meant to allow devices to write data to memory without intervention of the CPU, which should give the processor more time and in the end result in a speedup of the system.Necessary? in most cases, no. Recommended? yes.would it still be necessary
So, basically it creates a "force field" of sorts so that the program doesn't do anything "dangerous" in Kernel-Land?Paging is just to map virtual addresses to different physical addresses. (So is segmentation) Wether it helps you, is something you should be able to figure for yourself. Ask your conciousness the standard questions: what are the advantages, what are the disadvantages, and are the advantages larger than the disadvantages.Pretty much, same thing with paging...
What it allows you to do is create different linear->physical address mappings for each process.raevin wrote: So, basically it creates a "force field" of sorts so that the program doesn't do anything "dangerous" in Kernel-Land?
Since each process can have their addresses mapped to different physical locations, they can stay out of each others way without paying attention to which addresses they should avoid. For instance, process A can have its virtual address 0x0 mapped to 0x100000 in physical memory. Process B can have its virtual address 0x0 mapped to 0x200000 in physical memory. Each process can access it's own 0x0 and will not even know of the other process' existence.
You can also set access restrictions on individual pages so that even though the process can see a specific page, it can't access it. This is useful in the case of the kernel, which needs to be mapped into the address space of all processes.
Paging will protect not only the kernel, but also other processes from each other.
Ahhh...alrighty. Makes more sense, thanks for the clarification.vhg119 wrote:What it allows you to do is create different linear->physical address mappings for each process.raevin wrote: So, basically it creates a "force field" of sorts so that the program doesn't do anything "dangerous" in Kernel-Land?
Since each process can have their addresses mapped to different physical locations, they can stay out of each others way without paying attention to which addresses they should avoid. For instance, process A can have its virtual address 0x0 mapped to 0x100000 in physical memory. Process B can have its virtual address 0x0 mapped to 0x200000 in physical memory. Each process can access it's own 0x0 and will not even know of the other process' existence.
You can also set access restrictions on individual pages so that even though the process can see a specific page, it can't access it. This is useful in the case of the kernel, which needs to be mapped into the address space of all processes.
Paging will protect not only the kernel, but also other processes from each other.
Easy...didn't post for about 2 years or so.How is it that you joined in '04 but only have 12 posts?