home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / misc / 39958 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.7 KB  |  44 lines

  1. Newsgroups: comp.os.os2.misc
  2. Path: sparky!uunet!noc.near.net!mars.caps.maine.edu!gandalf!jurlwin
  3. From: jurlwin@gandalf.UMCS.Maine.EDU (Jeff Urlwin)
  4. Subject: Re: Why does DOS (Telix, AutoCAD, etc.) use 100%
  5. Message-ID: <1992Dec19.004242.20259@gandalf.UMCS.Maine.EDU>
  6. Organization: University of Maine, Department of Computer Science
  7. References: <17DEC199220532131@zeus.tamu.edu> <1992Dec18.063549.9256@netcom.com>
  8. Date: Sat, 19 Dec 1992 00:42:42 GMT
  9. Lines: 33
  10.  
  11. In article <1992Dec18.063549.9256@netcom.com> samiam@netcom.com (Scott Moore) writes:
  12. >rem5156@zeus.tamu.edu (The Doctor) writes:
  13. >
  14. >>..does anyone know why my system maxes out to 100% when I use Telix, or OrCAD
  15. >>or AutoCAD in a DOS full-screen session?
  16. >
  17. >Apparently pulse gets confused with dos/windows tasks. The CPU useage as 
  18. >displayed is not correct.
  19.  
  20. Well, pulse is only as confused as your DOS apps.  DOS apps tend to poll
  21. the keyboard in a tight loop, such as:
  22.  
  23.     while NOT User_hit_key
  24.         do_small_chunk_of_background_processing();
  25.  
  26. Even if it has nothing to do in the background (with Autocad it might
  27. be drawing something large or computing, while checking for your next
  28. keystroke), it will still check to see if you hit a key or check to
  29. see if it has something to do.  
  30.  
  31. This (I think) is one of the biggest uses of threads.  One thread will
  32. be waiting for a key (not polling, but waiting via an OS/2 DosKbdxxx call)
  33. while another thread is running and processing your request.
  34.  
  35. Pulse doesn't realize that nothing is being done in your dos app, it just
  36. knows that your dos app is doing something.  You can change how much time
  37. OS/2 gives to a dos app in the IDLE_SENSITIVITY and IDLE_SECONDS settings.
  38.  
  39. Jeff
  40. -- 
  41. --------------------------------------
  42. jurlwin@gandalf.umcs.maine.edu
  43.  
  44.