From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.os.xinu:148 comp.os.misc:859 comp.lang.ada:2250 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!rjh From: rjh@cs.purdue.EDU (Bob Hathaway) Newsgroups: comp.os.xinu,comp.os.misc,comp.lang.ada Subject: Re: Running programs from inside XINU Summary: Dynamic Processes Message-ID: <6465@medusa.cs.purdue.edu> Date: 8 Apr 89 04:29:51 GMT References: <776@jetsun.WEITEK.COM> <8904071506.AA03015@merlin.cs.purdue.edu> Sender: news@cs.purdue.EDU Followup-To: comp.os.xinu Organization: Department of Computer Science, Purdue University List-Id: In article <8904071506.AA03015@merlin.cs.purdue.edu>, sbm@CS.PURDUE.EDU writes: > John Mcleod asked whether it is possible for Xinu to load programs >dynamically from a file and run them. > > The Xinu operating system actually consists of a library of system >calls and a main program that boots the system and runs the user's >program as a process, all of which are loaded with the user's program >before run time. Xinu creates processes running functions that are >already loaded, rather than reading them in from disk; thus, it is >possible for Xinu to run on a machine without a file system (as it often >does in practice). Modifying Xinu to load processes dynamically from >disk is of limited utility, since Xinu does not have a compiler, and so >you have to leave Xinu to compile a program anyway. Furthermore, Xinu Yes, but executable files wouldn't need to be linked with the xinu operating system reducing static linking time by about 30 to 40 seconds on a Sun 3/50. Also, it would be nice to execute utility or any executable programs as they exist in the file system from a shell without rebooting and reloading the kernel operating system. In a graduate-level distributed systems class at Purdue, I proposed dynamically loaded heavyweight user-level processes, as originally suggested to me by Jim Griffioen, for the preceding reasons. Xinu's purpose was primarily for real-time systems such as file and page servers or for educational purposes in several courses at Purdue and elsewhere. The proposal entailed a process model supporting threads running in (dynamic) heavyweight processes which was modified and subsequently accepted in class. An interesting feature emerged from allowing heavyweight processes. Since the Xinu OS interface provides concurrent system calls for lightweight processes, it became obvious that separately compiled xinu programs should be allowed to run multiple threads of control per process which lead to a new process table implementation based on address spaces. This makes Xinu an excellent vehicle for an Ada virtual machine because Ada tasks could be trivially implemented as Xinu threads. This is a project which may become feasible in the near future. > The user would compile and link dynamically loaded executable files >separately from the Xinu operating system itself. Since none of the >addresses of Xinu system calls are available when compiling and linking >these files, the Xinu system calls would have to be implemented as >traps, rather than as function calls, as they currently are. Then I also worked on system calls and library routines in the aforementioned class and we did provide a library and trap mechanism to support user level (dynamic) processes. Dr. Comer's PhD students are still working on the system. Bob Hathaway Rjh@purdue.edu