Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: how did blocking IO become such a problem?

by BrowserUk (Pope)
on Feb 21, 2012 at 12:11 UTC ( #955291=note: print w/ replies, xml ) Need Help??


in reply to Re^4: how did blocking IO become such a problem?
in thread how did blocking IO become such a problem?

Sorry, but it is blindingly obvious that you have no idea what is meant by asynchronous IO.

Specifically, it is not a select loop. To correct your analogy, it is definitively not the following:

Imagine employing an intern to sit in the reception of your office block, and have him or her verbally relay each part of each telephone call coming in or out of the build. Ie. there is no direct connection between the outside lines and the internal extensions.

When Mrs. Brown calls to speak to accounts. The receptionist listens to her question and then calls Accounts and repeats it. Then listens to Accounts response and repeats it on the outside line to Mrs. Brown.

At the same time, s/he, the receptionist, is doing the same thing between: HMRC and the Audit Department; and between the Chairman and his wife; and between Goods-in and the Post Office; the head of HR and a sacked employee; the post guy and his boyfriend; the cook and a wholesaler; and the Chairman and his girlfriend; ...

Needless to say, "polishing nails" doesn't get a look in.

That is a fairly accurate analogy of a select loop. All state visible from the one point in the program. No way to prioritise one event over another; or one event type over another, much less one particular conversation over another. All your eggs in one basket. Always fighting fires.

No, Asynchronous IO, also known as Overlapped IO, is a quite, quite different beast.

I suggest you look it up -- you know, do a little research, ensure that you know what it is you're pontificating about -- before you torture any more incorrect analogies to death.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re^5: how did blocking IO become such a problem?
Re^6: how did blocking IO become such a problem?
by sundialsvc4 (Abbot) on Feb 21, 2012 at 18:23 UTC

    I think that you spend far too much time presupposing that I don’t know what I am talking about, when I choose to use an analogy that strikes you as “a little odd.”   (I regret to inform you that you are not the most knowledgeable individual on this planet; nor am I.)   And you certainly waste not a single opportunity to criticize my simple homilies.

    No, obviously, a select() loop is not the same thing as “asynchronous I/O,” which is simply the idea of starting an I/O operation without blocking the requesting process or thread until it completes.   But both it and “the telephone switchboard operator” are a simple but effective illustration of the idea of being able to do many things “at once” with but a single thread or process (say...) being responsible for all.

    As you very-correctly pointed out in this thread, “signaling” a process in Unix/Linux is a very disruptive thing to do and it almost always causes severe timing-related problems that might well not be reproducible ... except, of course, in production, where they will invariably happen every time.   A unit of work, be it an asynchronous I/O request or a select() packet or even a light on a telephone switchboard, is not equivalent to (nor does it in any way require...) a dedicated thread or process.   A very simple sequential event-handling procedure .. of which select() is, of course, probably the most common example .. can service a great number of “simultaneous” requests and, since the internal logic is not parallel, a whole phalanx of otherwise messy issues (mutexes and locks and so forth) simply vanish.

    Tell ’ya what ... try this sometime ... read my posts (or for that matter, just about anyone else’s that you have lately responded to), and don’t respond at all.   Don’t correct them.   In particular, don’t teach them the error of their ways.   If you want a web-site where your word is king, simply set up one of your own.   Add your own comments, but if someone says something that’s technically not the perfect way to say it, just let their own words rest in peace.

      I don't presuppose that you don't know what you talk about. And I do read your posts.

      It is from reading your posts that it is obvious -- to anyone with any detailed knowledge; ie. anyone who has ever written a program to use these techniques -- that you have no real understanding of them at all.

      You may have perused the glossary and learnt a few keywords; scanned the management summary enough to gain a little context; and have sufficient English skills to dress them together with ``lot's'' "of" 'different' quotes and stylistic devices and some flowery analogies to fool the unknowing into a few up-votes, but it stands out like a sore thumb that there is no real understanding behind your words.

      It is not just obvious from what you write; but also from the fact that you've never once posted any code in example of your pseudo-theoretical advices. And from the fact that you never counter argue the subject in support of your statements; but only attempt to distract with meta-discussion. And I am not the only one who can see it. I can only down-vote you once!

      You Sir, are a wannabe. But you're either too old, or too lazy or too recalcitrant to actually to do any research -- much less actually write any programs -- and get a real understanding of that about which you pontificate. You're not even a has-been. More, a never-will-be.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://955291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-12-22 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (112 votes), past polls