home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / minix / 3751 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  3.0 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!mips!darwin.sura.net!convex!news.utdallas.edu!corpgate!crchh327!crchh424!gryphon
  2. From: gryphon@crchh424.BNR.CA (Joe Widows)
  3. Newsgroups: comp.os.minix
  4. Subject: Re: Microkernel discussion
  5. Message-ID: <1992Jul22.225432.28861@bnr.ca>
  6. Date: 22 Jul 92 22:54:32 GMT
  7. References: <1992Jul22.072333.1552@ica.philips.nl> <1992Jul21.093145.328@ica.philips.nl> <1992Jul21.135917.3527@philce.ce.philips.nl>
  8. Sender: news@bnr.ca (News on crchh327)
  9. Reply-To: gryphon@bnrrch43.bnr.rich
  10. Organization: BNR
  11. Lines: 67
  12. Nntp-Posting-Host: crchh424
  13.  
  14. I have been following the discussion on Micro Kernel avidly. And I wanted
  15. to put out a suggestion related to the idea of 'loadable' drivers.
  16.  
  17. The BIG DMS switches that we sell, use a language called PROTEL ( thats
  18. BNR lingo for 'STRANGE PASCAL/ADA/PROTEL') but among its many stange parts
  19. it allows 'GATING'  
  20.  
  21. It works this way:
  22.  
  23. A generic process ( scheduler for instance) has an array of pointers to code.
  24. It also has a mechanism for loading a pointer into this array dynamically.
  25. (Yes, I am not telling you how we did this, just what we do) Our switches
  26. can be running call processing and drivers can be changed on the fly.
  27.  
  28. I realize that we would have to create the mechanism, but gating the process
  29. to application defined code would solve some of this.  Yes, it means the 
  30. kernel/driver set could modify itself.  That is the point of GATING.
  31.  
  32. example:
  33.         /* this is in 'ALGOL' to specify the actions */
  34.         /* an external procedure that updates the process table is called */
  35.         
  36.         /* a global structure is defined for drivers  ( selection and priority
  37.         as well as the new pointer)   the offsets are defined globally */
  38.         
  39.         /* a structure for the data */
  40.                                                        
  41.         EXTERNAL ADDRESS ARRAY proc_values[*,*];
  42.         EXTERNAL PROCEDURE system_values RETURNS BOOLEAN;               
  43.                               
  44.                                                        
  45.                                        
  46.         PROCEDURE handler_code( what ) RETURNS BOOLEAN;
  47.                 ADDRESS what
  48.         BEGIN
  49.              %  realtime handler code here
  50.         END
  51.         
  52.         
  53.         proc_values[handler_definition, class] := HANDLER_KIND;
  54.         proc_values[handler_definition, priority] := HANDLER_PRIORITY;
  55.         proc_values[handler_definition, interrupt_class] := DMA;
  56.         proc_values[handler_definition, entry_point] := address(handler_code);
  57.         
  58.         IF system_values() = FALSE
  59.         THEN DO
  60.               ERROR( ' system_values_update FAILED ' );
  61.               RETURN;
  62.              END
  63.        END
  64.        
  65.  So, the upshot is that 'system_values' knows the offsets for the SCHEDULER
  66.  but no-one else does.  
  67.  
  68.  This is a cut and paste activity.
  69.  
  70.     Just a suggestion
  71.     
  72.               Widows
  73.    LINGUIST in the dark.
  74.    
  75. DISCLAIMER:  BNR builds telephones, not opinions.
  76. ANTIDISCLAIMER:  The wrong stuff is mine, ( the right stuff, too).      
  77.          
  78.         
  79.         
  80.         
  81.