Is there a way for a process to lock an entire disk so that no other process can access any file on the disk until this process releases the lock? Disk i/o开发者_如何学C operations for the other processes would presumably block until the lock is released.
The OS in question is Linux.
Since everything on a Linux it's a file, you should try locking the file representing your device.
精彩评论