Hi! On Fri, Apr 16, 1999 at 05:34:05PM +0200, Konrad Kokoszkiewicz wrote: > Finally, if you write a program that handles multiple, but similar GEM > windows - like image viewer or something - you can basically write a > program that handles ONE window, then duplicate it using fork as many > times as many windows you need. Just an example. Uh, I don't want to measure the time context switches between all these tasks take, then ... Using MiNT's Pfork() has the problem that - to really have independent data/bss and allocated memory blocks - a context switch between two such instances of a process requires copying of all that, due to the lack of a virtual address space. (Yes, such a beast would be possible for >= 020, but plain old STs won't ever see a virtual address space.) So, Pfork() is quite elegant, but causes a lot of overhead. Creating pseudo-threads with Pexec(104) does not have this problem, but unfortunately needs a thread-safe library, as parent and child share their memory (the regions allocated to the parent when Pexec() was called). So, IMO there's no real easy /and/ efficient way for process-internal multitasking. (As in: "You want a new feature? OK, you can have it cheap, fast, and reliable. Choose any two.") Ciao Thomas -- Thomas Binder (Gryf @ IRCNet) gryf@hrzpub.tu-darmstadt.de PGP-key available on request! binder@rbg.informatik.tu-darmstadt.de
Attachment:
pgpQQ02lSdFIu.pgp
Description: PGP signature