View Single Post
  #176   Report Post  
Posted to alt.binaries.schematics.electronic,sci.electronics.repair
Bob Campbell Bob Campbell is offline
external usenet poster
 
Posts: 18
Default Electrolytics question - update

"Peter Hucker" wrote in message
news
DOS simply loads TSRs, it doesn't 'manage' them.


Then what gives each program time on the CPU?


DOS is single-tasking. In DOS, there is only ever one program at a time
executing. The currently executing program "owns" the machine. There is
no "executive", there is no time slicing of CPU time. TSRs simply hook
into the keyboard interrupt, and when a certain key combination is pressed,
DOS passes control to the TSR. When the TSR "exits" by the user pressing
ESC or whatever, control passes back to DOS. However, the TSR remains in
memory. Hence TSR - Terminate and Stay Resident. When the key combo is
pressed again, the TSR gets control.

Again, there is no "executive" here. DOS passed control to the TSR, and
the TSR passes control back to DOS. It *looks* like multi tasking thru
clever programming, but it really isn't. Whatever you were doing before is
suspended while the TSR is in control, and the TSR is suspended when it
hands control back to DOS.

There is nothing "giving each program time on the CPU" but the running
programs themselves. If the TSR crashes, it will never return control to
DOS. If another application crashes, pressing the TSR key combo will have
no effect.