Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Need writes to happen immediately.

by varian (Chaplain)
on Jun 17, 2007 at 10:43 UTC ( [id://621677]=note: print w/replies, xml ) Need Help??


in reply to Need writes to happen immediately.

Sysread and syswrite use system calls read/write and unbuffered I/O so that's a start. Now you may still be impacted by firmware and system software optimalization routines that will attempt to combines read/write operation such that a minimum of disk head movements is required.... And yes there is a solution to use syscall to call the fsync operating system function to ensure that your data is sufficiently committed to the device. In reality that will slow down the overall disk operations even further.

it is mission critical that it is written in order and at the time I write it
If you really want to have full control over the device itself, then you need to write a device driver that will run within the kernel.

Now if this is as you state a learning experiment and you mean to be able to influence sequence of events then you may want to dive into the world of semaphores and use the flock function to perform mutually exclusive operations. This would closely mimick some of the internal system operations that you work on.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://621677]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-25 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found