Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"One Architecture, One OS" also translates as "One Egg, One Basket".


devel / comp.arch / Re: Paper about ISO C

SubjectAuthor
* Paper about ISO Cclamky
+- Re: Paper about ISO CBGB
+* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CBGB
||+* Re: Paper about ISO CMitchAlsup
|||+* Re: Paper about ISO CMitchAlsup
||||`* Re: Paper about ISO CBranimir Maksimovic
|||| `* Re: Paper about ISO CGeorge Neuner
||||  +- Re: Paper about ISO CBranimir Maksimovic
||||  `* Re: Paper about ISO CEricP
||||   `* Re: Paper about ISO CIvan Godard
||||    `* Re: Paper about ISO CEricP
||||     `* Re: Paper about ISO CMitchAlsup
||||      +* Re: Paper about ISO CBGB
||||      |`* Re: Paper about ISO CStephen Fuld
||||      | +* Re: Paper about ISO CIvan Godard
||||      | |+* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |||+- Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |||+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | ||||`- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |||`- Re: addressing and protection, was Paper about ISO CBill Findlay
||||      | ||`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | || +- Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | || `- Re: addressing and protection, was Paper about ISO CBranimir Maksimovic
||||      | |`* Re: addressing and protection, was Paper about ISO CEricP
||||      | | +* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | | |`- Re: addressing and protection, was Paper about ISO CEricP
||||      | | `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  || `* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  ||  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||  |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  ||  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  || `* Re: addressing and protection, was Paper about ISO CAnton Ertl
||||      | |  ||  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | +- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |`* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | +* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | | `* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |+* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |  ||+- Re: addressing and protection, was Paper about ISO CChris M. Thomasson
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |||`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  |||`* Re: addressing and protection, was Paper about ISO CEricP
||||      | |  | |  ||| `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  ||`- Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | |  |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |   `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |    +* Address space consumption (was: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |    |`- Re: Address space consumption (was: addressing and protection, wasMitchAlsup
||||      | |  | |    +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |    |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |    `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |     `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |      +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |      | `- Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      `* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |       +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       |`* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |`* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | | `* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO Cclamky
||||      | |  | |       | |   `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    |`* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | ||+* Re: educational computation, was addressing and protection, was Paper about ISO John Levine
||||      | |  | |       | |    | |||`* Re: educational computation, was addressing and protection, was PaperIvan Godard
||||      | |  | |       | |    | ||| `- Re: educational computation, was addressing and protection, was PaperTerje Mathisen
||||      | |  | |       | |    | ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | || `* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | ||  +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | ||  `- Re: addressing and protection, was Paper about ISO CDavid Brown
||||      | |  | |       | |    | |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | |+- Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | | |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | ||`- Re: addressing and protection, was Paper about ISO CJimBrakefield
||||      | |  | |       | |    | | | |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | | `* Re: addressing and protection, was Paper about ISO CTim Rentsch
||||      | |  | |       | |    | | | |  `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | | `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | `- Re: addressing and protection, was Paper about ISO CAnne & Lynn Wheeler
||||      | |  | |       | |    | `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    `* Re: what is cheap these days, addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       | `* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       +* RAM size (was: addressing and protection, was Paper about ISO C)Anton Ertl
||||      | |  | |       `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | `* Re: Paper about ISO CBGB
||||      `- Re: Paper about ISO CEricP
|||+* Re: Paper about ISO CBranimir Maksimovic
|||+* Re: Paper about ISO CThomas Koenig
|||+* Re: Paper about ISO Cantispam
|||`- Re: Paper about ISO CQuadibloc
||+* Re: Paper about ISO CThomas Koenig
||`* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CThomas Koenig
|`* Re: Paper about ISO CVictor Yodaiken
`* Re: Paper about ISO CKent Dickey

Pages:123456789101112131415161718192021222324252627282930313233
Re: Paper about ISO C

<sjpvdu$sod$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20782&group=comp.arch#20782

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Fri, 8 Oct 2021 12:33:47 -0500
Organization: A noiseless patient Spider
Lines: 403
Message-ID: <sjpvdu$sod$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me> <sjpasg$a6f$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Oct 2021 17:33:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f0ddb7ac7f1187fdac2f4cd61f20676a";
logging-data="29453"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kXftARFiF+586Ops4fayl"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:G+T3mmCSYR3q/hxVjKpwgKFCP58=
In-Reply-To: <sjpasg$a6f$1@dont-email.me>
Content-Language: en-US
 by: BGB - Fri, 8 Oct 2021 17:33 UTC

On 10/8/2021 6:43 AM, David Brown wrote:
> On 07/10/2021 22:47, BGB wrote:
>> On 10/7/2021 2:35 PM, David Brown wrote:
>>> On 07/10/2021 12:52, clamky@hotmail.com wrote:
>>>> Might strike a cord with Anton and/or Mich
>>>>
>>>> https://www.yodaiken.com/2021/10/06/plos-2021-paper-how-iso-c-became-unusable-for-operating-system-development/
>>>>
>>>>
>>>
>>> It seems to me that the authors have misunderstood the language entirely.
>>>
>>> C was never meant to be a "high-level assembler" or a "portable
>>> assembler".  It was never intended that you could write low-level
>>> systems programs in portable C.  It was designed to reduce the need to
>>> write code in assembler, and to improve the portability of code.
>>> (Re-read that sentence if you like.)  It was intended to be useable for
>>> writing some kinds of code in a highly portable manner, and also to be
>>> useful in non-portable systems code that depended strongly on the target
>>> and the compiler.
>>>
>>>  From day one, operating systems "written in C" contained assembly code,
>>> compiler extensions, and other non-portable code.  That remains true
>>> today.  "Coding tricks" were often used to get efficient results due to
>>> more limited compilers - these are much less common now as compilers
>>> optimise better.
>>>
>>>
>>> As I got further in the document, it seems to be just another "the
>>> compiler should do what I want it to do, not necessarily what I /told/
>>> it to do" rant.  "C today should work the way /I/ want it to do - the
>>> way /I/ interpret the precise wording of what someone decades ago".
>>> "Thompson and Ritchie were saints and prophets, and their words were
>>> holy and eternal - regardless of how computers, languages, and
>>> programming needs have changed since the inception of C".  "We were all
>>> happy and no bugs existed in code until gcc sinned by optimising code,
>>> and we were thrown out of Eden into a hell of undefined behaviour".
>>> "Yes, we know that compilers often give us ways to get the semantics we
>>> want by specific flags, but that's not good enough - everyone else
>>> should get slower code so that we don't have to think as much or follow
>>> the rules of the language".
>>>
>>
>> The author of the paper (Victor Yodaiken) has sort of a long history of
>> "making a mountain out of a molehill" about all this stuff...
>>
>
> It seems that way. Often there are some good points - as I wrote, no
> language or tool is perfect, and it's important that people find weak
> points or make suggestions for improvement. Massively exaggerated
> rants, however, are worse than useless - they encourage other fanatics
> who feed on the same myths, doom-saying and exaggerations. And they
> ensure that those who actually have a say in the tools and language -
> the standards committees and compiler developers - will ignore all their
> concerns and write them off as fanatics. Good points they raise get
> thrown out and ignored along with the reams of rubbish,
> misunderstandings and misrepresentations that hide them.
>

Pretty much.

>>
>> I have my opinions, but will note that "the system" is self-regulating
>> to some extent, as compiler people would have a hard-time keeping people
>> using their compilers if they set out to break large amounts of existing
>> "real world" code (and will tend to back down when they face sufficient
>> backlash).
>
> Agreed. Compiler writers have no interest in making tools that people
> don't want to use. If feedback suggests a new compiler version does not
> work the way people expect and want, then the compiler developers take
> that seriously - they discuss matters with the users, they change the
> behaviour of the tools, they add flags or options to give users more
> control of the behaviour. In particular, they aim to test out new
> changes during pre-release and beta test stages so that potential
> problems get handled sooner.
>
> A similar process applies to language standards - there are long periods
> of proposals, discussions, and voting before changes are made. Big
> compiler users (like Linux distributions, corporations such as IBM,
> Microsoft, Google), big compiler implementers, researchers, and anyone
> else who is interested can get involved and share their opinion.
>
> You are never going to please everyone all of the time. And you are
> never going to please the small but vocal community who object to
> everything and accuse compiler writers and/or language committees of all
> sorts of evil motives and conspiracies. But they do a solid job
> overall, which is why languages like C are still a good choice for a lot
> of tasks.
>

Generally, it is tradeoffs.

Some people want "fastest possible", others want "existing code still
works unmodified".

Stuff should ideally still work even when the coding practices are
"kinda crap" so long as there is at least "some sane behavior which can
reasonably be expected from this".

So, code which casts pointers all over the place, should generally still
work IMO.

Whereas, things like taking the address of a stack local variable and
trying to use it to access contents in another unrelated stack local, or
code which overruns one array to access contents in another array (which
is assumed to be adjacent in memory), is stuff that is sufficiently
broken that I make little attempt at making it work (ROTT was a pretty
big offender with this sort of thing; Duke Nukem 3D also looks like an
awful mess which I have not yet gotten around to trying to port over...).

>>
>> In cases where stuff has broken in more significant ways, it has usually
>> been fairly isolated (a particular build of a particular compiler),
>> rather than a long-term change to the status quo.
>>
>
> And usually a "significant break" is found during testing stages, rather
> than post release.
>

Yeah, presumably. For mainline GCC and Clang, I am mostly using the ones
that come from the main repository.

Checking:
gcc 4.8.4
clang 3.3

Hmm, it appears that WSL's main repository is roughly 8 years behind the
"state of the art". Similarly, these versions somewhat predate WSL itself.

Note that according to "apt", this does appear to be "up to date".

Then again, back when I was mostly using Cygwin, I think I remember it
staying with GCC 0.97 for a very long time.

Checking the GCC version for my RISC-V cross-compiler toolchain:
11.1.0

Well, this seems a little newer...

>>>
>>> Are there imperfections in C as a language standard?  Sure.  Show me a
>>> perfect language standard as an alternative.  Are there questionable
>>> judgements in some of the design decisions of C toolchains?  Sure -
>>> again, show me a perfect toolchain.  Is C not quite an exact fit for all
>>> your needs for writing an OS?  Sure.  It's a general purpose language
>>> that is good for a very wide range of uses - but it's unlikely to be
>>> /perfect/ for any given use-case.  And it never has been, and it never
>>> will be.  Nor will anything else.  Modern C is a vastly better language
>>> than the earliest K&R C.  Modern C toolchains are vastly better than the
>>> tools of that era.  As well as the hundred steps forward, there have no
>>> doubt been a dozen steps backwards for some people and some uses.
>>> That's life.  If you don't like it, give up programming and stick to a
>>> safer hobby.
>>>
>>
>>>
>>> (For the record, I don't think type-based alias analysis actually gives
>>> very significant optimisation opportunities in most code.  On the other
>>> hand, I also don't think it causes problems very often - not nearly as
>>> often as the "optimisation is evil" crowd seem to behave.  I write
>>> low-level code all the time, and it is extraordinarily rarely that I
>>> have to find a way around it.)
>>>
>>
>> Will agree on this point.
>>
>> In my own testing, basic caching while also aggressively invalidating
>> the cached results (on any explicit memory store), can give much of the
>> same performance benefit, while still being fairly conservative
>> semantically.
>>
>
> There is a move towards "providence tracking" for memory and pointers as
> an alternative to things like type-based alias analysis. This is a lot
> more powerful, as it tracks when different references to the same type
> cannot alias, and thus can give much more optimisation opportunities and
> static error analysis benefits. It subsumes most TBAA, since pointers
> to different types usually have different providences. But in cases
> where the providence is actually the same, aliases (or potential
> aliases) are handled correctly. However, it turns out to be quite
> difficult to specify all this, and it is a work in progress (both for
> language standards and implementations).
>


Click here to read the complete article
Re: Paper about ISO C

<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20785&group=comp.arch#20785

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:1e95:: with SMTP id c21mr13322312qtm.412.1633715130397;
Fri, 08 Oct 2021 10:45:30 -0700 (PDT)
X-Received: by 2002:a05:6808:1a11:: with SMTP id bk17mr9107536oib.0.1633715129504;
Fri, 08 Oct 2021 10:45:29 -0700 (PDT)
Path: rocksolid2!news.neodome.net!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 8 Oct 2021 10:45:29 -0700 (PDT)
In-Reply-To: <E0%7J.9319$7U3.7165@fx24.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:7cbe:94e8:31db:6e9f;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:7cbe:94e8:31db:6e9f
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com> <jlN7J.12573$fZ.8007@fx06.iad>
<c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com> <aTZ7J.138342$F26.9781@fx44.iad>
<sjprtg$259$1@dont-email.me> <E0%7J.9319$7U3.7165@fx24.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Fri, 08 Oct 2021 17:45:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: MitchAlsup - Fri, 8 Oct 2021 17:45 UTC

On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
> Ivan Godard wrote:

> >
> > Because, for most current systems, a kernel thread switch is thousands
> > of cycles.
<
> According to the HTML paper dated 2002 titled
> "An Implementation of Scheduler Activations on the NetBSD Operating System"
> in the section "Performance Analysis"
> a Linux 2.4.19 kernel thread context switch is 82 us,
> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
> and Scheduler Activations on NetBSD is 225 us.
<
2002 was about the time of the 1GHz processor.
82µs = 82,000 cycles.
<
Almost anyone would consider this "slow". I was at AMD at the time, and it
was about 1,000 cycles from the arrival of the interrupt to delivery of control
at the interrupt handler.
<
Apparently "dealing" with said interrupt causes several more context switches
and wandered around large memory footprint before delivering control to the
desired thread.
>
> I don't know what that 2002 version of Linux scheduler did but
> around that time they used a single Big Lock for many OS resources.
<
2002 was before many were using more than one core.
<
> Since then much of the locking has been made finer grain and scheduling
> in particular is separated for each core so no locking is required.
> So kernel thread context switch should be proportionally even faster.

Re: Paper about ISO C

<sjqfoo$9ef$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20793&group=comp.arch#20793

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Fri, 8 Oct 2021 17:12:37 -0500
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <sjqfoo$9ef$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Oct 2021 22:12:41 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="461dea162d0bfc5a54a9c7e2bac8f2e8";
logging-data="9679"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hjfGvEEaw0kGyj1AZJaOE"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:6VWodDv/Stw6pSsk5IHYM8sIHb0=
In-Reply-To: <2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
Content-Language: en-US
 by: BGB - Fri, 8 Oct 2021 22:12 UTC

On 10/8/2021 12:45 PM, MitchAlsup wrote:
> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>> Ivan Godard wrote:
>
>>>
>>> Because, for most current systems, a kernel thread switch is thousands
>>> of cycles.
> <
>> According to the HTML paper dated 2002 titled
>> "An Implementation of Scheduler Activations on the NetBSD Operating System"
>> in the section "Performance Analysis"
>> a Linux 2.4.19 kernel thread context switch is 82 us,
>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>> and Scheduler Activations on NetBSD is 225 us.
> <
> 2002 was about the time of the 1GHz processor.
> 82µs = 82,000 cycles.
> <
> Almost anyone would consider this "slow". I was at AMD at the time, and it
> was about 1,000 cycles from the arrival of the interrupt to delivery of control
> at the interrupt handler.
> <
> Apparently "dealing" with said interrupt causes several more context switches
> and wandered around large memory footprint before delivering control to the
> desired thread.

This sort of thing is part of why my "TestKern" effort is aiming to cram
everything into a single big address space.

Granted, this does have the (fairly obvious) property that most
traditional schemes for memory protection, ..., kinda go out the window
when one has multiple logical processes within the same address space
(as do the traditional distinctions between threads and processes).

This is also related to the design of my own "PBO" ABI, and why (if
using ELF) I would prefer FDPIC (even if FDPIC also kinda sucks from an
overhead POV, which is also part of why I went with a seriously hacked
PE/COFF with a custom ABI rather than just reusing FDPIC).

Well, I also debated whether or not to go full custom for the binaries,
but my own design attempts didn't really lead to anything which had much
obvious advantage over a hacked up and LZ compressed version of PE/COFF.

Well, and also when one omits the MZ header, PE/COFF itself mostly
reduces to a COFF variant (just with an extra FOURCC on the front). One
could arguably debate if my PEL4 format (PE/COFF-(MZ Stub)+(LZ4
Compression)) is even really PE/COFF anymore, or some other form of COFF
derived executable format.

Had already gone and partly added an ELF loader as well, but then
debated whether to also support loading LZ compressed ELF (reusing the
existing LZ compressor and checksum logic), but, GNU LD doesn't exactly
support this, and otherwise this would require feeding the ELF binaries
through a standalone tool to convert them into an LZ compressed form,
which doesn't really seem worth the added hassle.

>>
>> I don't know what that 2002 version of Linux scheduler did but
>> around that time they used a single Big Lock for many OS resources.
> <
> 2002 was before many were using more than one core.
> <
>> Since then much of the locking has been made finer grain and scheduling
>> in particular is separated for each core so no locking is required.
>> So kernel thread context switch should be proportionally even faster.

Re: Paper about ISO C

<1d3cc6b5-e61b-4f5b-a848-ae56730bd4dfn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20802&group=comp.arch#20802

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a0c:8c81:: with SMTP id p1mr13637104qvb.7.1633751742193;
Fri, 08 Oct 2021 20:55:42 -0700 (PDT)
X-Received: by 2002:aca:5f09:: with SMTP id t9mr10368696oib.157.1633751741963;
Fri, 08 Oct 2021 20:55:41 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Fri, 8 Oct 2021 20:55:41 -0700 (PDT)
In-Reply-To: <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:56a:fa3a:e00:e497:8a2c:b77e:fcf;
posting-account=1nOeKQkAAABD2jxp4Pzmx9Hx5g9miO8y
NNTP-Posting-Host: 2001:56a:fa3a:e00:e497:8a2c:b77e:fcf
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1d3cc6b5-e61b-4f5b-a848-ae56730bd4dfn@googlegroups.com>
Subject: Re: Paper about ISO C
From: jsav...@ecn.ab.ca (Quadibloc)
Injection-Date: Sat, 09 Oct 2021 03:55:42 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 45
 by: Quadibloc - Sat, 9 Oct 2021 03:55 UTC

On Thursday, October 7, 2021 at 6:46:28 PM UTC-6, MitchAlsup wrote:
> On Thursday, October 7, 2021 at 3:47:23 PM UTC-5, BGB wrote:

> > Whereas, say:
> > x=foo->bar->x;
> > y=foo->bar->y;
> > Becomes, effectively:
> > t0=foo->bar;
> > x=t0->x;
> > y=t0->y;

> In Operating System code; if one write the top 2 statements, one should
> get at least 4 loads--it is simply UNSAFE to assume otherwise--even
> if x happens to be allocated into a register (which may happen FAR after
> aliasing analysis is performed.)
>
> If the programmer KNOWS that there is no aliasing going on, the programmer
> should write the bottom set of code.

> If the programmer writes the top code and expects some kind of compiler
> flags (or magic) can translate it to the bottom--the programmer should be
> FIRED !

This is quite confusing to me.

It seems to me that both of those code samples should be
guaranteed to produce identical results, regardless of the
level of optimization selected.

It's
x=foo->bar->x;
*ptr = 3;
y=foo->bar->y;

where 'ptr' happens to have a... connection... with foo or bar
that might behave in the 'unexpected' way of not producing the
same result as

t0=foo->bar;
x=t0->x;
y=t0->y;
*ptr = 3;

Unless, of course, I'm missing something.

John Savard

Re: Paper about ISO C

<sjrckv$jdf$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20805&group=comp.arch#20805

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Fri, 8 Oct 2021 23:25:33 -0700
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <sjrckv$jdf$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Oct 2021 06:25:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e4a43d6528c5934cba93eb4d9ff306dc";
logging-data="19887"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/89IhaBeSHfy7kYZQNUvVd3Rj/tbXHz34="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.1.2
Cancel-Lock: sha1:xd7L27r/s37cKF11bL3cse6Whis=
In-Reply-To: <sjqfoo$9ef$1@dont-email.me>
Content-Language: en-US
 by: Stephen Fuld - Sat, 9 Oct 2021 06:25 UTC

On 10/8/2021 3:12 PM, BGB wrote:
> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>> Ivan Godard wrote:
>>
>>>>
>>>> Because, for most current systems, a kernel thread switch is thousands
>>>> of cycles.
>> <
>>> According to the HTML paper dated 2002 titled
>>> "An Implementation of Scheduler Activations on the NetBSD Operating
>>> System"
>>> in the section "Performance Analysis"
>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>> and Scheduler Activations on NetBSD is 225 us.
>> <
>> 2002 was about the time of the 1GHz processor.
>> 82µs = 82,000 cycles.
>> <
>> Almost anyone would consider this "slow". I was at AMD at the time,
>> and it
>> was about 1,000 cycles from the arrival of the interrupt to delivery
>> of control
>> at the interrupt handler.
>> <
>> Apparently "dealing" with said interrupt causes several more context
>> switches
>> and wandered around large memory footprint before delivering control
>> to the
>> desired thread.
>
> This sort of thing is part of why my "TestKern" effort is aiming to cram
> everything into a single big address space.

OK. This is generally called "Single Address Space". This is used by
such systems as the IBM System i, and the Mill.

> Granted, this does have the (fairly obvious) property that most
> traditional schemes for memory protection, ..., kinda go out the window
> when one has multiple logical processes within the same address space
> (as do the traditional distinctions between threads and processes).

Not necessarily. Just because multiple logical processes exist within
the same address space, doesn't mean that each process has legal access
to all the addresses within that space.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Paper about ISO C

<sjrgir$5v7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20806&group=comp.arch#20806

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 00:32:43 -0700
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <sjrgir$5v7$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Oct 2021 07:32:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ea1aae93142fe07d6d2b6bdc6d3ccb5c";
logging-data="6119"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qOOYsh+eDWTRnQ99xK17i"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:MbH/Q7d5NV1pxGeth3D1cjw98dY=
In-Reply-To: <sjrckv$jdf$1@dont-email.me>
Content-Language: en-US
 by: Ivan Godard - Sat, 9 Oct 2021 07:32 UTC

On 10/8/2021 11:25 PM, Stephen Fuld wrote:
> On 10/8/2021 3:12 PM, BGB wrote:
>> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>>> Ivan Godard wrote:
>>>
>>>>>
>>>>> Because, for most current systems, a kernel thread switch is thousands
>>>>> of cycles.
>>> <
>>>> According to the HTML paper dated 2002 titled
>>>> "An Implementation of Scheduler Activations on the NetBSD Operating
>>>> System"
>>>> in the section "Performance Analysis"
>>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>>> and Scheduler Activations on NetBSD is 225 us.
>>> <
>>> 2002 was about the time of the 1GHz processor.
>>> 82µs = 82,000 cycles.
>>> <
>>> Almost anyone would consider this "slow". I was at AMD at the time,
>>> and it
>>> was about 1,000 cycles from the arrival of the interrupt to delivery
>>> of control
>>> at the interrupt handler.
>>> <
>>> Apparently "dealing" with said interrupt causes several more context
>>> switches
>>> and wandered around large memory footprint before delivering control
>>> to the
>>> desired thread.
>>
>> This sort of thing is part of why my "TestKern" effort is aiming to
>> cram everything into a single big address space.
>
> OK.  This is generally called "Single Address Space".  This is used by
> such systems as the IBM System i, and the Mill.
>
>> Granted, this does have the (fairly obvious) property that most
>> traditional schemes for memory protection, ..., kinda go out the
>> window when one has multiple logical processes within the same address
>> space (as do the traditional distinctions between threads and processes).
>
> Not necessarily.  Just because multiple logical processes exist within
> the same address space, doesn't mean that each process has legal access
> to all the addresses within that space.

An address space tells you what you can name; a protection domain tells
you whether naming it does you any good.

Re: Paper about ISO C

<sjrhjd$d15$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20808&group=comp.arch#20808

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 02:50:02 -0500
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <sjrhjd$d15$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Oct 2021 07:50:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="461dea162d0bfc5a54a9c7e2bac8f2e8";
logging-data="13349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lnH40ttNDm8DUjZDNsnjs"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:CAeO0Ig16PtpP2u9uCpYyvqVjuw=
In-Reply-To: <sjrckv$jdf$1@dont-email.me>
Content-Language: en-US
 by: BGB - Sat, 9 Oct 2021 07:50 UTC

On 10/9/2021 1:25 AM, Stephen Fuld wrote:
> On 10/8/2021 3:12 PM, BGB wrote:
>> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>>> Ivan Godard wrote:
>>>
>>>>>
>>>>> Because, for most current systems, a kernel thread switch is thousands
>>>>> of cycles.
>>> <
>>>> According to the HTML paper dated 2002 titled
>>>> "An Implementation of Scheduler Activations on the NetBSD Operating
>>>> System"
>>>> in the section "Performance Analysis"
>>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>>> and Scheduler Activations on NetBSD is 225 us.
>>> <
>>> 2002 was about the time of the 1GHz processor.
>>> 82µs = 82,000 cycles.
>>> <
>>> Almost anyone would consider this "slow". I was at AMD at the time,
>>> and it
>>> was about 1,000 cycles from the arrival of the interrupt to delivery
>>> of control
>>> at the interrupt handler.
>>> <
>>> Apparently "dealing" with said interrupt causes several more context
>>> switches
>>> and wandered around large memory footprint before delivering control
>>> to the
>>> desired thread.
>>
>> This sort of thing is part of why my "TestKern" effort is aiming to
>> cram everything into a single big address space.
>
> OK.  This is generally called "Single Address Space".  This is used by
> such systems as the IBM System i, and the Mill.
>

Yeah.

>> Granted, this does have the (fairly obvious) property that most
>> traditional schemes for memory protection, ..., kinda go out the
>> window when one has multiple logical processes within the same address
>> space (as do the traditional distinctions between threads and processes).
>
> Not necessarily.  Just because multiple logical processes exist within
> the same address space, doesn't mean that each process has legal access
> to all the addresses within that space.
>

I was thinking of traditional schemes like "protection rings", ...

So, say, a protection ring scheme will be pretty ineffective at
protecting one program from another within a single address space.

I have my own scheme I am calling VUGID which can basically attach
UID/GID checks and/or ACLs to memory on a per-page basis (some of the
logic for dealing with this is basically integrated into the MMU/TLB).

Re: Paper about ISO C

<9e23mg1uk377av16575v343v97f128bbe6@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20816&group=comp.arch#20816

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: gneun...@comcast.net (George Neuner)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 09 Oct 2021 08:26:11 -0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me> <sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com> <hiN7J.53059$3p3.5024@fx16.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="a09f5ef5df5c867939669a0decf58901";
logging-data="18742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2bPbwJJ/Z19SQ7iwxE6Dqxktc+0UavBw="
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:PtAmMchJRuvDOZRb0Ge0HKsQNGs=
 by: George Neuner - Sat, 9 Oct 2021 12:26 UTC

On Fri, 08 Oct 2021 01:38:21 GMT, Branimir Maksimovic
<branimir.maksimovic@icloud.com> wrote:

>On 2021-10-08, MitchAlsup <MitchAlsup@aol.com> wrote:
>> On Thursday, October 7, 2021 at 3:47:23 PM UTC-5, BGB wrote:
>>> On 10/7/2021 2:35 PM, David Brown wrote:
>>> > On 07/10/2021 12:52, cla...@hotmail.com wrote:
>>> >> Might strike a cord with Anton and/or Mich
>>> >>
>>> >> https://www.yodaiken.com/2021/10/06/plos-2021-paper-how-iso-c-became-unusable-for-operating-system-development/
>>> >>
>>> >
>>>
>>> Under TBAA, the second "foo->x" may reuse the result of the first, but
>>> under more conservative semantics, the "*ptr=" would effectively
>>> invalidate the cached result regardless of the pointer type.
>>>
>>> Whereas, say:
>>> x=foo->bar->x;
>>> y=foo->bar->y;
>>> Becomes, effectively:
>>> t0=foo->bar;
>>> x=t0->x;
>>> y=t0->y;
>><
>> In Operating System code; if one write the top 2 statements, one should
>> get at least 4 loads--it is simply UNSAFE to assume otherwise--even
>> if x happens to be allocated into a register (which may happen FAR after
>> aliasing analysis is performed.)
>><
>> If the programmer KNOWS that there is no aliasing going on, the programmer
>> should write the bottom set of code.
>><
>> If the programmer writes the top code and expects some kind of compiler
>> flags (or magic) can translate it to the bottom--the programmer should be
>> FIRED !
>
>Isn't it that GC are always advertised as way to solve *cycling references*?

C is a hostile environment for most forms of GC.

Re: Paper about ISO C

<Gwh8J.222306$T_8.186929@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20818&group=comp.arch#20818

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad>
<9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 52
Message-ID: <Gwh8J.222306$T_8.186929@fx48.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sat, 09 Oct 2021 14:18:14 UTC
Organization: usenet-news.net
Date: Sat, 09 Oct 2021 14:18:14 GMT
X-Received-Bytes: 2756
 by: Branimir Maksimovic - Sat, 9 Oct 2021 14:18 UTC

On 2021-10-09, George Neuner <gneuner2@comcast.net> wrote:
> On Fri, 08 Oct 2021 01:38:21 GMT, Branimir Maksimovic
><branimir.maksimovic@icloud.com> wrote:
>
>>On 2021-10-08, MitchAlsup <MitchAlsup@aol.com> wrote:
>>> On Thursday, October 7, 2021 at 3:47:23 PM UTC-5, BGB wrote:
>>>> On 10/7/2021 2:35 PM, David Brown wrote:
>>>> > On 07/10/2021 12:52, cla...@hotmail.com wrote:
>>>> >> Might strike a cord with Anton and/or Mich
>>>> >>
>>>> >> https://www.yodaiken.com/2021/10/06/plos-2021-paper-how-iso-c-became-unusable-for-operating-system-development/
>>>> >>
>>>> >
>>>>
>>>> Under TBAA, the second "foo->x" may reuse the result of the first, but
>>>> under more conservative semantics, the "*ptr=" would effectively
>>>> invalidate the cached result regardless of the pointer type.
>>>>
>>>> Whereas, say:
>>>> x=foo->bar->x;
>>>> y=foo->bar->y;
>>>> Becomes, effectively:
>>>> t0=foo->bar;
>>>> x=t0->x;
>>>> y=t0->y;
>>><
>>> In Operating System code; if one write the top 2 statements, one should
>>> get at least 4 loads--it is simply UNSAFE to assume otherwise--even
>>> if x happens to be allocated into a register (which may happen FAR after
>>> aliasing analysis is performed.)
>>><
>>> If the programmer KNOWS that there is no aliasing going on, the programmer
>>> should write the bottom set of code.
>>><
>>> If the programmer writes the top code and expects some kind of compiler
>>> flags (or magic) can translate it to the bottom--the programmer should be
>>> FIRED !
>>
>>Isn't it that GC are always advertised as way to solve *cycling references*?
>
> C is a hostile environment for most forms of GC.
>

Only if you play with pointers. If you use tham wihtout masking. xoring
or shifting they can be scanned as such as Hans&Boehms GC does.
Only thing is that some number can be recognized as false positive :p

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<sjsai8$djl$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20820&group=comp.arch#20820

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 07:56:05 -0700
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <sjsai8$djl$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me>
<sjrhjd$d15$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Oct 2021 14:56:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e4a43d6528c5934cba93eb4d9ff306dc";
logging-data="13941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rfyzRc5h/k5Fsnux6jwNHllUXQLH2Guc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.1.2
Cancel-Lock: sha1:XnxwdCoWUEWWNYZAxcRGY/pDseo=
In-Reply-To: <sjrhjd$d15$1@dont-email.me>
Content-Language: en-US
 by: Stephen Fuld - Sat, 9 Oct 2021 14:56 UTC

On 10/9/2021 12:50 AM, BGB wrote:
> On 10/9/2021 1:25 AM, Stephen Fuld wrote:
>> On 10/8/2021 3:12 PM, BGB wrote:
>>> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>>>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>>>> Ivan Godard wrote:
>>>>
>>>>>>
>>>>>> Because, for most current systems, a kernel thread switch is
>>>>>> thousands
>>>>>> of cycles.
>>>> <
>>>>> According to the HTML paper dated 2002 titled
>>>>> "An Implementation of Scheduler Activations on the NetBSD Operating
>>>>> System"
>>>>> in the section "Performance Analysis"
>>>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>>>> and Scheduler Activations on NetBSD is 225 us.
>>>> <
>>>> 2002 was about the time of the 1GHz processor.
>>>> 82µs = 82,000 cycles.
>>>> <
>>>> Almost anyone would consider this "slow". I was at AMD at the time,
>>>> and it
>>>> was about 1,000 cycles from the arrival of the interrupt to delivery
>>>> of control
>>>> at the interrupt handler.
>>>> <
>>>> Apparently "dealing" with said interrupt causes several more context
>>>> switches
>>>> and wandered around large memory footprint before delivering control
>>>> to the
>>>> desired thread.
>>>
>>> This sort of thing is part of why my "TestKern" effort is aiming to
>>> cram everything into a single big address space.
>>
>> OK.  This is generally called "Single Address Space".  This is used by
>> such systems as the IBM System i, and the Mill.
>>
>
> Yeah.
>
>
>>> Granted, this does have the (fairly obvious) property that most
>>> traditional schemes for memory protection, ..., kinda go out the
>>> window when one has multiple logical processes within the same
>>> address space (as do the traditional distinctions between threads and
>>> processes).
>>
>> Not necessarily.  Just because multiple logical processes exist within
>> the same address space, doesn't mean that each process has legal
>> access to all the addresses within that space.
>>
>
> I was thinking of traditional schemes like "protection rings", ...
>
> So, say, a protection ring scheme will be pretty ineffective at
> protecting one program from another within a single address space.

Not necessarily. Most modern systems conflate two totally different
ideas into mechanism, so most people seem to think they are really the
same. As I van pointed out in his response, don't confuse knowing where
something is with what rights to access it you have.

You can watch Ivan's description of how the Mill separates the two
concepts on the Mill web site.

> I have my own scheme I am calling VUGID which can basically attach
> UID/GID checks and/or ACLs to memory on a per-page basis (some of the
> logic for dealing with this is basically integrated into the MMU/TLB).

See, you are conflating protection (UID/GID or ACL) with memory
placement (MMU/TLB). They don't have to be conflated.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Paper about ISO C

<r4i8J.27402$nh7.18@fx22.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20821&group=comp.arch#20821

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx22.iad.POSTED!not-for-mail
From: ThatWoul...@thevillage.com (EricP)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me> <sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com> <967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com> <jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com> <aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me> <E0%7J.9319$7U3.7165@fx24.iad> <2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
In-Reply-To: <2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 46
Message-ID: <r4i8J.27402$nh7.18@fx22.iad>
X-Complaints-To: abuse@UsenetServer.com
NNTP-Posting-Date: Sat, 09 Oct 2021 14:56:23 UTC
Date: Sat, 09 Oct 2021 10:55:58 -0400
X-Received-Bytes: 2980
 by: EricP - Sat, 9 Oct 2021 14:55 UTC

MitchAlsup wrote:
> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>> Ivan Godard wrote:
>
>>> Because, for most current systems, a kernel thread switch is thousands
>>> of cycles.
> <
>> According to the HTML paper dated 2002 titled
>> "An Implementation of Scheduler Activations on the NetBSD Operating System"
>> in the section "Performance Analysis"
>> a Linux 2.4.19 kernel thread context switch is 82 us,
>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>> and Scheduler Activations on NetBSD is 225 us.
> <
> 2002 was about the time of the 1GHz processor.
> 82µs = 82,000 cycles.
> <
> Almost anyone would consider this "slow". I was at AMD at the time, and it
> was about 1,000 cycles from the arrival of the interrupt to delivery of control
> at the interrupt handler.
> <
> Apparently "dealing" with said interrupt causes several more context switches
> and wandered around large memory footprint before delivering control to the
> desired thread.

Test platform was an Apple iBook, with a 500 MHz G3 processor with
256k of L2 cache.

Wikipedia says that G3 is a family of processors in the PowerPC 7xx
series and that it was the PowerPC 750 in this laptop.
It says the 740 was roughly equivalent to a Pentium II and the
750 added off-die L2 cache that "increased performance by
approximately 30% in most situations".

>> I don't know what that 2002 version of Linux scheduler did but
>> around that time they used a single Big Lock for many OS resources.
> <
> 2002 was before many were using more than one core.

Yes, PowerPC 750 was single core.

> <
>> Since then much of the locking has been made finer grain and scheduling
>> in particular is separated for each core so no locking is required.
>> So kernel thread context switch should be proportionally even faster.

Re: addressing and protection, was Paper about ISO C

<sjsppo$cpe$1@gal.iecc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20832&group=comp.arch#20832

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: addressing and protection, was Paper about ISO C
Date: Sat, 9 Oct 2021 19:16:08 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <sjsppo$cpe$1@gal.iecc.com>
References: <87fstdumxd.fsf@hotmail.com> <sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me> <sjrgir$5v7$1@dont-email.me>
Injection-Date: Sat, 9 Oct 2021 19:16:08 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="13102"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <87fstdumxd.fsf@hotmail.com> <sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me> <sjrgir$5v7$1@dont-email.me>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Sat, 9 Oct 2021 19:16 UTC

According to Ivan Godard <ivan@millcomputing.com>:
>>> Granted, this does have the (fairly obvious) property that most
>>> traditional schemes for memory protection, ..., kinda go out the
>>> window when one has multiple logical processes within the same address
>>> space (as do the traditional distinctions between threads and processes).
>>
>> Not necessarily.  Just because multiple logical processes exist within
>> the same address space, doesn't mean that each process has legal access
>> to all the addresses within that space.
>
>An address space tells you what you can name; a protection domain tells
>you whether naming it does you any good.

Quite right. Over fifty years ago S/360 put everything in one address space
and had a memory protection scheme so that programs couldn't stomp on (or in
some cases even look at) pages that weren't theirs.
--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: addressing and protection, was Paper about ISO C

<fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20833&group=comp.arch#20833

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a37:ae84:: with SMTP id x126mr8546360qke.334.1633808019880;
Sat, 09 Oct 2021 12:33:39 -0700 (PDT)
X-Received: by 2002:a05:6808:2191:: with SMTP id be17mr21814811oib.30.1633808019638;
Sat, 09 Oct 2021 12:33:39 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 9 Oct 2021 12:33:39 -0700 (PDT)
In-Reply-To: <sjsppo$cpe$1@gal.iecc.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:7421:2c4b:9077:9903;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:7421:2c4b:9077:9903
References: <87fstdumxd.fsf@hotmail.com> <sjqfoo$9ef$1@dont-email.me>
<sjrckv$jdf$1@dont-email.me> <sjrgir$5v7$1@dont-email.me> <sjsppo$cpe$1@gal.iecc.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Subject: Re: addressing and protection, was Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 09 Oct 2021 19:33:39 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: MitchAlsup - Sat, 9 Oct 2021 19:33 UTC

On Saturday, October 9, 2021 at 2:16:10 PM UTC-5, John Levine wrote:
> According to Ivan Godard <iv...@millcomputing.com>:
> >>> Granted, this does have the (fairly obvious) property that most
> >>> traditional schemes for memory protection, ..., kinda go out the
> >>> window when one has multiple logical processes within the same address
> >>> space (as do the traditional distinctions between threads and processes).
> >>
> >> Not necessarily. Just because multiple logical processes exist within
> >> the same address space, doesn't mean that each process has legal access
> >> to all the addresses within that space.
> >
> >An address space tells you what you can name; a protection domain tells
> >you whether naming it does you any good.
<
> Quite right. Over fifty years ago S/360 put everything in one address space
<
1963 (58+ YA) we got to see it.
<
> and had a memory protection scheme so that programs couldn't stomp on (or in
> some cases even look at) pages that weren't theirs.
<
Many others already had base and bounds.
<
Does anyone know if the Boroughs and ICL machines prevented applications
from creating their own descriptors ?
<
> --
> Regards,
> John Levine, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
> Please consider the environment before reading this e-mail. https://jl.ly

Re: Paper about ISO C

<j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20834&group=comp.arch#20834

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: gneun...@comcast.net (George Neuner)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 09 Oct 2021 15:35:26 -0400
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me> <sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com> <hiN7J.53059$3p3.5024@fx16.iad> <9e23mg1uk377av16575v343v97f128bbe6@4ax.com> <Gwh8J.222306$T_8.186929@fx48.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="a09f5ef5df5c867939669a0decf58901";
logging-data="5799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19n6jk30GYfSgo94TUrKbOj1Qd8DVuLXwM="
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:a4OBmqEVr6kIfEqCEjcSU2jUVpU=
 by: George Neuner - Sat, 9 Oct 2021 19:35 UTC

On Sat, 09 Oct 2021 14:18:14 GMT, Branimir Maksimovic
<branimir.maksimovic@icloud.com> wrote:

>On 2021-10-09, George Neuner <gneuner2@comcast.net> wrote:
>
>> C is a hostile environment for most forms of GC.
>
>Only if you play with pointers. If you use tham wihtout masking. xoring
>or shifting they can be scanned as such as Hans&Boehms GC does.
>Only thing is that some number can be recognized as false positive :p

Actually, the main problem with C - and similar "uncooperative"
languages - is that the compiler often "misplaces" pointers to heap
allocations.

Consider a function that heap allocates an object, manipulates it, and
deletes it: in this case any and all pointers to the object will exist
only on the call stack. It doesn't matter whether the function calls
other functions - it only matters whether collection may be triggered
while the heap allocated object is alive.

In the course of manipulating an object, compilers routinely "lose" or
"misplace" the original pointer to it, e.g., by walking the pointer
across an array, or by indexing from it and not keeping the original
value.
[When the compiler knows the size of the object or array element, it
can easily undo any indexing math to recover the original pointer
value. Thus no need to store the original value.]

If you step through such code with your debugger, you will discover
that, quite often, the /only/ pointer to some object is pointing into
the middle of the object, or in the case of an array it could be
pointing outside of the array bounds. Most importantly, there may be
/no/ easily identifiable heap pointer for GC to find.

This is "compilation pointer masking" and it greatly increases the
effort required to identify live heap objects: the GC has to be able
to recognize references to any location inside any allocated block.

Just guaranteeing that compilers never "lose" original pointers would
make C (and similar "uncooperative" languages) a lot more friendly to
GC.

YMMV,
George

Re: addressing and protection, was Paper about ISO C

<sjsr3b$fl5$1@gal.iecc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20835&group=comp.arch#20835

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: joh...@taugh.com (John Levine)
Newsgroups: comp.arch
Subject: Re: addressing and protection, was Paper about ISO C
Date: Sat, 9 Oct 2021 19:38:19 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <sjsr3b$fl5$1@gal.iecc.com>
References: <87fstdumxd.fsf@hotmail.com> <sjrgir$5v7$1@dont-email.me> <sjsppo$cpe$1@gal.iecc.com> <fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Injection-Date: Sat, 9 Oct 2021 19:38:19 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="16037"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <87fstdumxd.fsf@hotmail.com> <sjrgir$5v7$1@dont-email.me> <sjsppo$cpe$1@gal.iecc.com> <fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Sat, 9 Oct 2021 19:38 UTC

According to MitchAlsup <MitchAlsup@aol.com>:
>> >An address space tells you what you can name; a protection domain tells
>> >you whether naming it does you any good.
><
>> Quite right. Over fifty years ago S/360 put everything in one address space
><
>1963 (58+ YA) we got to see it.

>> and had a memory protection scheme so that programs couldn't stomp on (or in
>> some cases even look at) pages that weren't theirs.
><
>Many others already had base and bounds.

Right, but that's different. The PDP-6 had base and bounds so a program could only
address within the bounds, and the base provided dynamic relocation which S/360 didn't
have. On the 360 there was only one set of addresses but if you tried to fetch or store
into a block with the wrong protection key, it got a protection fault and your program
was generally killed.

>Does anyone know if the Boroughs and ICL machines prevented applications
>from creating their own descriptors ?

Burroughs certainly did. The protection scheme depended on compilers generating
secure code.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: addressing and protection, was Paper about ISO C

<sjst19$kf0$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20836&group=comp.arch#20836

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: addressing and protection, was Paper about ISO C
Date: Sat, 9 Oct 2021 13:11:20 -0700
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <sjst19$kf0$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjqfoo$9ef$1@dont-email.me>
<sjrckv$jdf$1@dont-email.me> <sjrgir$5v7$1@dont-email.me>
<sjsppo$cpe$1@gal.iecc.com>
<fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 9 Oct 2021 20:11:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ea1aae93142fe07d6d2b6bdc6d3ccb5c";
logging-data="20960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19w0btKzVYbzx0EH6YMWpiQ"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:ffpYE+0SyRbr1K0IzjxLn1C17C0=
In-Reply-To: <fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Content-Language: en-US
 by: Ivan Godard - Sat, 9 Oct 2021 20:11 UTC

On 10/9/2021 12:33 PM, MitchAlsup wrote:
> On Saturday, October 9, 2021 at 2:16:10 PM UTC-5, John Levine wrote:
>> According to Ivan Godard <iv...@millcomputing.com>:
>>>>> Granted, this does have the (fairly obvious) property that most
>>>>> traditional schemes for memory protection, ..., kinda go out the
>>>>> window when one has multiple logical processes within the same address
>>>>> space (as do the traditional distinctions between threads and processes).
>>>>
>>>> Not necessarily. Just because multiple logical processes exist within
>>>> the same address space, doesn't mean that each process has legal access
>>>> to all the addresses within that space.
>>>
>>> An address space tells you what you can name; a protection domain tells
>>> you whether naming it does you any good.
> <
>> Quite right. Over fifty years ago S/360 put everything in one address space
> <
> 1963 (58+ YA) we got to see it.
> <
>> and had a memory protection scheme so that programs couldn't stomp on (or in
>> some cases even look at) pages that weren't theirs.
> <
> Many others already had base and bounds.
> <
> Does anyone know if the Boroughs and ICL machines prevented applications
> from creating their own descriptors ?

The B5000 stream procedures did if you generated the code yourself; I
think so, anyway, it was before my time there. The B6500 secured the
compilers so it wasn't possible; the instruction to set the 3-bit tag
was only available from ESPOL, the OS flavor of Algol. Later on (after
my day) I think they realized that securing the compilers was
impractical and so the instruction was made privileged.

Re: Paper about ISO C

<9a019b14-481d-4ae9-a8ae-8f0c2d94bf57n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20839&group=comp.arch#20839

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:4e30:: with SMTP id d16mr6107396qtw.309.1633814902798;
Sat, 09 Oct 2021 14:28:22 -0700 (PDT)
X-Received: by 2002:a4a:4fcf:: with SMTP id c198mr13385107oob.26.1633814902528;
Sat, 09 Oct 2021 14:28:22 -0700 (PDT)
Path: rocksolid2!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 9 Oct 2021 14:28:22 -0700 (PDT)
In-Reply-To: <j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:7421:2c4b:9077:9903;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:7421:2c4b:9077:9903
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me> <ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad> <9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
<Gwh8J.222306$T_8.186929@fx48.iad> <j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a019b14-481d-4ae9-a8ae-8f0c2d94bf57n@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Sat, 09 Oct 2021 21:28:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3323
 by: MitchAlsup - Sat, 9 Oct 2021 21:28 UTC

On Saturday, October 9, 2021 at 2:35:29 PM UTC-5, George Neuner wrote:
> On Sat, 09 Oct 2021 14:18:14 GMT, Branimir Maksimovic
> <branimir....@icloud.com> wrote:
<snip>
> In the course of manipulating an object, compilers routinely "lose" or
> "misplace" the original pointer to it, e.g., by walking the pointer
> across an array, or by indexing from it and not keeping the original
> value.
> [When the compiler knows the size of the object or array element, it
> can easily undo any indexing math to recover the original pointer
> value. Thus no need to store the original value.]
>
> If you step through such code with your debugger, you will discover
> that, quite often, the /only/ pointer to some object is pointing into
> the middle of the object, or in the case of an array it could be
> pointing outside of the array bounds. Most importantly, there may be
> /no/ easily identifiable heap pointer for GC to find.
<
I consider not having convenient indexing forms for LD and ST
bad ISA design. My 66000 LD and ST instructions have such
indexing and in _most_ cases using indexing results in smaller
and faster code than when ++ing or --ing a pointer through an
array; often using fewer registers to boot.
>
> This is "compilation pointer masking" and it greatly increases the
> effort required to identify live heap objects: the GC has to be able
> to recognize references to any location inside any allocated block.
>
Question: in a 64-bit virtual address space, is there ever a reason that
the "heap" cannot live in a contiguous subsection of that space so
base and bounds could tell if the pointer should be considered for
GC (or not)?
>
> Just guaranteeing that compilers never "lose" original pointers would
> make C (and similar "uncooperative" languages) a lot more friendly to
> GC.
<
Banning ++ing and --ing would go a long way.........
>
>
> YMMV,
> George

Re: Paper about ISO C

<VCo8J.34131$dI3.21011@fx10.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20841&group=comp.arch#20841

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad>
<9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
<Gwh8J.222306$T_8.186929@fx48.iad>
<j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 65
Message-ID: <VCo8J.34131$dI3.21011@fx10.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sat, 09 Oct 2021 22:22:45 UTC
Organization: usenet-news.net
Date: Sat, 09 Oct 2021 22:22:45 GMT
X-Received-Bytes: 3426
 by: Branimir Maksimovic - Sat, 9 Oct 2021 22:22 UTC

On 2021-10-09, George Neuner <gneuner2@comcast.net> wrote:
> On Sat, 09 Oct 2021 14:18:14 GMT, Branimir Maksimovic
><branimir.maksimovic@icloud.com> wrote:
>
>>On 2021-10-09, George Neuner <gneuner2@comcast.net> wrote:
>>
>>> C is a hostile environment for most forms of GC.
>>
>>Only if you play with pointers. If you use tham wihtout masking. xoring
>>or shifting they can be scanned as such as Hans&Boehms GC does.
>>Only thing is that some number can be recognized as false positive :p
>
> Actually, the main problem with C - and similar "uncooperative"
> languages - is that the compiler often "misplaces" pointers to heap
> allocations.
>
> Consider a function that heap allocates an object, manipulates it, and
> deletes it: in this case any and all pointers to the object will exist
> only on the call stack. It doesn't matter whether the function calls
> other functions - it only matters whether collection may be triggered
> while the heap allocated object is alive.
>
> In the course of manipulating an object, compilers routinely "lose" or
> "misplace" the original pointer to it, e.g., by walking the pointer
> across an array, or by indexing from it and not keeping the original
> value.
> [When the compiler knows the size of the object or array element, it
> can easily undo any indexing math to recover the original pointer
> value. Thus no need to store the original value.]
>
> If you step through such code with your debugger, you will discover
> that, quite often, the /only/ pointer to some object is pointing into
> the middle of the object, or in the case of an array it could be
> pointing outside of the array bounds. Most importantly, there may be
> /no/ easily identifiable heap pointer for GC to find.

Boehm's collector scans heap/stack/bss, pointing anywhere within
allocated area, no problem with that.

>
> This is "compilation pointer masking" and it greatly increases the
> effort required to identify live heap objects: the GC has to be able
> to recognize references to any location inside any allocated block.
>
live is if pointer exists anywhere in accessible memory.

>
> Just guaranteeing that compilers never "lose" original pointers would
> make C (and similar "uncooperative" languages) a lot more friendly to
> GC.

Sure, but Boehm's collector works with C. With C++ there are problems
because of caching scheme in defualt allocator.

>
>
> YMMV,
> George
Greetings, Branimir.

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<sjt5bg$p47$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20842&group=comp.arch#20842

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 17:33:18 -0500
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <sjt5bg$p47$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad> <9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
<Gwh8J.222306$T_8.186929@fx48.iad>
<j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 9 Oct 2021 22:33:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4849fb37e647683af19c4c339cd968fb";
logging-data="25735"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FSm2p4KUPm6Rkm7cMB8WG"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:d7Af0ILXeQ0sGwCctSz9SABBINA=
In-Reply-To: <j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
Content-Language: en-US
 by: BGB - Sat, 9 Oct 2021 22:33 UTC

On 10/9/2021 2:35 PM, George Neuner wrote:
> On Sat, 09 Oct 2021 14:18:14 GMT, Branimir Maksimovic
> <branimir.maksimovic@icloud.com> wrote:
>
>> On 2021-10-09, George Neuner <gneuner2@comcast.net> wrote:
>>
>>> C is a hostile environment for most forms of GC.
>>
>> Only if you play with pointers. If you use tham wihtout masking. xoring
>> or shifting they can be scanned as such as Hans&Boehms GC does.
>> Only thing is that some number can be recognized as false positive :p
>
> Actually, the main problem with C - and similar "uncooperative"
> languages - is that the compiler often "misplaces" pointers to heap
> allocations.
>
> Consider a function that heap allocates an object, manipulates it, and
> deletes it: in this case any and all pointers to the object will exist
> only on the call stack. It doesn't matter whether the function calls
> other functions - it only matters whether collection may be triggered
> while the heap allocated object is alive.
>
> In the course of manipulating an object, compilers routinely "lose" or
> "misplace" the original pointer to it, e.g., by walking the pointer
> across an array, or by indexing from it and not keeping the original
> value.
> [When the compiler knows the size of the object or array element, it
> can easily undo any indexing math to recover the original pointer
> value. Thus no need to store the original value.]
>
> If you step through such code with your debugger, you will discover
> that, quite often, the /only/ pointer to some object is pointing into
> the middle of the object, or in the case of an array it could be
> pointing outside of the array bounds. Most importantly, there may be
> /no/ easily identifiable heap pointer for GC to find.
>
> This is "compilation pointer masking" and it greatly increases the
> effort required to identify live heap objects: the GC has to be able
> to recognize references to any location inside any allocated block.
>
>
> Just guaranteeing that compilers never "lose" original pointers would
> make C (and similar "uncooperative" languages) a lot more friendly to
> GC.
>

Some of this can be helped by requiring the compiler to keep a lot of
metadata around for anything which may be relevant to the garbage
collector (where to find root pointers, structure layout metadata, ...).

With some compiler assistance and minor restrictions on coding
practices, one could even go as far as to use a precise garbage collector.

This could either be done via explicit language extensions, or by
semantic trickery and silently "pinning" allocations when they go
outside the scope of what the GC can keep track of.

Say, for example, if someone has:
typedef struct foo_s foo_t;
struct foo_s { ... };
...
foo_t *pfoo;
pfoo=malloc(sizeof(foo_t));

And, the compiler keeps track of:
The layout of foo_s;
The relative location of pfoo;
...
And, then infers that 'pfoo' points to an instance of the same struct
(it could infer this at the scope of the 'malloc' call, ...).

Then, a GC could likely be made pretty workable.

Whether or not using a garbage collector is a worthwhile tradeoff is
another matter.

Re: addressing and protection, was Paper about ISO C

<0001HW.27126613011E32C570000203238F@news.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20843&group=comp.arch#20843

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: findlayb...@blueyonder.co.uk (Bill Findlay)
Newsgroups: comp.arch
Subject: Re: addressing and protection, was Paper about ISO C
Date: Sun, 10 Oct 2021 01:06:43 +0100
Organization: none
Lines: 38
Message-ID: <0001HW.27126613011E32C570000203238F@news.individual.net>
References: <87fstdumxd.fsf@hotmail.com> <sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me> <sjrgir$5v7$1@dont-email.me> <sjsppo$cpe$1@gal.iecc.com> <fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>
Reply-To: findlaybill@blueyonder.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 2a50jNNIv/RNquD09CNZoQvw8XEJHofrcmzCq/LBcGD8s+OJOu
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:PIz0Gbu6wIFevyWpbjHjHCsTwso=
User-Agent: Hogwasher/5.24
 by: Bill Findlay - Sun, 10 Oct 2021 00:06 UTC

On 9 Oct 2021, MitchAlsup wrote
(in article<fbb80b3a-bf7a-44aa-863c-17f44bdf2eb0n@googlegroups.com>):

> On Saturday, October 9, 2021 at 2:16:10 PM UTC-5, John Levine wrote:
> > According to Ivan Godard<iv...@millcomputing.com>:
> > > > > Granted, this does have the (fairly obvious) property that most
> > > > > traditional schemes for memory protection, ..., kinda go out the
> > > > > window when one has multiple logical processes within the same address
> > > > > space (as do the traditional distinctions between threads and processes).
> > > >
> > > > Not necessarily. Just because multiple logical processes exist within
> > > > the same address space, doesn't mean that each process has legal access
> > > > to all the addresses within that space.
> > >
> > > An address space tells you what you can name; a protection domain tells
> > > you whether naming it does you any good.
> <
> > Quite right. Over fifty years ago S/360 put everything in one address space
> <
> 1963 (58+ YA) we got to see it.
> <
> > and had a memory protection scheme so that programs couldn't stomp on (or in
> > some cases even look at) pages that weren't theirs.
> <
> Many others already had base and bounds.
> <
> Does anyone know if the Boroughs and ICL machines prevented applications
> from creating their own descriptors ?

The ICL 2900 used descriptor solely for describing structured data.
They played no role in the protection system, which used nested rings
in a manner very similar to Multics. So processes could and did
(and had to, in some cases) manufacture their own descriptors.

--
Bill Findlay

Re: Paper about ISO C

<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20844&group=comp.arch#20844

  copy link   Newsgroups: comp.arch
X-Received: by 2002:a05:620a:4044:: with SMTP id i4mr7799523qko.301.1633827761830;
Sat, 09 Oct 2021 18:02:41 -0700 (PDT)
X-Received: by 2002:aca:5b56:: with SMTP id p83mr13890019oib.119.1633827761600;
Sat, 09 Oct 2021 18:02:41 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Sat, 9 Oct 2021 18:02:41 -0700 (PDT)
In-Reply-To: <sjni60$97d$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=24.173.181.154; posting-account=jn4_9AoAAADlg7v8KtkkjWBduIrvz8VB
NNTP-Posting-Host: 24.173.181.154
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
Subject: Re: Paper about ISO C
From: victor.y...@gmail.com (Victor Yodaiken)
Injection-Date: Sun, 10 Oct 2021 01:02:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 21
 by: Victor Yodaiken - Sun, 10 Oct 2021 01:02 UTC

On Thursday, October 7, 2021 at 2:35:29 PM UTC-5, David Brown wrote:

> As I got further in the document, it seems to be just another "the
> compiler should do what I want it to do, not necessarily what I /told/
> it to do" rant. "C today should work the way /I/ want it to do - the
> way /I/ interpret the precise wording of what someone decades ago".
> "Thompson and Ritchie were saints and prophets, and their words were
> holy and eternal - regardless of how computers, languages, and
> programming needs have changed since the inception of C". "We were all
> happy and no bugs existed in code until gcc sinned by optimising code,
> and we were thrown out of Eden into a hell of undefined behaviour".
> "Yes, we know that compilers often give us ways to get the semantics we
> want by specific flags, but that's not good enough - everyone else
> should get slower code so that we don't have to think as much or follow
> the rules of the language".

Of course the paper doesn't make an argument anything like that nor does it make the assembler claims
you start with. It is hard to believe anyone could read the
paper and get such a weird take from it.

Re: Paper about ISO C

<1btuhpfyoo.fsf@pfeifferfamily.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20845&group=comp.arch#20845

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pfeif...@cs.nmsu.edu (Joe Pfeiffer)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 09 Oct 2021 19:36:39 -0600
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <1btuhpfyoo.fsf@pfeifferfamily.net>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<sjomcf$9nv$2@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="fa774d06c31090bed570825265ca3a69";
logging-data="5540"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oxNX32sXqUOhTuK0BS+qlFjYw6u9FSAE="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:w514C1tHzif7iZaljoqQ5CK0Os0=
sha1:k8fiaCQXcTrS0VBzoSA7eCykZgY=
 by: Joe Pfeiffer - Sun, 10 Oct 2021 01:36 UTC

Thomas Koenig <tkoenig@netcologne.de> writes:

> MitchAlsup <MitchAlsup@aol.com> schrieb:
>
>> It is much like handling fiearms::
>><
>> 1) all pointers are loaded at all times unless verified they are not.
>> 2) never point a pointer at something you do not want destroyed.
>> 3) never enable a pointer until your sights are on the target
>><
>> 4) There is NO SUCH THING as a casual pointer.
>
> I _love_ that.

Number 2 is particularly awesome.
Mind if I put it on Facebook (with attribution, of course)?

Re: Paper about ISO C

<sjtgpq$l2r$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20846&group=comp.arch#20846

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: cr88...@gmail.com (BGB)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 20:48:40 -0500
Organization: A noiseless patient Spider
Lines: 137
Message-ID: <sjtgpq$l2r$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me>
<sjrhjd$d15$1@dont-email.me> <sjsai8$djl$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 10 Oct 2021 01:48:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4849fb37e647683af19c4c339cd968fb";
logging-data="21595"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wgTLlE2gDf2pLbDTYU6TS"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:tNtqAR5is0i8HqHE+IrVzT0pU/U=
In-Reply-To: <sjsai8$djl$1@dont-email.me>
Content-Language: en-US
 by: BGB - Sun, 10 Oct 2021 01:48 UTC

On 10/9/2021 9:56 AM, Stephen Fuld wrote:
> On 10/9/2021 12:50 AM, BGB wrote:
>> On 10/9/2021 1:25 AM, Stephen Fuld wrote:
>>> On 10/8/2021 3:12 PM, BGB wrote:
>>>> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>>>>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>>>>> Ivan Godard wrote:
>>>>>
>>>>>>>
>>>>>>> Because, for most current systems, a kernel thread switch is
>>>>>>> thousands
>>>>>>> of cycles.
>>>>> <
>>>>>> According to the HTML paper dated 2002 titled
>>>>>> "An Implementation of Scheduler Activations on the NetBSD
>>>>>> Operating System"
>>>>>> in the section "Performance Analysis"
>>>>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>>>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>>>>> and Scheduler Activations on NetBSD is 225 us.
>>>>> <
>>>>> 2002 was about the time of the 1GHz processor.
>>>>> 82µs = 82,000 cycles.
>>>>> <
>>>>> Almost anyone would consider this "slow". I was at AMD at the time,
>>>>> and it
>>>>> was about 1,000 cycles from the arrival of the interrupt to
>>>>> delivery of control
>>>>> at the interrupt handler.
>>>>> <
>>>>> Apparently "dealing" with said interrupt causes several more
>>>>> context switches
>>>>> and wandered around large memory footprint before delivering
>>>>> control to the
>>>>> desired thread.
>>>>
>>>> This sort of thing is part of why my "TestKern" effort is aiming to
>>>> cram everything into a single big address space.
>>>
>>> OK.  This is generally called "Single Address Space".  This is used
>>> by such systems as the IBM System i, and the Mill.
>>>
>>
>> Yeah.
>>
>>
>>>> Granted, this does have the (fairly obvious) property that most
>>>> traditional schemes for memory protection, ..., kinda go out the
>>>> window when one has multiple logical processes within the same
>>>> address space (as do the traditional distinctions between threads
>>>> and processes).
>>>
>>> Not necessarily.  Just because multiple logical processes exist
>>> within the same address space, doesn't mean that each process has
>>> legal access to all the addresses within that space.
>>>
>>
>> I was thinking of traditional schemes like "protection rings", ...
>>
>> So, say, a protection ring scheme will be pretty ineffective at
>> protecting one program from another within a single address space.
>
> Not necessarily.  Most modern systems conflate two totally different
> ideas into mechanism, so most people seem to think they are really the
> same.  As I van pointed out in his response, don't confuse knowing where
> something is with what rights to access it you have.
>
> You can watch Ivan's description of how the Mill separates the two
> concepts on the Mill web site.
>

IIRC, Mill was using a capability architecture or something?...

In my stuff, I am (for now) using a linear 48 bit address space.

I had considered some ideas for how to expand it to 96 bits, but have
not actually implemented anything in this direction yet.

There are two current sub-possibilities here:
Direct 96 bit linear space, 96 bit virtual address in TLBE (expanded to
256 bits).

Two-part remapping, which matches the high portion and low portion
separately, and then using a check value to verify that the high and low
parts of the lookup agree with each other.

The two part scheme would support both 48b and 96b addressing with the
existing TLBE format, but could be a little cheaper to implement
relative to a 1:1 (as it avoids needing to expand the TLBEs), but could
have other potential costs.

Apart from when using explicit 128-bit pointers, the addressing would
also behave more like an x86-style segmented addressing scheme (there
could be PC_HI and GBR_HI regs which would behave sort of like CS and
DS); with modular addressing at the 256TB / 0.25PB boundary.

One issue with such an address space is that it is sufficiently large as
to run out of SI prefixes to express its size directly; though one
possible workaround would be switching to using a petabyte as a
base-unit (eg: "quad", *1), at which point the address space size could
be expressed as (64 petaquad). Other options would be either to make the
table longer, or glue prefixes together (kilopetabyte), at which I guess
it becomes a question of "what is less awful".

*1: Yes, I am ripping this off of Star Trek.

For now though, there are no immediate plans to implement this.

>
>> I have my own scheme I am calling VUGID which can basically attach
>> UID/GID checks and/or ACLs to memory on a per-page basis (some of the
>> logic for dealing with this is basically integrated into the MMU/TLB).
>
> See, you are conflating protection (UID/GID or ACL) with memory
> placement (MMU/TLB).  They don't have to be conflated.
>

OK. Conflating them makes the most sense for the MMU though.

Other than the funky protection scheme, the MMU is fairly similar to a
more traditional design. Well, apart from using a software-managed TLB.

However, the only real alternative to software TLB, is having a
page-walker in hardware. However, this part seems relatively expensive,
and it seems easier to throw an exception here and let the ISR handle it
(with special instructions for things like adding TLE entries into the
TLB, etc).

....

Re: Paper about ISO C

<jwvh7dpil4b.fsf-monnier+comp.arch@gnu.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20847&group=comp.arch#20847

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: monn...@iro.umontreal.ca (Stefan Monnier)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sun, 10 Oct 2021 00:03:52 -0400
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <jwvh7dpil4b.fsf-monnier+comp.arch@gnu.org>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<hiN7J.53059$3p3.5024@fx16.iad>
<9e23mg1uk377av16575v343v97f128bbe6@4ax.com>
<Gwh8J.222306$T_8.186929@fx48.iad>
<j6i3mg16rc2f6d99n7u64cmebnvq02d407@4ax.com>
<VCo8J.34131$dI3.21011@fx10.iad>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="5160572feb27533cbc117055d72d98db";
logging-data="8208"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tqSkqIT4JKN/qcrJbXeum"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cancel-Lock: sha1:vmqQY3ulu69t2XvvKCnAx0qgPT8=
sha1:yT17k11ygYSSJ/Mzzaxq+UhOlVc=
 by: Stefan Monnier - Sun, 10 Oct 2021 04:03 UTC

> Boehm's collector scans heap/stack/bss, pointing anywhere within
> allocated area, no problem with that.

"No problem" is debatable. I could agree to "solved problem", but "no
problem" is really pushing it. Even "solved problem" is only true if
you don't care about the costs of solving that problem (can be extra
runtime costs, additional false positives, ...).

Stefan

Re: Paper about ISO C

<sjtr82$riu$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=20848&group=comp.arch#20848

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: iva...@millcomputing.com (Ivan Godard)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Sat, 9 Oct 2021 21:46:57 -0700
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <sjtr82$riu$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<sjnmcp$630$1@dont-email.me>
<ca22ba8c-2f32-4999-a2d0-edde18d97a24n@googlegroups.com>
<967daf46-d627-4db5-9e5f-0584ac00a539n@googlegroups.com>
<jlN7J.12573$fZ.8007@fx06.iad> <c0nvlg9c4v1u2m4t9601rb02u7i6g1b3pg@4ax.com>
<aTZ7J.138342$F26.9781@fx44.iad> <sjprtg$259$1@dont-email.me>
<E0%7J.9319$7U3.7165@fx24.iad>
<2aab69d6-197a-4c3d-ba4c-0ac9c84a51fen@googlegroups.com>
<sjqfoo$9ef$1@dont-email.me> <sjrckv$jdf$1@dont-email.me>
<sjrhjd$d15$1@dont-email.me> <sjsai8$djl$1@dont-email.me>
<sjtgpq$l2r$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 10 Oct 2021 04:46:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0a7eabdc837b4f04956294afc75ac93a";
logging-data="28254"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ts7T0Dns52V/I1+ez/6mT"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Cancel-Lock: sha1:2t5MgeVInV8wWEYTXhhMN5fPmbw=
In-Reply-To: <sjtgpq$l2r$1@dont-email.me>
Content-Language: en-US
 by: Ivan Godard - Sun, 10 Oct 2021 04:46 UTC

On 10/9/2021 6:48 PM, BGB wrote:
> On 10/9/2021 9:56 AM, Stephen Fuld wrote:
>> On 10/9/2021 12:50 AM, BGB wrote:
>>> On 10/9/2021 1:25 AM, Stephen Fuld wrote:
>>>> On 10/8/2021 3:12 PM, BGB wrote:
>>>>> On 10/8/2021 12:45 PM, MitchAlsup wrote:
>>>>>> On Friday, October 8, 2021 at 12:15:18 PM UTC-5, EricP wrote:
>>>>>>> Ivan Godard wrote:
>>>>>>
>>>>>>>>
>>>>>>>> Because, for most current systems, a kernel thread switch is
>>>>>>>> thousands
>>>>>>>> of cycles.
>>>>>> <
>>>>>>> According to the HTML paper dated 2002 titled
>>>>>>> "An Implementation of Scheduler Activations on the NetBSD
>>>>>>> Operating System"
>>>>>>> in the section "Performance Analysis"
>>>>>>> a Linux 2.4.19 kernel thread context switch is 82 us,
>>>>>>> GNU PTH Portable Threads user mode library on NetBSD is 166 us,
>>>>>>> and Scheduler Activations on NetBSD is 225 us.
>>>>>> <
>>>>>> 2002 was about the time of the 1GHz processor.
>>>>>> 82µs = 82,000 cycles.
>>>>>> <
>>>>>> Almost anyone would consider this "slow". I was at AMD at the
>>>>>> time, and it
>>>>>> was about 1,000 cycles from the arrival of the interrupt to
>>>>>> delivery of control
>>>>>> at the interrupt handler.
>>>>>> <
>>>>>> Apparently "dealing" with said interrupt causes several more
>>>>>> context switches
>>>>>> and wandered around large memory footprint before delivering
>>>>>> control to the
>>>>>> desired thread.
>>>>>
>>>>> This sort of thing is part of why my "TestKern" effort is aiming to
>>>>> cram everything into a single big address space.
>>>>
>>>> OK.  This is generally called "Single Address Space".  This is used
>>>> by such systems as the IBM System i, and the Mill.
>>>>
>>>
>>> Yeah.
>>>
>>>
>>>>> Granted, this does have the (fairly obvious) property that most
>>>>> traditional schemes for memory protection, ..., kinda go out the
>>>>> window when one has multiple logical processes within the same
>>>>> address space (as do the traditional distinctions between threads
>>>>> and processes).
>>>>
>>>> Not necessarily.  Just because multiple logical processes exist
>>>> within the same address space, doesn't mean that each process has
>>>> legal access to all the addresses within that space.
>>>>
>>>
>>> I was thinking of traditional schemes like "protection rings", ...
>>>
>>> So, say, a protection ring scheme will be pretty ineffective at
>>> protecting one program from another within a single address space.
>>
>> Not necessarily.  Most modern systems conflate two totally different
>> ideas into mechanism, so most people seem to think they are really the
>> same.  As I van pointed out in his response, don't confuse knowing
>> where something is with what rights to access it you have.
>>
>> You can watch Ivan's description of how the Mill separates the two
>> concepts on the Mill web site.
>>
>
> IIRC, Mill was using a capability architecture or something?...

I wish! But no, it's grant based, because fat pointers are not viable in
the market IMO.

Pages:123456789101112131415161718192021222324252627282930313233
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor