From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,28b0249f7691568e X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,28b0249f7691568e X-Google-Attributes: gid102b75,public From: Sander Vesik Subject: Re: Alpha in peril? First Canion, now Pfieffer (I do think so) Date: 1999/05/13 Message-ID: <926577898.682154@haldjas.folklore.ee>#1/1 X-Deja-AN: 477316860 Cache-Post-Path: haldjas.folklore.ee!unknown@localhost.folklore.ee Content-Transfer-Encoding: 8bit References: <371AD875.407C6B83@igs.net> <7g4tng$5ue$1@nnrp1.dejanews.com> <7h7vnn$2ts$15@nntp.Stanford.EDU> <5l4sljqx5d.fsf@tequila.cs.yale.edu> <926495090.942894@haldjas.folklore.ee> <37396C9A.BD7A1D3B@hda.hydro.com> <926518491.202473@haldjas.folklore.ee> <37399C90.7829@hda.hydro.com> Content-Type: text/plain; charset=US-ASCII X-Complaints-To: usenet@news.ut.ee X-Trace: kadri.ut.ee 926577898 6 193.40.6.121 (13 May 1999 06:44:58 GMT) Organization: ERA/EKI FO X-Cache: nntpcache 2.3.2 (see http://www.nntpcache.org/) Mime-Version: 1.0 NNTP-Posting-Date: 13 May 1999 06:44:58 GMT Newsgroups: comp.arch,comp.sys.dec In comp.arch Zalman Stern wrote: > Terje Mathisen (Terje.Mathisen@hda.hydro.com) wrote: > : Sander Vesik wrote: > : > Searching in a linked list would be: > : > > : > while (k != SHARED_NULL) > : > { > : > if (k->data != item) > : > k=(struct xyz*)((char *)(k->next) + seg_base); > : I believe most programmers will agree that the line above is a _lot_ > : more likely to cause bugs than a (type-safe) > : k = k->next; > Imagine a function that is accessing objects in two different shared > segments. (After all, we want at least moderately fine grained sharing > right?) In which case, that seg_base global no longer works. You need N of seg_base is not global - it is an argument passed to the (standard) data in shared segment manipulation routines. > them and some way to manage them, etc. The PL/I mavens know the problem > well. (PL/i allowed static declarations associating bases with pointers. I > am told it was common enough for bugs to creep in by getting the base > association for a pointer wrong.) bugs crawl in from all kind of pointer arithmetic. > But the worse problem is that if you had a standard library routine to > search a linked list, you could not use it given the above. Compiler You naturally need separate functions for different types of data. Data types struct foo and strcut foo_shared are different enough. > support cannot easily solve this as base address management will have to > be known to the compiler. Also, it is doubtful that people will accept the > performance hit readily enough to compile all code this way. You don't have to have all code that way, only code that manipulates data that resides in a shared segment. The difference is in explicit vs. implicit sharing of data. > -Z- -- Sander There is no love, no good, no happiness and no future - all these are just illusions.