[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] The history of the term "to block on a channel"



Hi,Â

The 'blocking' terminology issue seems to me also to be tied up with OS terminology. In particular, standard APIs exist for blocking I/O and for non-blocking I/O, which typically use (or avoid) mutex locks. In the non-blocking I/O case, the OS API provides some means of registering callbacks to deal with state progressions.

The same is very much true for the Java virtual machine also.

For this reason and for reasons others have mentioned, I feel that it is wrong to describe channels with this terminology because it evidently causes nuances and misunderstandings in those not very familiar with a CSP or Occam way of doing things. 'Waiting' on a channel communication is helpfully different.

As Roger mentioned, the terms synchronous and asynchronous are widely used outside of their original clocked vs unclocked meanings. Many people would describe a zero-buffer channel as "synchronous" but an infinite-place buffer channel as "asynchronous" because the sender never waits in the latter case. This terminology is flawed in my view; how do you differentiate between an infinite-buffer channel and a one-place buffer channel? The latter could behave "synchronously" or "asynchronously" depending on the current dynamic state; clearly, using synchronous and asynchronous in this way lacks rigour. Alas, it seems to be pervasive though.

Rick





On 29 September 2014 11:33, Roger Shepherd <rog@xxxxxxxx> wrote:
Ãyvind

The issue in telephones is precisely whether the switch allows another call to be established or whether some calls may beÂâblockedâÂbecause a circuit cannot be established.

Roger

On 29 Sep 2014, at 11:21, Teig, Oyvind BIS <Oyvind.Teig@xxxxxxxxxxxxxxxx> wrote:

Chris and Roger
Â
..and this again corresponds to the Wikipdia article about Non-blocking algorithm (perhaps by accident), since the telephone connection does not take other connections into consideration (that trying to call on one line should not stop the others from getting a connection)? Or was this actually what they were afraid of the twenties or whenever: that they should design the exchanges, cabling etc. so that they did not side effect into other connections and effectively blocked them?
Â
Ãyvind
Â
Fra:ÂRoger Shepherd [mailto:rog@xxxxxxxx]Â
Sendt:Â29. september 2014 12:03
Til:ÂJones, Chris C (UK Warton)
Kopi:ÂLarry Dickson; Matt.Pedersen@xxxxxxxx; Teig, Oyvind BIS; occam-com@xxxxxxxxxx; "Ãyvind Teig (oyvind.teig@xxxxxxxxxxx)"; David May
Emne:Â[External] Re: The history of the term "to block on a channel"
Â
Chris,
Â
This sounds likely and the difference between this and what happens in a (for example) occam program is interesting. In an occam program the communication channel is always available, however the âother partyâ is not. So, in the telephone sense the communication is non-blocking - itâs just that the other party might not be there, and if you are making a call (output) you have have to hang on the line until the other party answers.Â
Â
Roger
Â
Â
On 29 Sep 2014, at 10:55, Jones, Chris C (UK Warton) <chris.c.jones@xxxxxxxxxxxxxx> wrote:


I suspect the term has been lifted from the telecoms industry where telephone exchange equipment was considered to be non-blocking when a caller was guaranteed always to be able to get an immediate connection to another non-busy user on a fully functioning, non-blocking exchange. In the UK, local exchanges were non-blocking while trunk connections were not.
Â
I would have thought the usage referring to the possibility of sending a communication was still pertinent.
Â
Chris
Â
Â

Prof. Christopher C R Jones BSc. PhDÂC.Eng. FIET

BAE Systems Engineering Fellow

EMP Fellow of the Summa Foundation

Technologist Consultant â Lightning, EMP & CEMÂÂÂÂÂ<image001.jpg>
Â
Military Air & InformationÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(ÂDirect:Â +44 (0)1772 8 54625
Electromagnetic Engineering, W423AÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(ÂMobile:Â +44 (0)7855 393833
Engineering Integrated SolutionsÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ7ÂFax:Â ÂÂÂ +44 (0)1772 8 55262
Warton AerodromeÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*ÂE-mail:ÂÂÂchris.c.jones@xxxxxxxxxxxxxxÂ
PrestonÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:ÂWeb:ÂÂÂÂÂÂwww.baesystems.com
PR4 1AX
Â
BAE Systems (Operations) Limited
Registered Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, Farnborough, Hants, GU14 6YU, UK
Registered in England & Wales No: 1996687
Â
Exported from the United Kingdom under the terms of the UK Export Control Act 2002 (DEAL No ####)
Â
From:Âoccam-com-request@xxxxxxxxxxÂ[mailto:occam-com-request@xxxxxxxxxx]ÂOn Behalf OfÂLarry Dickson
Sent:Â27 September 2014 18:32
To:ÂMatt.Pedersen@xxxxxxxx
Cc:ÂRoger Shepherd; Teig, Oyvind BIS;Âoccam-com@xxxxxxxxxx; "Ãyvind Teig (oyvind.teig@xxxxxxxxxxx)"; David May
Subject:ÂRe: The history of the term "to block on a channel"
Â
Â
*** WARNING ***

This message originates from outside our organisation, either from an external partner or the internet.
Consider carefully whether you should click on any links, open any attachments or reply.
For information regardingÂ
Red FlagsÂthat you can look out for in emails you receive, clickÂhere.
If you feel the email is suspicious, please followÂthis process.

It seems to me that âblockingâ applies to an alt as well as a one-to-one communication (or to a timer). Itâs not something that CSP people need to be embarrassed about. On the contrary. Any model that does NOT account for blocking is a false model. Think on the instruction level. Each sequential logic primitive (like an add or multiply) is a wrapper around some combinatorial logic that needs time to settle. The system clock gives it that time â so every instruction blocks! And if it did not block, it would give incorrect results.
Â
Before an instruction completes, the conditions necessary for its completion have to hold. If this is a read, write, alt, or timeout, the required blocking can be âmacroscopic,â and efficient chips yield control of the instruction stream to other tasks at that point.
Â
Larry
Â
On Sep 26, 2014, at 2:22 AM,Âmatt.pedersen@xxxxxxxxÂwrote:



Blocking is probably used because a read or write will do exactly that in a one to one straight up communication. Though used in an alt blocking might not aptly describe the state as only communications that are ready (i.e., will _not_ block) will be considered.Â
I dislike yield because yield gives the idea that you can back off from a blocking read or write call which you cannot.Â
Â
Matt


On Sep 26, 2014, at 2:19, "Roger Shepherd" <rog@xxxxxxxx> wrote:

Oyvind,
Â
I donât know the answer to you question.
Â
I canât say that I like âblockâ - but it usage is certainly old and is common for multitask systems where the ability to create an extra task/thread/whatever to do communication is considered to be advantageous - hence ânon-blocking communicationâ.
Â
I donât like âyieldâ either as this has a meaning along the lines of "toÂgiveÂplaceÂorÂprecedenceÂ(usuallyÂfollowedÂbyÂto): ÂtoÂyieldÂtoÂanother;ÂWillÂtheÂsenatorÂfromÂNewÂYorkÂyield?â (fromÂdictionary.com) and it is not necessarily the case the case that there is anything else to yield to.Â
Â
I prefer âwaitâ.
Â
On the subject of language, I think the term âsynchronousâ is plain wrong when used to describe (occam) channel communication. The processes are âsynchronisedâ by the communication; the communication is âasynchronousâ - there is no clock which causes the communication to happen.
Â
RogerÂ
Â
Â
On 26 Sep 2014, at 07:27, Teig, Oyvind BIS <Oyvind.Teig@xxxxxxxxxxxxxxxx> wrote:



Sirs
Â
When was the phrase âblocking on a channelâ introduced and by whom? Hoare does not use it in his 1985 book. Roscoe almost does not use it, or I would say, he does not use it at all in this context in his version of the book thatâs PDFed. If this group does not know this, none will.
Â
I am suggesting using âto yield on a channelâ rather than âto block on a channelâ. I have a blog note about it [1] and there is a discussion thread on golang-nuts [2]. I include the figure here (and the intro text in golang-nuts):
<image001.jpg>
Readers of golang-nuts know that âblocking is fine in Goâ. But often, when I talk with other programmers I would hear that âblocking is evilâ. I suggest that we go over to saying that âyielding on a channel is fineâ. Iâll explain:Â
Â
The literate meaning of blocking is about something we donât want. It means I want to go somewhere but am stopped or delayed so I arrive too late. Or a door is blocked, in which case we must unblock it, hopefully without a bulldozer. Since this semantics outnumbers the people who understand CSP-based channel semantics we have an explanation problem.
Â
With an explanation problem follows a mission problem.
Â
Tell a basically single-thread programmer in C++ that blocking is good and you ask for much. His attention to try to understand something rather new, even if heâs used to linux select. Because often the code that does this linux select also does other rather independent matters. And itâs in his spec that these other matters also need to complete. And when you block on one matter itâs easy to see blocking as something evil. Because he or she is right in their own mind.
Â
So which âblockingâ do you mean?
1.ÂÂÂÂÂâBlocking on a channelâ or some shared resource controlled by a non-blocking algorithm. I believe these may be in the same group, ref. the Wikipedia page about Non-blocking algorithm
2.ÂÂÂÂÂâBlockingâ away other required functionality
3.ÂÂÂÂÂâBlockingâ as in deadlock, where the system cannot proceed, where there is a cycle in the dependency tree
We already have good words for 2. = blocking as is, and 3 = deadlock. But we reuse blocking for 1.) which is not optimal. As said, I suggest 1. = yielding. This is an implicit yield that the application doesnât have control of. Not the explicit yield that some operating systems would supply in the API. The channel semantics as implemented in the scheduler does it for us.
Â
What do you think of this? If we start to write âto yield on a channelâ or âyielding on a channelâ it could slowly creep into our language. And the C/C++ (and even Scala or Erlang) people would give us an ear. Especially if we agree with them that blocking is evil.
Â
(I alse dare take comments on the idea.. Here, there or there)
Â
Â
Med vennlig hilsen / Best regards
Ãyvind Teig
Senior utviklingsingeniÃr, siv.ing. / Senior Development Engineer, M.Sc.
Autronica Fire and Security AS
Research and DevelopmentÂ
UTC Building and Industrial Systems
Phone: +47Â735Â824 68
E-mail:ÂÂoyvind.teig@xxxxxxxxxxxxxxxxÂÂÂ
www.autronicafire.no
www.teigfam.net/oyvind/home/Â
(Also work-related)
Â
Â

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

Â

--
Roger Shepherd
rog@xxxxxxxx


--
Roger Shepherd
rog@xxxxxxxx