1. On Windows this works well as file and device locking is mandatory. Moreover, the default is to create an exclusive lock when opening an I/O channel to a device. So, by default other threads and processes cannot concurrently access the device. On Linux and OS X, file and device locking is 100% advisory. Any number of threads and processes can open an I/O channel to the same device and concurrently write or read from it.