• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

howh does DMA work in operating system?

DMA is Direct Memory Access, and its more of a hardware 'feature' then Operating system, although your OS must support it for it to work.

DMA allows IDE devices (mostly) to have direct access to system memory or ram. It allows them to by-pass the CPU, and supposedly increase performance by transferring data directly between the two, ie harddrive to ram or cd-rom to ram.

I think thats correct 😀
 
thx man. I also have another question.

Cycle stealing occurs when the CPU cannot access RAM due to a DMA transfer using the bus path. this blocks the CPU from fetching instructions or reading/writing data. Under what circumstances would cycle stealing not have a negative impact on performance?
 
Originally posted by: Jincuteguy
thx man. I also have another question.

Cycle stealing occurs when the CPU cannot access RAM due to a DMA transfer using the bus path. this blocks the CPU from fetching instructions or reading/writing data. Under what circumstances would cycle stealing not have a negative impact on performance?

DMA is good. Basically, there are 2 ways to get data from/to the hard drive. One is for the CPU to send a command to the drive, wait, then send another command. This makes your system crawl. It's PIO. The other is to have the CPU send a command, go do something else, and be interrupted upon completion. This is DMA. Even if the memory accesses are a little slower with DMA, with PIO, not only would the memory be busy, the CPU would be idling and doing NOTHING, instead of doing work a little slower.

if thats incoherent, i'm tired...sorry
 
Ok. Well, your program wants to read a file. The OS gets the request from the program, and then sends it off to the hard drive, and tells it where to store the data. Then, it switches tasks to run some other program for a while. After a few milliseconds, the hard drive completes its transfer, and an interrupt is sent to the CPU. The CPU then starts executing OS code, which copies the data to where your program wants it, and then continues executing your program.

Or what are you asking?
 
Cycle stealing occurs when the CPU cannot access RAM due to a DMA transfer using the bus path. this blocks the CPU from fetching instructions or reading/writing data. Under what circumstances would cycle stealing not have a negative impact on performance?
 
Originally posted by: Jincuteguy
Cycle stealing occurs when the CPU cannot access RAM due to a DMA transfer using the bus path. this blocks the CPU from fetching instructions or reading/writing data. Under what circumstances would cycle stealing not have a negative impact on performance?

It has a negative impact, bu the thing is... the alternative is worse. With DMA, the CPU can do some work, even if it takes longer to access ram. Without DMA, the CPU doesn't do ANY work at all - it just sits there polling the device over and over. Of course, if your data/app fit into cache, the CPU wouldn't need to hit the RAM>
 
Im asking when does cycle stealing not have a negative impact on the performance? Because the CPU cannot access RAM since DMA is using the bus patch to access the RAM.
 
just tell us it's a homework question. and word your question smore clearly - but this one and the acrylic case thread were really confusing.
 
Back
Top