I know what I want to do. Kind of. But not how to turn the idea in my head into real-life, working code. It’s frustrating. Very frustrating. Some days I wish computers could simply suck the ideas out of our heads and turn them into something that works.
I’m trying to figure out how to address the severe I/O problems in Snowflake, and have a picture of how I imagine it should work. Alas, trying to get it out on (virtual) paper is ridiculous. Why does it have to be so hard?
The basic premise is to reduce all the copying, and have I/O classes (or whatever) that do translations between layers in terms of reading/writing the actual data. For example, to go from a bunch of wave samples in the audio driver to the raw bytes on the disk via the used filesystem. At some point, offsets and lengths change due to other offsets and changes to unit sizes. A sector is 512 bytes long, and the position in a file relative to the partition gets offset by the starting position of the partition relative to the disk.
If the I/O code could do all those sorts of translations so that the IDE driver could put the bytes the AC’97 driver requests directly into the buffer provided by the AC’97 driver, it would supposedly become a whole lot more efficient.
Just need to get it all out of my head and into the text editor. And then change all my existing code to try and make it work with it. And hope I don’t make things worse!


