home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / apple2 / 25856 next >
Encoding:
Text File  |  1992-12-21  |  2.7 KB  |  70 lines

  1. Newsgroups: comp.sys.apple2
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!teal!bazyar
  3. From: bazyar@teal.csn.org (Jawaid Bazyar)
  4. Subject: Re: re-entrant programs
  5. Message-ID: <bazyar.724922247@teal>
  6. Sender: news@csn.org (news)
  7. Nntp-Posting-Host: teal.csn.org
  8. Organization: Colorado SuperNet, Inc.
  9. References: <BzIxqD.9Ln@griffin.cuc.ab.ca>
  10. Date: Mon, 21 Dec 1992 07:17:27 GMT
  11. Lines: 57
  12.  
  13. dockery@griffin.cuc.ab.ca (Sean Dockery) writes:
  14.  
  15. >This is a repost of a message which (should have) appeared on
  16. >comp.sys.apple2 a little while ago.  I received no responses to the
  17. >message so I can only assume that it was lost in the internet.
  18.  
  19. >---repost starts---
  20.  
  21. >I have often heard the term describing software to be "re-entrant."
  22. >The context under which I have heard it most used was an opinion that
  23. >the Apple IIgs tools and GS/OS would be easier to work with if they
  24. >were re-entrant.
  25.  
  26. >Would someone please enlighten me with the answers to the following:
  27.  
  28. >    o What qualifies an application as re-entrant?
  29.  
  30.    're-entrant' means that more than one process may execute the program
  31. at the same time.  Usually the term is applied only to subroutines
  32. of a program.. recursive subroutines are reentrant, and that should
  33. give us a starting point.
  34.   
  35. >    o What are some examples of re-entrant software?
  36.  
  37.   As I mentioned above, recursive subroutines.  Usually, program
  38. segments that are reentrant store all variables on the CPU stack;
  39. thus, as long as each process (concurrently running programs that might
  40. share tool calls, for example) has a different stack, reentrant 
  41. libraries and tools greatly simplify the other work that's necessary
  42. to make multitasking work.
  43.  
  44. >    o What are some advantages and disadvantages of an application
  45. >       that is re-entrant?
  46.  
  47.   Reentrant code may or may not be larger than non, but it usually is 
  48. slightly larger and slightly slower than non-reentrant code.
  49.  
  50. >    o Are re-entrant applications significantly larger that
  51. >       others that perform the same task?
  52.  
  53.   No, I'd say 'slightly'.  But it depends on the task.  On average
  54. (and from experience) they're about the same.  Of course, in a multitasking
  55. system, reentrance actually speeds things up because you then don't
  56. have to manage global variable arbitration, which can involve lots
  57. of CPU time.
  58.  
  59. >From reading comp.sys.apple2, I believe that Jawaid Bazyar and Dave
  60. >Lyons appear to have a handle on what I want to know, and I would
  61. >appreciate a response from either of you.
  62.  
  63.   Hey, there ya go! :-)
  64.  
  65. -- 
  66.  Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
  67.  Procyon, Inc.              |   for the Apple IIgs!   
  68.  bazyar@cs.uiuc.edu         |   P.O Box 620334
  69.  --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 933-4649
  70.