YaRness
12-07-2000, 06:39 PM
in a traditional linear fasion, i might, in some program, issue a command to format a drive, and then pretty much just hang until the drive returns a finished status of some sort. coding something like that would be pretty simple, it might look something like
if ( format() ) then
print "format complete"
else
print "format failed"
but what if (and this is true of the SCSI bus, prolly also true of the IDE bus) when you issue a format command, the drive just returns a good status, and then formats away for x minutes until it's done, then sends another message indicating it's either done successfully or has faulted somehow.
i think hardware wise this kinda stuff is handle with interrupts, but how is something like this handled software wise? child process (which i know little about)? threads (which i don't even know what those are clearly)? i'm working on a software project in the abck of my head, and this is the first real wall i've run up against. i could really use some words of experience and stuff.
------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------
if ( format() ) then
print "format complete"
else
print "format failed"
but what if (and this is true of the SCSI bus, prolly also true of the IDE bus) when you issue a format command, the drive just returns a good status, and then formats away for x minutes until it's done, then sends another message indicating it's either done successfully or has faulted somehow.
i think hardware wise this kinda stuff is handle with interrupts, but how is something like this handled software wise? child process (which i know little about)? threads (which i don't even know what those are clearly)? i'm working on a software project in the abck of my head, and this is the first real wall i've run up against. i could really use some words of experience and stuff.
------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/
------------------