Path: utzoo!attcan!lsuc!ncrcan!brian From: brian@ncrcan.Toronto.NCR.COM (Brian Onn) Newsgroups: comp.protocols.tcp-ip.ibmpc Subject: Re: Splitting up KA9Q-net (was: Re: Anomalies with KA9Q) Message-ID: <1010@ncrcan.Toronto.NCR.COM> Date: 14 Nov 88 03:23:24 GMT References: <8811091318.aa29770@Louie.UDEL.EDU> <8811102102.AA00584@b-tech.ann-arbor.mi.us> Reply-To: brian@ncrcan.Toronto.NCR.COM (Brian Onn) Organization: NCR Canada Ltd., Mississauga, Ontario Lines: 31 In article <8811102102.AA00584@b-tech.ann-arbor.mi.us> zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes: >It seems entirely feasible to run multiple threads within a single dos program >- all you need is a small interrupt driven kernel to do scheduling and >i/o. I've heard that some of the Microsoft C library routines are not >reentrant though. Has anyone implemented a kernel for something like this? Yes, I have. It was a satellite interface on an MSDOS machine. The software had to monitor outgoing satellite data, and capture and process incoming satellite data. Logging to the printer, and data re-transmission (ie RS232 repeater) was also implemented. The thing was basically as you described, a multi-threaded DOS program. The scheduler was driven from a table with a maximum of 10 threads allowed. Each thread got a slice of the CPU, taken away via the timer interrupt. There was rudimentary message passing between the threads, and also a limited memory pool (to allocate the message buffers from). The whole thing ran in the "background", to allow an operator to use a word processor at the same time. The files created with the word processor would ultimately be sent up to the satellite. Non re-entrant C libraries? I suppose that any library routines that keep a static variable storage would not be re-entrant. DOS and BIOS re-entrancy is another story. Brian. -- +-------------------+--------------------------------------------------------+ | Brian Onn | UUCP:..!{uunet!mnetor, watmath!utai}!lsuc!ncrcan!brian | | NCR Canada Ltd. | INTERNET: Brian.Onn@Toronto.NCR.COM | +-------------------+--------------------------------------------------------+