Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!microsoft!michaelw From: michaelw@microsoft.UUCP (Michael Winser) Newsgroups: comp.os.minix Subject: Re: Using shared library in minix/PC Keywords: minix,library,shared Message-ID: <371@microsoft.UUCP> Date: 26 Jan 89 22:03:33 GMT References: Reply-To: michaelw@microsoft.UUCP (Michael Winser) Organization: Microsoft Corp., Redmond WA Lines: 54 In article chain@paul.rutgers.edu (Chain Lee) writes: > >I am suggesting that we use shared library subroutines in PC version >of minix. This can be justified by the following advantages. Hear, hear! One of my favorite features of the QNX operating system (an message passing system not unlike Minix) was the use of shared libraries. Such libraries were mountable (and unmountable) at any time. Libc.a became a bunch of stub routines that loaded ax with the correct value and did the correct interrupt. I'm sure that something similar could be done on both the PC and the ST. The result was a hello world executable that was less than 100 bytes (it may have been less than 25. The only constraint was that shared library routines could not have any global or static data. There are ways of getting around this (QNX had magic memory in every process' data segment) and for the most part it does not get in the way. > > [wonderful shared library advantages deleted] > >Although shared codes usually need address translation hardware to >support, shared library subroutines can be implemented in 8088 >or 286/386 real mode in software. e.g. a software interrupt >instruction can be used to call a shared subroutine, as we did to a >system call. The problem is to decide which subroutine is to be >present in the shared library and which is not, such that the system >can benefit the most (the kernel is not too large but commonly used >subroutines will be present). Candidates may include C runtime, curses, >and probably the ones found in runtime library of the window manager >which we are expecting. >The only disadvantage is that a few more instructions need to be >executed for each shared subroutine call. But if most of the >subroutines we chosed are long enough, the negative effect can be >neglected. We never noticed the difference. For most commands, the time saved in reading the disk was huge. For larger applications, we needed the extra code space anyway. We eventually implemented an object oriented programming environment that was almost entirely based on shared libraries and the existing small model compiler. Very nice. All this was done on a 512Kb machine using an 80186. Since starting at Microsoft I've been forced back into the world of DOS and OS/2 but I still like QNX. Michael Winser -- ____________________________________________ _ /) _________________________ |Nothing I say could possibly represent the \`o_O' "Oop, ackk, phtt!" | |opinions of Bill Gates or Bill the Cat. =( )= | |______________________________________________ U ___michaelw@microsoft.UUCP|