Re: hard drive access

new topic     » goto parent     » topic index » view thread      » older message » newer message
fizzpopsoft said...

Another way to do this maybe...
Is there a way to force the allocation of a new file to be at a specified disk location (up front)
and ensure the file is contiguous? Then absolute disk read/write would not be necessary,
normal access using blocks as records would suffice.
And set the attributes like system and readonly to prevent relocating by defragging?

Cheers,
Alan

In a word, no. It depends on the operating system kernel and the file system being used, but in general one shouldn't trust that a file will be contiguous with a particular disk sector.

fizzpopsoft said...

Sorry, I hit post a bit early;)
Why not use your disk partitioner to create the partition which you use for exclusively for your direct access?
The partitioner will specify the cyl/head/sector during its allocation.
Just skip the first few bytes that's used for the FAT etc.

It depends on what one is trying to do. But this is a sound idea - IIRC Oracle uses this approach for its database (it manages the database directly on top of disk sectors, bypassing any use of a filesystem). If it's a brand new and empty partition, there's even no need to worry about the FAT.

This approach still requires some form of absolute disk access.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu