home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / transput / 1230 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.6 KB

  1. Path: sparky!uunet!mcsun!uknet!uos-ee!ee.surrey.ac.uk!R.Peel
  2. From: R.Peel@ee.surrey.ac.uk (Roger Peel)
  3. Newsgroups: comp.sys.transputer
  4. Subject: Re: Dynamic Memory Allocation
  5. Keywords: Occam3 recursive
  6. Message-ID: <1992Nov20.175020.25307@EE.Surrey.Ac.UK>
  7. Date: 20 Nov 92 17:50:20 GMT
  8. References: <1992Nov11.033835.21118@netcom.com> <2225@eagle.ukc.ac.uk> <dbc.722086651@bill> <BxyB6I.LLF@research.canon.oz.au>
  9. Sender: ees1rp@ee.surrey.ac.uk (Roger Peel)
  10. Organization: University of Surrey, Guildford, Surrey, UK. GU2 5XH
  11. Lines: 43
  12.  
  13. Andy Newman (andy@research.canon.oz.au) wrote recently about his
  14. involvement with a project that developed a Dynamic Memory Allocator.
  15.  
  16. I liked his account of the memory allocation procedure - and his honesty
  17. about its non-adherence to the occam usage checking rules!
  18.  
  19. I have one comment to add.  The parallel process in the middle (the
  20. allocator process) can very easily become the performance bottleneck of
  21. the whole of the rest of the system, since it queues up requests and
  22. responds to them serially.
  23.  
  24. Apart from the problem of distributing permissions to access memory blocks
  25. of varying sizes, one might consider implementing such an allocator with a
  26. little extra buffering.  This would have the effect of eagerly outputting
  27. (in parallel) a permission token to each process that it serves.  Only
  28. when a process accepts its token does the allocator reschedule and send it
  29. another one.  Returned tokens are processed along a different set of
  30. channels which are quite separate from the first set.  Think of the
  31. allocator and the client processes as each being separated in both
  32. directions by small FIFOs, and notice the reduced latency that this
  33. provides.  Obviously, more tokens will be in transit at any time, and the
  34. scheme will use its memory pool less effectively - but the benefit could
  35. be that the system runs rather faster.
  36.  
  37. A similar benefit could be gained when implementing the TCP/IP
  38. communications protocol, if one has also decided to use the 'mbuf' memory
  39. allocation scheme suggested in its specification.  In this case, and under
  40. heavy network loads, the allocator will be very busy and the overhead
  41. could be quite noticeable.  Of course, this shared memory model might not
  42. be the best choice these days, anyway!
  43.  
  44.  
  45. Roger M.A. Peel
  46. Department of Electronic and     Phone : +44 483 509284   (0483 from UK)
  47.       Electrical Engineering       Fax : +44 483 34139
  48. University of Surrey             Telex : 859331
  49. Guildford                        JANET : R.Peel@uk.ac.surrey.ee
  50. Surrey  GU2 5XH                   UUCP : ...mcsun!ukc!ee.surrey.ac.uk!R.Peel
  51. United Kingdom
  52.  
  53.  
  54. -- 
  55. Roger Peel
  56.