home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / pop / 54 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  6.3 KB

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!doc.ic.ac.uk!uknet!news.cs.bham.ac.uk!axs
  2. From: axs@cs.bham.ac.uk (Aaron Sloman)
  3. Newsgroups: comp.lang.pop
  4. Subject: Re: Re: help [Real time and Pop-11]
  5. Summary: Real time applications in seconds or minutes are OK
  6. Message-ID: <BxpICy.GyJ@cs.bham.ac.uk>
  7. Date: 14 Nov 92 12:50:57 GMT
  8. References: <1dtqn9INN7kk@hobbes.genrad.com> <116670006@otter.hpl.hp.com>
  9. Sender: news@cs.bham.ac.uk
  10. Organization: School of Computer Science, University of Birmingham, UK
  11. Lines: 139
  12. Nntp-Posting-Host: emotsun
  13.  
  14. sfk@otter.hpl.hp.com (Steve Knight) writes:
  15.  
  16. > Date: 13 Nov 92 17:32:04 GMT
  17. > Organization: Hewlett-Packard Laboratories, Bristol, UK.
  18.  
  19. > This, I hope, gives a picture of Pop as a (family of) high-level language
  20. > that is suitable for complex programming tasks.  Its implementation
  21. > technology is very similiar to modern-day Lisp systems.  No current
  22. > implementations are suitable for "real-time" programming, by which
  23. > I mean applications that are critically sensitive to unpredictable
  24. > delays, since the demands of garbage collection and virtual memory are
  25. > difficult to reconcile with real-time work.
  26.  
  27. Actually Steve is not quite right. If you think in terms of
  28. micro-second and millisecond response he is. But if you are
  29. concerned with real time control of relatively slow moving systems
  30. where responses within a few seconds or a few minutes are acceptable
  31. then Pop-11 can be at least as good as or better than a human
  32. operator, as was shown by the RESCU project (Real Time Expert
  33. Systems Club) during the Alvey Programme in the late 80s. The
  34. system, written in Pop-11, and running under VMS on a VAX 730 (not
  35. the world's fastest machine even in those days), responded fast
  36. enough to control a detergent manufacturing process.
  37.  
  38. A knowledgable programmer can (for certain sorts of programs)
  39. eliminate garbage collections or keep the time requirements quite
  40. low because the Poplog garbage collector is VERY fast. E.g. I am
  41. currently typing in an editor that is integrated with Poplog and
  42. includes all my email reading and writing utilities, news reading
  43. and posting utilities, and much more besides (in a saved image). The
  44. total process size as shown by ps -ux on a SS 10/30
  45.  
  46.     USER      PID  %CPU %MEM SZ  RSS  TT STAT START  TIME COMMAND
  47.     axs      28005  0.0 6.7 2416 1896 p1 S    07:21   0:26 pop11 +bved.psv gtm
  48.  
  49. seems to be about 2.5Mbytes. If I stop editing and run a little
  50. program that repeatedly builds a lot of lists and throws them away
  51. I *predictably* get garbage collection times of under 0.15 seconds,
  52. e.g. 0.12 secs and 0.10 secs in this example:
  53.  
  54. : repeat 1000 times [% for x to 99 do [%x%] endfor %] -> endrepeat;
  55. ;;; GC-auto(C) 0.12  MEM: u 104465 + f 284643 + s 12 = 389120
  56. ;;; GC-auto(C) 0.10  MEM: u 104996 + f 284092 + s 32 = 389120
  57.  
  58. (The numbers after MEM refer to 32 bit words in volatile memory. So
  59. I have approximately 417K bytes of stuff in the heap that's fixed,
  60. and approximately 1136K bytes turning over, with a total heap size
  61. of about 1.5Mbytes.)
  62.  
  63. Obviously on a slower machine the same garbage collections would
  64. take longer.
  65.  
  66. It's worth noting that Steve's comments about limitations of Pop-11
  67. for realtime uses apply equally to most Unix systems, which can have
  68. all sorts of things going on that cause unpredictable delays while a
  69. program is running. I don't think Pop-11's unpredictability adds
  70. significantly to this in the hands of a knowledgeable programmer.
  71. Of course, it may not run as fast as a C program doing the same
  72. thing, but it will be much easier to develop and maintain than a C
  73. program.
  74.  
  75. > ...However, Pop is suitable
  76. > for general-purpose programming tasks since the typical run-time system
  77. > is not excessive by the standards of today's technology.  For example,
  78. > the richest and most complex implementation (POP-11) has a run-time
  79. > executable of approximately 500Kb.
  80.  
  81. That's a bit out of date: The latest distributed version of Pop-11
  82. (in Poplog V14.1) with hooks for X, and including the incremental
  83. compiler, the integrated editor VED (similar in philosophy and
  84. programmability to Emacs), the core of prolog, etc. is a nearly four
  85. times that size on a typical RISC machine. E.g. on a SPARC
  86.  
  87.     size $popsys/basepop11
  88.     text    data    bss     dec     hex
  89.     1556480 172032  245800  1974312 1e2028
  90.  
  91. and slightly smaller on a CISC amchine, e.g. an HP M68040 system
  92.  
  93.     size $popsys/basepop11
  94.     1235336 + 134264 + 292980 = 1662580
  95.  
  96. It is possible to build an executable that's well below a megabyte,
  97. but nowadays people mostly prefer to have the extra facilities. Of
  98. course, on a machine with virtual memory, a user who employs only a
  99. subset of the facilities in Pop-11 will actually not need to take
  100. up much space in memory. For reasons that I don't understand Pop-11
  101. seems to require far less memory than most commercial lisp systems
  102. even when you add the Poplog Common Lisp, e.g. starting up Poplog
  103. Common lisp:
  104.  
  105.     % pop11 +clisp
  106.  
  107.     Sussex POPLOG (Version 14.1 Thu Jun 11 15:30:52 BST 1992)
  108.     Common Lisp (Version 1.4)
  109.  
  110.     Setlisp
  111.     == ^Z
  112.     Stopped
  113.  
  114.     % ps -ux
  115.     USER       PID %CPU %MEM   SZ  RSS TT STAT START  TIME COMMAND
  116.     axs      29056  0.0  5.9 2276 1660 p1 T    12:24   0:00 clisp
  117.  
  118. I.e. just over 2MB for Poplog Common Lisp, Plus Pop-11, Plus VED.
  119.  
  120. Adding either Prolog or ML to Pop-11 gives slightly smaller sizes
  121. than lisp:
  122.  
  123.     % ps -ux
  124.     USER       PID %CPU %MEM   SZ  RSS TT STAT START  TIME COMMAND
  125.     axs      29113  0.0  5.4 2100 1524 p1 T    12:38   0:00 pop11 +pml
  126.     axs      29115  0.0  5.1 1916 1436 p1 T    12:38   0:00 pop11 +prolog
  127.  
  128. Compare your favourite commercial Common Lisp on a Sparc.
  129.  
  130.     % lisp
  131.     ;;; Sun Common Lisp, Development Environment 4.0.1, 6 July 1990
  132.     ;;; Sun-4 Version for SunOS 4.0.x and sunOS 4.1
  133.         .....
  134.     > ^Z
  135.     Stopped
  136.     % ps -ux
  137.     USER       PID %CPU %MEM    SZ  RSS TT STAT START  TIME COMMAND
  138.     axs      29126  0.0 31.7 21768 8960 p1 T    12:41   0:01 lisp
  139.  
  140. I.e. 21 Mbytes ???
  141.  
  142.     % size /bham/bin/lisp
  143.     text    data    bss     dec             hex
  144.     7593984 5963776 0       13557760        cee000
  145.  
  146. Of course, memory prices are falling, but nevertheless....
  147. Aaron
  148. -- 
  149. Aaron Sloman, School of Computer Science,
  150. The University of Birmingham, B15 2TT, England
  151. EMAIL   A.Sloman@cs.bham.ac.uk  OR A.Sloman@bham.ac.uk
  152. Phone: +44-(0)21-414-3711       Fax:   +44-(0)21-414-4281
  153.