In principle what I want is very simple. Two executables ./read and ./write respectively read and write from a resource (let’s say a file). Using flock(2) it is easy to prevent race conditions between arbitrary invocations of ./read and ./write at arbitrary times. The requirement is that each invocation of ./read contains a snapshot of the resource from a previous
Tag: synchronization
Why is interrupt disabled between spin_lock and spin_unlock in Linux?
I was reading the implementation of Linux semaphores. Due to atomicity, signal and wait (up and down in the source code) use spin locks. Then I saw Linux disabled interrupt in spin_lock_irqsave and reenabled interrupt in spin_unlock. This confused me. In my opinion, there is really no point disabling interrupt within a critical section. For example, proc A (currently active)
How do I detect when a Dropbox folder has been updated?
I have a folder with files that are being sychronized between computers. After the files have been uploaded from computer A, I would like to copy them from computer B’s Dropbox folder to another folder. How can I detect when the Dropbox folder has been updated? I can check the Dropbox folder periodically, but maybe there is a more elegant
How long does an UBIFS take to sync a file to flash
Does anyone know how long a UBIFS takes to flush/sync a file to flash? The write happens through a normal fwrite operation and I would like to know how long before that write is committed to flash when no other writes to file occur. If not, any way of finding out? Thanks. Answer An interesting read: UBIFS write-back knobs in