hello,
not so long ago I finished the most basic implementation of my floppy driver, it has not been tested IRL, only in bochs because it misses features like a timer that I have seen present in other drivers. Before testing it on a real system I wanted to add timing (and of course sensing whether or not the read went ok) in the hopes it would work fine on a real system almost on the first try. Now, personally I've decided to use the PIT as a timer system, my floppy driver sets a bit in a byte tested by my memory manager. If the test says the bit is set it will update the timer for the floppy disc driver. If the floppy driver then detects the value of it's timer is equal or above a preset value it will call of the timing and return to the function that called the timer in the first place. Now I was wondering how others have decided to implement timing?
internal timing
internal timing
Modular Interface Kernel With a lot of bugs
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: internal timing
A timer? *cough* What FDC drivers did you see?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: internal timing
Personally, I would suggest using your scheduler to do this. You could put the floppy driver to sleep for a certain amount of time. If you don't have a driver that works like a process, you may need to investigate callbacks. This is more flexible than the bit-checking method you describe because you are not limited to a certain number of known callbacks before you run out of bits to used as flags.
Cheers,
Adam
Cheers,
Adam
Re: internal timing
How do you handle timing related stuff in your FDC driver then? Or is your system coming to a grinding halt when you access the FDC?Love4Boobies wrote:A timer? *cough* What FDC drivers did you see?
JAL
Re: internal timing
atm my fdd driver is still basic, and my OS is even more basic. But this particular timer has been designed to allow task switches without interfering with the floppy timer.
Modular Interface Kernel With a lot of bugs