LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   What mean the "non-consistent memory machine" ? (https://www.linuxquestions.org/questions/programming-9/what-mean-the-non-consistent-memory-machine-4175494589/)

poplinux 02-11-2014 07:51 PM

What mean the "non-consistent memory machine" ?
 
Dear Sir.

I'm trying to study dma programming. Refer linux/Documentation/DMA-api.txt.

This document tell to me "non-consisten memory machine". But I don't understand this theory. clearly.

Please show to me "non-consistent memory machine".

Thank you.

PTrenholme 02-11-2014 09:51 PM

Typically, a process that changes data in shared memory first locks the memory address block that is to be changed (waiting until no other process is accessing that block), makes the changes, updates the "time of last change" flag, and releases the lock.

The "non-consistent memory" API is used for those rare cases, usually older systems, where the memory management needs to be done "by hand," and the programmer is going to keep all DMA correctly synchronized in code the programmer will write.

If you have a system where multiple processes are accessing the same block of shared memory, you need to make sure that, whenever one process changes a value in that shared memory, all the other processes know that, if they need to use data from the changed value(s) in the shared memory, they apply all the changes.

Look at this Wikipedia article for a discussion of inconsistent cache memory in multiprocessor systems. The same problem occurs with DMA by multiple process in a time-sliced single processor system.

poplinux 02-11-2014 10:29 PM

Thank you.


All times are GMT -5. The time now is 11:52 PM.