home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,971 of 117,927   
   Anton Ertl to dxf   
   Re: PAD and preemptive multi-tasking   
   21 Dec 24 11:26:24   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   dxf  writes:   
   >On 20/12/2024 9:10 pm, Anton Ertl wrote:   
   >> Bernd Paysan have been wondering what to do about PAD in the presence   
   >> of preemptive multitasking (but not multi-user) as implemented in   
   >> Gforth.   
   >   
   >You may need to explain 'preemptive' and its relevance here.   
      
   "Preemptive multi-tasking" means that a task switch can happen at any   
   time, not just at PAUSE or when invoking I/O words as with cooperative   
   multitasking in traditional Forth.  What we have in Gforth is actually   
   that the tasks can run in parallel on several CPU cores, but the   
   effects on software are similar to preemptive multi-tasking (there's   
   the problem of weaker memory ordering (than sequential consistency),   
   but that's only an issue when you want to communicate through shared   
   memory).   
      
   The relevance is that with cooperative multi-tasking a possible usage   
   pattern of PAD would be to use it between two PAUSEs, but not across   
   PAUSE etc.  That usage would be compatible with having only one PAD.   
   With preemptive multi-tasking (and parallel processing) one would need   
   to use a mutual exclusion construct around such usages (and existing   
   Forth code using PAD certainly does not have that).   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2024: https://euro.theforth.net   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca