Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The meek shall inherit the earth; the rest of us will go to the stars.


computers / comp.os.vms / Re: KP threads

SubjectAuthor
* KP threadsArne Vajhøj
+* Re: KP threadsDavid Jones
|`- Re: KP threadsArne Vajhøj
+- Re: KP threadsDavid Jones
+* Re: KP threadsStephen Hoffman
|`- Re: KP threadsArne Vajhøj
`- Re: KP threadsArne Vajhøj

1
KP threads

<61c49505$0$702$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19560&group=comp.os.vms#19560

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 23 Dec 2021 10:25:54 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Newsgroups: comp.os.vms
Content-Language: en-US
From: arn...@vajhoej.dk (Arne Vajhøj)
Subject: KP threads
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 21
Message-ID: <61c49505$0$702$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 5da251f5.news.sunsite.dk
X-Trace: 1640273157 news.sunsite.dk 702 arne@vajhoej.dk/68.9.63.232:53937
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Thu, 23 Dec 2021 15:25 UTC

They have been mentioned a few times, so I decided to take a look.

And I am puzzled.

Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
about starting a bunch of independent threads that does some work
in parallel.

But when I look at EXE$KP_START, EXE$KP_STALL_GENERAL, EXE$KP_RESTART
and EXE$KP_END then I do not see such capability.

Instead it is easy to see how to do coroutines with two streams
of execution but only one executing at a time transferring control
forth and back between the two streams (pretty similar to Modula-2
ISO COROUTINES TRANSFER).

What am I missing?

Arne

Re: KP threads

<d9cd8e30-3fd0-4bcd-bb3a-93e14cc4f350n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19573&group=comp.os.vms#19573

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:5ca:: with SMTP id d10mr3058255qtb.600.1640289902601;
Thu, 23 Dec 2021 12:05:02 -0800 (PST)
X-Received: by 2002:a05:620a:371b:: with SMTP id de27mr2620346qkb.68.1640289902445;
Thu, 23 Dec 2021 12:05:02 -0800 (PST)
Path: i2pn2.org!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.os.vms
Date: Thu, 23 Dec 2021 12:05:02 -0800 (PST)
In-Reply-To: <61c49505$0$702$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=74.140.8.188; posting-account=CO-_tAoAAACjjs2KLAw3xVKCy6Z_J3VK
NNTP-Posting-Host: 74.140.8.188
References: <61c49505$0$702$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d9cd8e30-3fd0-4bcd-bb3a-93e14cc4f350n@googlegroups.com>
Subject: Re: KP threads
From: osuvma...@gmail.com (David Jones)
Injection-Date: Thu, 23 Dec 2021 20:05:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 19
 by: David Jones - Thu, 23 Dec 2021 20:05 UTC

On Thursday, December 23, 2021 at 10:26:00 AM UTC-5, Arne Vajhøj wrote:
> Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
> about starting a bunch of independent threads that does some work
> in parallel.
>
> But when I look at EXE$KP_START, EXE$KP_STALL_GENERAL, EXE$KP_RESTART
> and EXE$KP_END then I do not see such capability.
>
> Instead it is easy to see how to do coroutines with two streams
> of execution but only one executing at a time transferring control
> forth and back between the two streams (pretty similar to Modula-2
> ISO COROUTINES TRANSFER).
>

Kernel processes are system context threads provided to give device drivers
that need them a private stack. That they look like coroutines fits in with the
rest of I/O request processing.

Re: KP threads

<c262be99-9dd5-4bf6-9bd5-c029612aea24n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19575&group=comp.os.vms#19575

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7d47:: with SMTP id h7mr3231997qtb.486.1640291680799;
Thu, 23 Dec 2021 12:34:40 -0800 (PST)
X-Received: by 2002:a05:6214:f6a:: with SMTP id iy10mr3041947qvb.95.1640291680690;
Thu, 23 Dec 2021 12:34:40 -0800 (PST)
Path: i2pn2.org!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.os.vms
Date: Thu, 23 Dec 2021 12:34:40 -0800 (PST)
In-Reply-To: <memo.20211223201439.2376L@jgd.cix.co.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=74.140.8.188; posting-account=CO-_tAoAAACjjs2KLAw3xVKCy6Z_J3VK
NNTP-Posting-Host: 74.140.8.188
References: <61c49505$0$702$14726298@news.sunsite.dk> <memo.20211223201439.2376L@jgd.cix.co.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c262be99-9dd5-4bf6-9bd5-c029612aea24n@googlegroups.com>
Subject: Re: KP threads
From: osuvma...@gmail.com (David Jones)
Injection-Date: Thu, 23 Dec 2021 20:34:40 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: David Jones - Thu, 23 Dec 2021 20:34 UTC

On Thursday, December 23, 2021 at 3:14:42 PM UTC-5, John Dallman wrote:
> I agree. The KP_ routines seem, looking at the explanation in Appendix C
> of "Porting Applications from Alpha to IA64," to have been created to let
> applications' internal coroutine systems work on IA-64. The hardware
> stack implementation on that architecture is a lot more complicated than
> VAX, or Alpha, or x86-64. It's fairly transparent if you use the stack
> simplistically, but it isn't really designed for DIY coroutines, or other
> clever trickery.
>

The origin of the Kernel Process Services goes back to 1990. That VEST-specific
areas are part of the parameter block leads me to think that was the original
motivation, plus the growing intricacies of things like the SCSI class driver.

Re: KP threads

<sq2nvm$68e$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19576&group=comp.os.vms#19576

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: KP threads
Date: Thu, 23 Dec 2021 15:59:34 -0500
Organization: HoffmanLabs LLC
Lines: 20
Message-ID: <sq2nvm$68e$1@dont-email.me>
References: <61c49505$0$702$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="91f2c7d29ee14aa2a229a82fb904b83c";
logging-data="6414"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NDibOqgXJ4tPR/wvmNCPzbvSgPI38Yug="
User-Agent: Unison/2.2
Cancel-Lock: sha1:25b6damuaT4bOJlZAmsnUdLPfMM=
 by: Stephen Hoffman - Thu, 23 Dec 2021 20:59 UTC

On 2021-12-23 15:25:54 +0000, Arne Vajhj said:

> They have been mentioned a few times, so I decided to take a look.
>
> And I am puzzled.
>
> Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
> about starting a bunch of independent threads that does some work in
> parallel.

Since the canonical website for this material vaporized years ago,
here's a mirror containing a technical overview:

http://zx.net.nz/mirror/h71000.www7.hp.com/openvms/integrity/OpenVMS-KP-Services.pdf

--
Pure Personal Opinion | HoffmanLabs LLC

Re: KP threads

<61c5278c$0$692$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19579&group=comp.os.vms#19579

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 23 Dec 2021 20:51:06 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Subject: Re: KP threads
Content-Language: en-US
Newsgroups: comp.os.vms
References: <61c49505$0$702$14726298@news.sunsite.dk>
<sq2nvm$68e$1@dont-email.me>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <sq2nvm$68e$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 20
Message-ID: <61c5278c$0$692$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7b81b20a.news.sunsite.dk
X-Trace: 1640310668 news.sunsite.dk 692 arne@vajhoej.dk/68.9.63.232:59953
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 24 Dec 2021 01:51 UTC

On 12/23/2021 3:59 PM, Stephen Hoffman wrote:
> On 2021-12-23 15:25:54 +0000, Arne Vajhj said:
>> They have been mentioned a few times, so I decided to take a look.
>>
>> And I am puzzled.
>>
>> Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
>> about starting a bunch of independent threads that does some work in
>> parallel.
>
> Since the canonical website for this material vaporized years ago,
> here's a mirror containing a technical overview:
>
> http://zx.net.nz/mirror/h71000.www7.hp.com/openvms/integrity/OpenVMS-KP-Services.pdf

That is pretty similar to what is in Appendix C.

Arne

Re: KP threads

<61c52807$0$692$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19580&group=comp.os.vms#19580

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 23 Dec 2021 20:53:10 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Subject: Re: KP threads
Content-Language: en-US
Newsgroups: comp.os.vms
References: <61c49505$0$702$14726298@news.sunsite.dk>
<d9cd8e30-3fd0-4bcd-bb3a-93e14cc4f350n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <d9cd8e30-3fd0-4bcd-bb3a-93e14cc4f350n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 27
Message-ID: <61c52807$0$692$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7b81b20a.news.sunsite.dk
X-Trace: 1640310792 news.sunsite.dk 692 arne@vajhoej.dk/68.9.63.232:59953
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 24 Dec 2021 01:53 UTC

On 12/23/2021 3:05 PM, David Jones wrote:
> On Thursday, December 23, 2021 at 10:26:00 AM UTC-5, Arne Vajhøj wrote:
>> Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
>> about starting a bunch of independent threads that does some work
>> in parallel.
>>
>> But when I look at EXE$KP_START, EXE$KP_STALL_GENERAL, EXE$KP_RESTART
>> and EXE$KP_END then I do not see such capability.
>>
>> Instead it is easy to see how to do coroutines with two streams
>> of execution but only one executing at a time transferring control
>> forth and back between the two streams (pretty similar to Modula-2
>> ISO COROUTINES TRANSFER).
>
> Kernel processes are system context threads provided to give device drivers
> that need them a private stack. That they look like coroutines fits in with the
> rest of I/O request processing.

I am sure they have their use.

But are you saying that the reason I can not see how I can use them
to start a bunch of threads utilizing all cores is that they can't
because they are not intended for that purpose?

Arne

Re: KP threads

<61c528f9$0$692$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=19581&group=comp.os.vms#19581

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 23 Dec 2021 20:57:11 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.1
Subject: Re: KP threads
Content-Language: en-US
Newsgroups: comp.os.vms
References: <61c49505$0$702$14726298@news.sunsite.dk>
<memo.20211223201439.2376L@jgd.cix.co.uk>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <memo.20211223201439.2376L@jgd.cix.co.uk>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 38
Message-ID: <61c528f9$0$692$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 7b81b20a.news.sunsite.dk
X-Trace: 1640311033 news.sunsite.dk 692 arne@vajhoej.dk/68.9.63.232:59953
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Fri, 24 Dec 2021 01:57 UTC

On 12/23/2021 3:13 PM, John Dallman wrote:
> In article <61c49505$0$702$14726298@news.sunsite.dk>, arne@vajhoej.dk
> (Arne Vajhøj) wrote:
>> They have been mentioned a few times, so I decided to take a look.
>>
>> And I am puzzled.
>>
>> Normally (pthreads, Win32, Boost/C++11, Java, .NET etc.) threads are
>> about starting a bunch of independent threads that does some work
>> in parallel.
>
> It looks to me, from a bit of PDF-searching, as if the VMS idiom for that
> kind of threading is Kernel Threads, described in section 2.8 of VSI's
> Programming Concepts manual.

I have used pthreads before. Portable and standard paradigm. But I was
curious about what KP threads was all about.

>> But when I look at EXE$KP_START, EXE$KP_STALL_GENERAL,
>> EXE$KP_RESTART and EXE$KP_END then I do not see such capability.
>>
>> Instead it is easy to see how to do coroutines with two streams
>> of execution but only one executing at a time transferring control
>> forth and back between the two streams (pretty similar to Modula-2
>> ISO COROUTINES TRANSFER).
>
> I agree. The KP_ routines seem, looking at the explanation in Appendix C
> of "Porting Applications from Alpha to IA64," to have been created to let
> applications' internal coroutine systems work on IA-64. The hardware
> stack implementation on that architecture is a lot more complicated than
> VAX, or Alpha, or x86-64. It's fairly transparent if you use the stack
> simplistically, but it isn't really designed for DIY coroutines, or other
> clever trickery.

OK.

Arne

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor