9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Mike Haertel <mike@ducky.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Getting started in Plan9 - help
Date: Mon, 21 Jan 2002 12:44:52 -0800	[thread overview]
Message-ID: <200201212044.g0LKiqK00331@ducky.net> (raw)
In-Reply-To: <20020121202132.4BD0D199E8@mail.cse.psu.edu>

>>   where even a simple "hello, world" C program can execute
>>   100000 instructions before it actually prints anything.
>
>If I'm running rio on Plan 9, draw a new window, and run
>hello world, how many instructions execute before I see
>"hello world" on my screen?  Lots and lots, just not many
>in the hello world process.  The kernel has to redirect
>the write into rio, rio does some lookups to figure out
>which window gets the output, [...]
>
>It takes far more than 100,000 instructions to get "hello world"
>onto my screen either way.  How you count depends on what
>you care to include.

Under an operating system that will remain nameless, the 100K figure
came from using a debugger to count only instructions in the process
context of the "hello, world" program itself.  It didn't count
kernel mode instructions executed, or window system operations in
other processes, or any of the plethora of things you mentioned.
Had I counted those it of course would have been much higher.

Writing to a file or pipe is much cheaper and there the 100K
instructions start to stick out like a sore thumb.

The reason I bitch and whine about the 100K instructions (or lots
more than 100K in some operating systems) is because process startup
overhead is one of the main limiting factors to the performance of
shell scripts, mkfiles, and the like.  That in turn makes people
give up on the "tools" approach too soon and too often.


  reply	other threads:[~2002-01-21 20:44 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-21 20:21 Russ Cox
2002-01-21 20:44 ` Mike Haertel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-24 16:30 Russ Cox
2002-01-24 17:34 ` Thomas Bushnell, BSG
2002-01-23 18:24 Russ Cox
2002-01-24  9:38 ` Thomas Bushnell, BSG
2002-01-22 18:28 David Gordon Hogan
2002-01-23 10:04 ` Douglas A. Gwyn
2002-01-23 18:01   ` Thomas Bushnell, BSG
2002-01-23 18:19     ` Ronald G Minnich
2002-01-23 18:21       ` Scott Schwartz
2002-01-24  9:38       ` Thomas Bushnell, BSG
2002-01-23 18:46     ` Boyd Roberts
2002-01-24  9:38       ` Thomas Bushnell, BSG
2002-01-24 13:01         ` David Arnold
2002-01-24 17:35           ` Thomas Bushnell, BSG
2002-01-24 21:40             ` Dan Cross
2002-01-25 10:00               ` Thomas Bushnell, BSG
2002-01-25 22:56                 ` Dan Cross
2002-01-28 18:26                   ` Boyd Roberts
2002-01-29  9:31                     ` Douglas A. Gwyn
2002-01-24 16:05         ` Boyd Roberts
2002-01-24 17:34           ` Thomas Bushnell, BSG
2002-01-25 10:00     ` Douglas A. Gwyn
2002-01-23 10:48 ` Boyd Roberts
2002-01-23 18:01 ` Thomas Bushnell, BSG
2002-01-22  6:44 okamoto
2002-01-22  2:54 dmr
2002-01-22 11:13 ` Boyd Roberts
2002-01-22 17:39   ` Douglas A. Gwyn
     [not found] <20020121170104.2FABD19A05@mail.cse.psu.edu>
2002-01-21 23:30 ` Andrew Simmons
2002-01-21 22:34 erik quanstrom
2002-01-21 22:15 anothy
2002-01-22  9:53 ` Douglas A. Gwyn
2002-01-21 20:39 Russ Cox
2002-01-21 21:16 ` Matt H
2002-01-21 23:39 ` Quinn Dunkan
2002-01-22 15:36 ` cej
2002-01-22 15:42   ` Matt H
2002-01-22 23:02 ` skipt
2002-01-23 10:05   ` Douglas A. Gwyn
2002-01-23 22:28     ` Lyndon Nerenberg
2002-01-21 20:34 presotto
2002-01-21 19:42 David Gordon Hogan
2002-01-21 20:28 ` Matt H
2002-01-25 10:30   ` Ralph Corderoy
2002-01-21 18:48 Russ Cox
2002-01-21 19:58 ` Mike Haertel
2002-01-21 20:05   ` James A. Robinson
2002-01-21 10:01 Re[2]: " steve.simon
2002-01-21 10:28 ` Boyd Roberts
2002-01-20 21:15 rob pike
2002-01-20 20:02 Roshan James
2002-01-20 21:01 ` Matt H
2002-01-20 22:02   ` Scott Schwartz
2002-01-22  9:54     ` ozan s yigit
2002-01-23 10:05       ` Bakul Shah
2002-01-21 10:22   ` Boyd Roberts
2002-01-21 10:40     ` John Murdie
2002-01-20 21:03 ` William S.
2002-01-20 21:34 ` William Josephson
2002-01-21  6:53 ` cej

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201212044.g0LKiqK00331@ducky.net \
    --to=mike@ducky.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).