Linux-Development-Sys Digest #104, Volume #7 Wed, 25 Aug 99 05:14:10 EDT
Contents:
Re: Shared Libraries: what is the linux equivalent of "dllimport" and "dllexport"
(Kelly Burkhart)
Re: Jesus: the ultimate OS ("Christopher R. Thompson")
Re: Jesus: the ultimate OS ("Christopher R. Thompson")
What are difference between Monolithic kernel architecture & Microkernel
architecture ("Richard Lo")
Re: Jesus: the ultimate OS ("Christopher R. Thompson")
----------------------------------------------------------------------------
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Shared Libraries: what is the linux equivalent of "dllimport" and
"dllexport"
From: Kelly Burkhart <[EMAIL PROTECTED]>
Date: 24 Aug 1999 20:54:04 -0500
"Noam K" <[EMAIL PROTECTED]> writes:
> Hi,
>
> I am trying to write a shared library which exports only some of its
> functions.
>
> In windows this is easily done by creating a DLL and using
> __declspec(import) or (export).
>
> Any ideas how this is done in Linux? are there different solutions for a.out
> and ELF libraries?
>
> Thanks,
> Noam
>
>
>
You should use a version script:
slib1.h -------------------------------------------------
extern int slib_i;
int slib00();
int slib01();
int slib02();
slib1.c --------------------------------------------------
#include <stdio.h>
int slib_i=5;
int slib00() { printf("slib00\n"); }
int slib01() { printf("slib01\n"); }
int slib02() { printf("slib02\n"); }
main.c -----------------------------------------------------
#include <stdio.h>
#include "slib1.h"
int main()
{
int i = slib_i;
slib00();
slib01();
slib02();
}
libslib1.ver ------------------------------------------------
#
# Export file for libslib1
#
libslib1.so.1.0 {
global:
slib_i;
slib00;
slib01;
slib02;
local:
*;
};
Makefile ---------------------------------------------------
main: main.c libslib1.so.1.0
gcc -o main main.c -L. -lslib1
libslib1.so.1.0 : slib1.c libslib1.ver
gcc -c -fPIC slib1.c
gcc -shared -Wl,-soname,libslib1.so.1,-version-script=libslib1.ver -o
libslib1.so.1.0 slib1.o
ln -sf libslib1.so.1.0 libslib1.so.1
ln -sf libslib1.so.1.0 libslib1.so
clean:
rm -f *.o *.a *.so *.so.* *~ main
=============================================================
To demonstrate, try removing a symbol from the version script and rebuilding.
--
Kelly R. Burkhart
[EMAIL PROTECTED]
[The litigation] industry was, of course, up and running before the
tobacco litigation, but that taught lawyers just how lucrative it
could be to blame individuals' foolishness on, say, Joe Camel.
-- George F. Will
------------------------------
From: "Christopher R. Thompson" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: Jesus: the ultimate OS
Date: Wed, 25 Aug 1999 01:10:41 -0700
Vladimir Z. Nuri wrote:
>
> Christopher R. Thompson <[EMAIL PROTECTED]> wrote:
> : Perhaps
> : TAO could even convince INTEL to build a TAO processor. Don't you agree?
>
> sounds like a good idea to me.
>
> : If you can layout TAO'S internal structures ie: Interrupt stacks,
> : process trees, driver interfaces, etc I would be glad to start writing
> : code immediately.
>
> the document is a start in this direction. in contrast to the
> linux/unix "bottom up" it is a "top down" approach. I will work
> with anyone who wants to contribute. people who write messages
> in the form "I will not do anything until I see [x]" do not really
> strike me as willing contributors. its the moving goalpost problem.
>
I have always done things left right, top down. This is natural. That is
probably why I am now thinking that you are upsidedown right wrong but I
really can't explain why. It's probably a perspective issue that with
the proper software is easly rearranged.
If your moving the goal post... your cheating and forefit the game. I
win.
And.... as you can see below... my very first contribution to ....
Linux. Why? They got code, specs, everthing I need, and working
operating system.
Actually the reason I was looking here was to find out if anyone was
working on a parallel file system for linux beowulf's. When I saw this
post I simply could not restrain myself from comment. Someone last year
was working on a volume manager where (I think) you could mount multiple
disks to the root file system that were not constrained to a particular
directory tree. Since immigrating from MPE this (unconstrained) file
system is a concept that I am familiar with. IE: files should be allowed
to span multiple drives.
The problem that I would like "Jesus the OS" to solve for me in parallel
is the problem of large seqential files and databases. I keep running
into "whoops file is larger than 2Gig" too bad! And it also takes many
many minutes to processes them.
I was thinking along the lines mkpe5fs, pe5fsck (make parallel extended
5 file system & parallel extended 5 file system check) a kind of
parallel I/O file system. Vladimir you can make this a Parallel->Files
or Files->Parallel object in Tao if you want to. I don't know anything
about TAO so I wouldn't know where to start.
First we define the parallel file system.
cat > /etc/pfstab
#First file system
#Node:{dev|dir} MountedTo redundant +=continuation
Node1:/dev/whatever /parallel native +
Node2:/dev/whatever /parallel nfs +
Node3:/dev/whatever /parallel vfat +
Node4:/dev/whatever /parallel e2fs
#Second file system
#...
<EOF>
Does each node have to have an independant Pfstab? Probably not, but if
they do they all better agree or the system won't mount. Can we put
parallel files on dissimilar file systems fat, vfat, e2fs etc. Don't
know til we try. But I can't see any real reason why not.
pmount /parallel
pumount /parallel
Pmount checks the superblock on It's root node and compares with each
node in the parallel system. If Aok system is mounted and the
superblocks synchronously updated.
Like mount... to umount... files must be sync'd/clean/closed to succeed.
Now we can create a file in parallel. How do we do this you may ask? I
don't rightly know. But maybe something like Ok nodes are sequential. If
I run program on Node1. Node1 is root-of-file, and we trip through the
nodes in order and come back to node1 and begin another trip until the
file is completely written. If I run progam on Node2, Node2 is
root-of-file and we trip in the same order where Node1 is last and we
start again with Node2. etc. etc. etc.
What happens if node3 is a 33mhz 386 with an 8bit hard drive on an 8mhz
ISA bus and all other nodes are 450 pentiums with 40mhz scsi'? Well
cat > /etc/pfstab
node1:/dev/whatever /parallel native +
node2:/dev/whatever /parallel nfs +
node4:/dev/whatever /parallel e2fs +
node1:/dev/whatever /parallel native +
node2:/dev/whatever /parallel nfs +
node4:/dev/whatever /parallel e2fs +
node3:/dev/whatever /parallel vfat
<EOF>
will access nodes 1,2, and 4 twice for every node3 access.
Theoretically.
What happens if node4 is 40mhz M68040. Well it better have a compatible
version pe5fs or /lib/pstdlib.so.
For the purpose of this discussion we will continue with the first
pfstab config defined above.
What kind of files can we create? I was hoping someone could tell ME but
I kinda like these.. character alternate, line alternate, block
alternate with optional multiples, and lastly file alternate.
character(string) alternate: I don't know why anyone would use it but
characters or strings are written alternatly to each node in a cyclic
fashion. Each getc()/putc() is serial by node. Pgetc()/Pputc() will
probably be a little smarter with threads, and dynamic "multiple"
overrides, and optional stuff like locality of data streaming stuff,
virtual file pointers, counters, and other junk that only OUR limited
minds can imagine.
Line alternate: Same thing. gets()/puts() reads/writes lines around the
parallel node loop with optional multiples.
Block alternate: Probably more effecient reads()/write() blocks of
(SIZEOF) in the same fashion as above.
Multiples are simply some multiple of char, line, or block to keep track
of sequentiality. ie: multiple chars, strings or blocks are written to a
node in sequence before hopping to the next node.
File alternate: Just flat files in sequence across nodes. The first 2gig
on node1. The second 2gig on node2... etc.
Ok. Now we've got some parallel files created. How do we access them
effeciently?
Let's start by writing some simple programs and see how complicated it
should be.
pdd if=/dev/something of=/parallel/example1 -blockalternate -multi:5 -bs
1024
We are taking serial data from /dev/something and creating parallel
files on nodes 1 through 4 with 5 x 1024 block sequences on each node.
The first five blocks go to node1, 6-10 node2, etc.
Ok. Fine. But a more effecient distribution of the data for a different
application would look like this.
pdd if=/parallel/example1 of=/parallel/example2 -blockalternate -bs 1024
Which says to break up the 5 block multiples on each node and do single
alternation. This should be really interesting to see how we scale and
what kind of bandwith is optimum between nodes etc.
block1 node1 goes to block1 node1
block2 node1 goes to block1 node2
block3 node1 goes to block1 node3
block4 node1 goes to block1 node4
block5 node1 goes to block2 node1
block1 node2 goes to block2 node2
block2 node2 goes to block2 node3
block3 node2 goes to block2 node4
block4 node2 goes to block3 node1
block5 node2 goes to block3 node2
block1 node3 goes to block3 node3
block2 node3 goes to block3 node4
block3 node3 goes to block4 node1
...etc.
Looks simple enough and parallel enough. Except I guess I need to define
for myself the difference between physical blocks and virtual blocks.
Physical block numbers (above) represent the block count on the physical
drive on the physical node. Virtual block numbers must then represent
the logical block sequence of the virtual flat file. Virtual address's
within the blocks are trivally computed here. So the same file movement
using virtual block numbers would look like some kind of inverse matrix
thingy?
vblock1 node1 goes to vblock1 node1
vblock2 node1 goes to vblock2 node2
vblock3 node1 goes to vblock3 node3
vblock4 node1 goes to vblock4 node4
vblock5 node1 goes to vblock5 node1
vblock6 node2 goes to vblock6 node2
vblock7 node2 goes to vblock7 node3
vblock8 node2 goes to vblock8 node4
vblock9 node2 goes to vblock9 node1
vblockA node2 goes to vblockA node2
vblockB node3 goes to vblockB node3
vblockC node3 goes to vblockC node4
vblockD node3 goes to vblockD node1
4 process's reading, writing, gathering, and distributing in a simple
predictable manner.
Now that we have optimum distribution of our data lets write a simple
application and see how scary we really are.
#prog Simple_Numerical_Analysis
#include pstdio.h /*declares parallel i/o & code?*/
#include math.h /*needed for sqrt*/
int main(argc, argv)
int argc;
char *argv[];
{
FILE *Pfopen() *example1
double sum,median,stddev,var,innum;
Long Long N,N2,SN;
sum=median=stddev=var=innum=0.0;
N=N2=SN=0;
if ((example1=pfopen("/parallel/example1",'r'))!=NULL)
{
while (pfscanf("%lf",&innum)!=EOF)
{
sum+=innum;
N++;
{
fclose(example1);
}
else
{
printf("example1 pfopen failed/n");
exit(1);
}
mean=sum/N;
system("psort -n /parallel/example1 -o /parallel/example3")
SN=N/2;
if ((example1=pfopen("/parallel/example3",'r'))!=NULL)
{
while (pfscanf("%lf",&innum)!=EOF)
{
s=innum-mean;
var+=(s*s);
if ((++N2)==SN) /*we are at the half way mark*/
{
if ((SN*2)==N) median=innum;
else
{
median=innum; /*or half way mark -.5*/
pfscanf("%lf",&innum);
median=0.5*median+innum;
s=innum-mean;
var+=(s*s);
}
}
}
stddev=sqrt(var);
}
else
{
printf("example3 pfopen failed");
exit(1);
}
printf("N=%d,median=%f,stddev=%f\n",N,median,stddev);
exit(0);
Basically we read the file once to find the mean and again to find the
standard deviation using the mean. We sort the file simply to pluck the
number out of the middle to get the median of the distribution. Taken
from "Numerical Recipes The Art of Scientific Computing" and yes there
is a better way to do it.
The idea is to somehow automatically parallelize the process from the
above code. All you MPI and PVM guys don't be afraid to jump in and show
me how it's done. This is my first foray into the parallel world and my
first C program and I really have no idea what I'm doing wrong here.
First let's assume that #include <pstdio.h> defines some basic switches
and stuctures needed for the parallel i/o system. What exactly will they
do? What do they need to do? How do four independant yet connected
processes stay in sync. First off the simple stuff. Parallel I/O means
parallel processes? The OS forks one identical process for each node.
What happens to standard non parallel processes? I guess that you get
four separate outputs instead of one. Hopefully in order by node... but
what happens when node3 completes before node2? Is this accepable?
Probably not. Does this mean that non parallel code should not be
allowed to run on these files? Maybe, maybe not. Can we really know what
and how code should be executed in parallel from one pscanf call to the
next? I doubt it but hey... anything should be possible.
Let's look at the first step of the program sum and count, embarassingly
parallel? Sum and count each node then add the nodes to the finally. So
how does the pscanf macro know what to do? It can build similar code to
integrate the external node accumulators easy enough through another
customized message passing interface.
But what about the third step. How does a process know that it is at the
half way point of the virtual flat file? We have created our example1
file using the block multi style. The "Virtual" parallel sort program
will theoretically create sequential sorted output of the same style.
The half way point is somewhere near the middle of one of the four nodes
but exactly precisly where and how will our ++N2 counter find it? I have
no "F.ing" idea. Do we have to modify the program to examine the virtual
file counter instead? Probably. But what if I don't want to? Well how
else do you think you can do it? We cannot assume digit fields of
consistent length. because of the block access method of creating the
file a data field might and probably will span blocks and nodes. This is
easy enough to be handled in the file system. But how to make that
stupid little counter step to each pscanf call in accordance with
logical virtual counter is beyond me.
Now lets discuss how this might work in another practice. What about
programs like sed, grep, cut... where we process linein > lineout. For
std file in and parallel file out one process reads and redirects
alternate i/o to the parallel output nodes. For parallel in and parallel
out, we just fork a process for each node and process the file locally
on that node? cut should work fine linesout=linesin but sed and grep
could possibly add or delete lines on the output file. How should we
handle keeping the files sequential and in order? Passing messages from
node to node? There must be a better way. I don't think that the program
(sed, grep, cut) should have to actually know anything about parallel
files to process them correctly but I guess we will have to wait and
see. Something else like the program coded above and not parallelized
just might have a problem. For parallel in and std output files we will
have a problem when we go over the 2gig limit again.
Enter alternate parallel structure number one.
Perhaps we could add an unstructured output option that says order is
not important yet keeps order intact in an obscure way...or parallel
structure none (order is not important and I don't need to keep it
intact). If order is important then we will probably need to negotiate
between the four nodes and send the records to their proper places
incurring message passing bandwidth. For structure one an output file
might carry a pair of pointers in a hidden file or DIRENT2 that could
indicate relative positions of records within the file.
Lets try grep. Grep searchs a file for string something and outputs a
line of text when found to stdout. If the output is to a file on the
parallel filesystem then hopefully the file system will redirect puts
output to the parallel Pputs i/o call. If input is a parallel file, or a
mixture of parallel and non/parallel files then I guess things start to
get hairy. Theoretically the list is processed sequentially and
reception of the output should also be sequential but optionally
unordered might be ok.
> (interested ppl, plz see my sig and sign up to mailing list)
>
> I recognize words are cheap, but your own cynicism/sarcasm I
> find unnecessary.
>
> : However after examining your constraint "wish list" I find nothing that
> : the current OS's don't already do.
>
> bzzzzzzzzzzzzzzzt. every item in the essay emphasizes how its
> description varies from all existing OSes. there are many examples
> listed, but one of my favorites is the way that win95 cannot
> handle the simple problem of viruses.
>
> : Have you taken a look at WEB-TV lately.
>
> a step in the right direction, imho, which the essay mentions
> specifically. btw, just curious, did you read any of it?
>
Obviously not. Just a minute and I'll go look for it. Ok I found WebTV
and something about Java. Here it is below.
<quote>
predictions
My opinion is that a network computer (NC) will play a very important
role in the development of computing and the conventional domain of
the OS in the near future. MS is finding itself in a similar
situation
that IBM found itself in at the birth of the PC age. IBM was
reluctant
to "cannibalize" its existing mainframe product line by selling PCs
cheaply, even though huge (or greater) profit was still obtainable.
The Java/WebTV announcement suggests MS is reluctant to cannibalize
Win95 sales with the invention of a versatile new NC.
<another quote>
the object browser
In Tao, a universal object browser is available and contains the
complete logic and interface for dealing with the entire system. The
object browser is a
cross between a web browser, an OS application desktop, process manager,
a file viewer, and a programming environment. It is very cleverly
constructed such that only the amount of information relative to the
sophistication of the user is revealed.
<from your web page>
realization of Tao
Tao will be difficult to realize! Many aspects of its design may seem
technically unrealistic, infeasible, or even impossible. Yet it is
clearly a highly
desirable OS in theory with aspects that far transcend even the best
current OSes.
<unquote>
If you think that WEB-TV is a network computer... you have been duped!
Further if you think Java is a language for computers I think you are
mistaken again. If you say "MS and WEB-TV (can't or won't) incorporate
Java" into their system what makes you think that TAO should? There are
microprocessor addons from IBM, Sun, and I'm sure others that allow you
to plug in as many Java Virtual Machines as your motherboard will carry.
As ironic as it may seem Java was a solution to the varied CPU
archithectures that allowed code to be portably translated across
platforms. We already have that with GNU-C at the machine level and it
fully supports objective C, and c++. Java will always require a
translator and therfore an inefeciancy. The idea that code be
transportable and then install a unique processor to make it run well
seems just a little bit strange to me. Alah Java.
Networks and network computers have been around since the begining of
networks. Age is the greatest teacher so take a look at how it has been
done in the past with far less resources than what is currently
available today. If it worked well when computers and networks were slow
and memory constrained... why add a bunch interpreters, translators, and
superfulous layers of code?... just to slow things down? Why?
Maybe I'm missing the point of "Universal Object Browser". Since I'm not
object oriented are you saying that TAO will automatically understand
that when I want to look at a PDF file written for Adobe Browser for the
first time it will know where to get the Browser? I know that Adobe...
once they know TAO is online will change something or move it somewhere.
Currently the browser comes in MS-Windows, NT, Unix/Linux flavors. Which
one of these will run on TAO... or should Adobe need to write a special
TAO version. Maybe TAO will interpret the changes all by itself. What if
I want to use ghostscript instead of Adobe?
The only reason TAO is difficult for ME to realize is because there is
no code that I have seen, or that you have pointed me to. You say in
your article "it is very cleverly constructed such that only the amount
of information relative to the sophistication of the user is revealed".
Well my sophistication must then be zero because that is exactly what
has been revealed to me. If it has been constructed then release it and
tell us where it is. I certainly can't find anything on your web page.
That's why I asked in the first place. I thought if anyone knew anything
about TAOS they would reply "go look here http://TAOS.whatever/ But
NO... I get accused of not contributing. Without code and effort, you
are right, it will never happen. Current operating systems have Code,
drivers, GUI's, objects, compilers, threads, java, and whatever else you
want to be in TAO. So what is it exactly that you are proposing. A new
OS... OK fine then, what is it, where is it, how does it work, does it
conform to any known standard, does it conform to all known standards,
do you have any RFC's? Is it on top of FREEBSD, VMS, LINUX, or MVS... If
TAO is brand new how about some code and specifications. If YOU want
TAO... then start writing code. If you think I'm going to contribute my
time and energy to TAO while you just sit and whine about what TAO does
not do, or needs to do... well I think you get the picture. Show me some
real ideas unconstrained by our limited imaginations.
The only thing REALLY wrong with TAO so far that I can see is simply the
NAME. Try to find something a little more realistic. Maybe if this
parallel thing gets off of the ground Linus Torvalds will let me rename
"Linux" to "Jesus".
Really I'm not trying to rain on your parade. It's just that some of us
guys like to use computers for computing and have spent 30+ years making
all this possible for you. All of your GUI friends on WEB-TV, that want
to just browse the virtual cafe', chat, push shopping carts, and look at
pretty pictures really don't need a computer or OS at all. They just
need to spend more money. Contribute $$ to the GNU or Linux projects.
They'll get it done for you.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> state of the art OS research email http://www.egroups.com/groups/os-edge/
> Tao OS / Taos / the transcendental OS http://www8.pair.com/mnajtiv/tao.html
------------------------------
From: "Christopher R. Thompson" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: Jesus: the ultimate OS
Date: Wed, 25 Aug 1999 01:15:27 -0700
Scott Lanning wrote:
>
> Christopher R. Thompson ([EMAIL PROTECTED]) wrote:
> : Selious wrote:
> : > > I'm going to name my OS "Jesus". It will coded primarily to
> : > > destroy all "EVIL" objects os's and computers. Only the objects
> : > > that "LOVE" Jesus will survive and communicate with "Jesus".
> : >
> : > OK, my OS, named Gates, is going to represent the evil in society...
> : >
> : > Let's see who wins, hehehe
> :
> : Truly sir: Only those who love Jesus will live to see the Glory.
>
> Ah, so this is a module you're developing for JesOS?
Yes.. In a wink of an eye. Parallel I/O will destroy all evil.
------------------------------
From: "Richard Lo" <[EMAIL PROTECTED]>
Subject: What are difference between Monolithic kernel architecture & Microkernel
architecture
Date: Wed, 25 Aug 1999 16:33:40 +0800
Hi
I am interested in the Linux kernel. I knew the Linux kernel use monolithic
kernel architecture. Anyway, I have no idea about monolithic kernel
architecture and what differ from microkernel architecture.
Best regards,
Richard
------------------------------
From: "Christopher R. Thompson" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.advocacy,comp.os.misc,comp.unix.advocacy
Subject: Re: Jesus: the ultimate OS
Date: Wed, 25 Aug 1999 01:53:53 -0700
Paul E. Lehmann wrote:
>
> Hmmm,
>
> Ok, Lets see. Jesus was one of many so called "Healers and Messiahs" of his
> day"
Have YOU NOT seen miracles and healing? Is that his fault, or your own?
> If you believe that such an individual actually existed then it can be said
I do. You hear his name every day many times a day. How can it possibly
be a figment of so many peoples imaginations. I think your mind is
playing tricks on you!
> that he was rather fond of the juice of the grape, could quite possibly have
St. MaT 11:18 "The Son of man came eating and drinking, and they say,
Behold a man gluttonous, and a winebibber, a friend of publicans and
sinners. But wisdom is justified of her children." Jesus speaks for
himself. See also Mt 9:10 and Luke 7:34
> been gay, practiced the arts of a magician and had extreme contempt for non
Not possible and totally inaccurate.
Christians are not allowed to look to magicians, scientists,
astrologers, soothsayers, etc, for any kind of direction or indirection
but to GOD only.
> Jews. Are you sure you want to name your OS after JC? Just think of the
> many many cruelities that were / are commited in "His" name. You may be
A knowlegeable person would know better. Just because someone says "I am
christian" does not necessarily mean that the ultimate authority "Jesus"
agrees. But I guess that you would have to ask Jesus to know that,
wouldn't you. Anyone commiting cruelties "in his name" is EVIL and was
put there just to give you some demented rationalization for your
statement. Make the right choice. Read and Learn.
> better off to name your OS after some scientific fact as opposed to
> witchcraft and superstition.
>
> I know that many consider their OS a religion but aren't you going a bit
> far?
I'll have gone to far when my daemons become angels.
>
> Christopher R. Thompson <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > Vladimir Z. Nuri wrote:
> > >
> > > an HTML version of this article can be found at:
> > >
> > > http://www8.pair.com/mnajtiv/tao.html
> > >
> >
> > I'm going to name my OS "Jesus". It will coded primarily to destroy all
> > "EVIL" objects os's and computers. Only the objects that "LOVE" Jesus
> > will survive and communicate with "Jesus".
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************