Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!im4u!ut-sally!utah-cs!utah-gr!uplherc!sp7040!jose!pedro!garon From: garon@pedro.UUCP (Garon C. Yoakum) Newsgroups: comp.lang.modula2 Subject: Re: Code for thought Message-ID: <128@pedro.UUCP> Date: Wed, 11-Nov-87 18:31:06 EST Article-I.D.: pedro.128 Posted: Wed Nov 11 18:31:06 1987 Date-Received: Sun, 15-Nov-87 20:52:55 EST References: Organization: An As Yet Unnamed Public System Lines: 23 Summary: Modula/2 Processes In article , BOTCHAIR@UOGUELPH.BITNET (Alex Bewley) writes: > > As you all know, one can create processes in Modula-2. Suppose you were > to design a system that was totally process oriented (ie. each procedure was > made into a process). Could you make a time scheduler process (run with > IOTRANSFER off the system clock) to switch other processes (ie. force them > to switch) giving each one equal cpu time? Personally, I have written such a system with modula/2. Although I don't think it is very practical for normal programming techniques, I do think it works great for object orientated technicques. One of the obvious problems with using interupts for procedure calls in time. Interupts take a lot of time to process. Therefore, I only use them to process actions, exceptions, events, etc. Just in case your interested, here are some of the things my modula/2 scheduler does: 1 - Assignes process' priorities for scheduling 2 - Dynamically allocates/deallocates memory for processes 3 - Dynamically adds/deletes processes There are a few of the reasons why I perfer programming in modula/2. In any of the other many languages I can program in, I would have had to add some assembler subroutines. Thereby limiting maintainabiltiy, portability, and other niceties.