home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / t / tornado / Guide / 4 < prev    next >
Encoding:
Text File  |  1995-09-23  |  2.0 KB  |  37 lines

  1. Crash protection
  2. -=-=-=-=-=-=-=-=
  3.  
  4. From the moment a program starts up under tornado, it comes under the
  5. protective wing of Tornado. From now on, there are very few ways programs can
  6. lock up the machine [1].
  7.  
  8. Tornado monitors all filing system operations done by the app/program, and
  9. closes any files that are still open when an app/program terminates (unless
  10. vetoed by a service call or wimp service message broadcast). Also, it
  11. installs handlers to deal with Undefined instructions, Prefetch aborts, Data
  12. aborts, Address exceptions, Branch through zeros, CAO exiting errors, normal
  13. errors and when OS_Exit is called.
  14.    For Undefined instructions, Prefetch aborts, Data aborts, Address
  15. exceptions, Branch through zeros and CAO exiting errors, preemption is halted
  16. on that task, control removed and a window is displayed telling the user that
  17. this fatal error has occurred, and asking what should be done about it. The
  18. user then has the option to save out any files currently loaded into that
  19. app, or to save them into a temporary space and restart the app, which will
  20. then reload in those files, or to ignore the error and continue (in which
  21. case you'll get the usual error box, and lose your files). For normal errors,
  22. usually the task has its own error handler installed to deal with these
  23. errors, but it may request that this operation be automated.
  24.    For OS_Exit being called before Tornado_Closedown, tornado cleans up,
  25. again by asking the user about any unsaved files etc. etc.
  26.  
  27. There is also another level of protection: If the task goes into a
  28. never-ending loop, and if the messages waiting for it exceed a certain value,
  29. a message pops up to the user indicating that it is most likely that the task
  30. has crashed, and does the user wish to terminate the task.
  31.  
  32. This leaves only a few ways left of locking up the machine, ie; the ones
  33. which would usually cause a full reset to get out of them. Due to the
  34. structure of the RISC-OS kernel, it's _very_ difficult to get around these,
  35. but I'm sure you'll agree that the proposals above with certainly help no
  36. end.
  37.