use fcntl to lock the file which is used by the mapped memory