home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v4 / text0007.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.2 KB

  1. From: seismo!gatech!hplabs!fortune!mats (Mats Wichmann)
  2. Date: Monday,  9 Dec 1985 14:28-PST
  3.  
  4. The size of the environment certainly matters to fork/exec; the
  5. reason is that all that data in user space has to be transferred
  6. to kernel space somehow, then copied back out as part of the new
  7. process. This is typically done through a series of fubyte()
  8. calls, which vary in inefficiency with the type of MMU being
  9. used in the machine. For someone running, say, a Motorola 68451
  10. there is a horrible cost because the kernel has to do a lot
  11. of calculation before knowing the virtual-to-physical translation
  12. (Although by being clever and "caching" translations you can speed
  13. it up quite a bit). Other MMUs make it easier - I think the VAX
  14. scheme is a major improvement (although I am not intimately
  15. familiar with it) and the Motorola 68851 is even better, and if
  16. I am not mistaken, the National MMU chips even have an instruction
  17. which basically moves data between user space and kernel space.
  18.  
  19. Whatever the exact numbers, transporting environments (and argument
  20. lists, for that matter) across execs is a costly operation compared 
  21. to most others.
  22.  
  23.     Mats Wichmann
  24.     Fortune Systems
  25.     {ihnp4,hplabs,dual}!fortune!mats
  26.  
  27. Volume-Number: Volume 4, Number 8
  28.  
  29.