home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / minix / 3737 < prev    next >
Encoding:
Text File  |  1992-07-21  |  3.7 KB  |  80 lines

  1. Newsgroups: comp.os.minix
  2. Path: sparky!uunet!mcsun!sun4nl!relay.philips.nl!philce!meulenbr
  3. From: meulenbr@ce.philips.nl (Frans Meulenbroeks)
  4. Subject: Re: Microkernel discussion
  5. Message-ID: <1992Jul21.135917.3527@philce.ce.philips.nl>
  6. Sender: usenet@philce.ce.philips.nl (USENET post news)
  7. Organization: Philips Consumer Electronics, Eindhoven
  8. References: <1992Jul21.093145.328@ica.philips.nl>
  9. Date: Tue, 21 Jul 1992 13:59:17 GMT
  10. Lines: 68
  11.  
  12. adrie@ica.philips.nl (Adrie Koolen) writes:
  13.  
  14. >I understand your dislike (a little) but I can't help to find it a little
  15. >bit ridiculous that a device driver shouldn't know about the location of
  16. >some kernel information. I agree that it's nice to have all OS parts
  17. >completely separated, but it's a trade between execution speed, code
  18. >length, code modularity, source maintainability, etc. I'm not saying that
  19. >I know where the optimum is. Because soft- and hardware differs, and
  20. >people have their own demands and opinions, the optimal point is quite
  21. >subjective.
  22.  
  23. Ok. I get your point. I can imagine the following mechanism:
  24. Interfacing between a process and the kernel is done through a limited
  25. number of functions. In my view the interface always was done through
  26. message passing. If these functions are defined in a separate file
  27. (e.g. utility.c), then I see no real problem in directly calling
  28. kernel routines in systems where this is possible. This would simply
  29. mean a different file utility.c on different systems.
  30. I see an advantage in this approach.
  31.  
  32. >In any case, in order to comunicate with the rest of the system, each
  33. >driver (or process) should have some fixed information about the rest
  34. >of the system, i.e. tables, addresses and/or interrupt numbers. By
  35. >restricting the amount of directly available information, the channels
  36. >through which the information, which a driver needs from the kernel or
  37. >other parts of the system, travels can be a real bottleneck.
  38.  
  39. Not in my prototype. All needed information is passed through messages.
  40.  
  41. [... lots trimmed ...]
  42.  
  43. >>I propose to let each process let itself register under a name in the
  44. >>kernel, and give processes the ability to inquire what the
  45. >>address/message id of a process registered under a certain name is.
  46. >>
  47. >>e.g. a driver would say
  48. >>register("WINI");
  49. >>while someone wanting to send a message to the wini driver could ask
  50. >>give_address("WINI") 
  51.  
  52. >Note that you have to guarantee that the `address' of the driver is
  53. >not changed in the meantime (between the give_address() and send()
  54. >calls). As drivers might die in the meantime (for whatever reason),
  55. >the send() might fail or arrive at the wrong driver. If you want to
  56. >send a message to "WINI" then why first ask for its address? Simply
  57. >use send("WINI", &msg). If "WINI" doesn't exist (anymore) you'll see
  58. >it in the return code.
  59.  
  60. Well, determining which process is registered under the string "WINI"
  61. will require a table search, which is costly if it has to be done
  62. on every message send.
  63. There is a substantial performance gain inquiring only once and saving
  64. the result (and be able to use the address in several sends).
  65.  
  66. Also the situation where a driver dies is quite rare (but of course it
  67. can occur). For the time being I decided just to ignore this case. 
  68.  
  69. In due time this could be solved by redefining the address to which
  70. the data is sent. I can imagine that the address consists of e.g.
  71. proc no. + pid or proc no + name, and that send checks if the
  72. address is still valid. If not an error could be returned, and the
  73. caller can check if there is another new process registered under that
  74. name and rework the address.
  75. Undoubtly other/better solutions for this problem exist.
  76.  
  77. --
  78. Frans Meulenbroeks        Philips Research Laboratories
  79. preferred email address:     meulenbr@prl.philips.nl
  80.