|
From: Nicholas N. <nj...@cs...> - 2006-08-22 23:10:30
|
On Tue, 22 Aug 2006, Bart Van Assche wrote: > - The drd tool records the order in which segments are executed. Within a > thread, this order is represented by a single integer number. The order over > threads is represented by something called a "vector clock". This is a > standard way of representing the partial order relationship between actions > performed by different threads. > - For each segment it is recorded via a three-level bitmap which memory > locations have been read from or written to (at the lowest level, two bits > are needed per byte: one bit representing read access, one representing > write access). I'd guess that this is where the memory consumption is coming from. > - A data race is defined as two threads that access the same memory > location, where at least one of the two threads performs a write action, and > the order between the two accesses is not enforced by a synchronization > action. > - Segments that can no longer be involved in a data race are freed > (VG_(free)()). That sounds important. When can they be freed? > This means that the memory consumption of the drd tool is proportional to: > - the number of threads running simultaneously. > - the number of segments allocated within a thread. > - the amount of unused memory allocated within the bitmap allocated for a > segment. When e.g. iterating over a byte-array, and only reading every > 1024th byte, only 0.1% of the memory allocated for the bitmap will be used > -- very inefficient. So 1024 bytes is the smallest memory chunk you can individually represent? > It must be possible however to run software like konqueror under drd, since > it is possible with DIOTA. DIOTA uses the same approach as drd. One of the > differences between DIOTA and drd that I know of, is that DIOTA uses a > 9-level bitmap while drd only uses a 3-level bitmap. Wow, 9 levels sounds like total overkill. How small are the memory chunks then? BTW, do you know/are you involved with the DIOTA people? Judging from your name it seems plausible :) > I hope the above explanation is comprehensible ? It helps a lot! Thanks. Nick |