[Top][All Lists]

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

Re: try-this-for ?

From: tomas
Subject: Re: try-this-for ?
Date: Fri, 19 Jan 2018 10:25:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hash: SHA1

On Fri, Jan 19, 2018 at 09:55:35AM +0100, Emanuel Berg wrote:
> tomas wrote:
> > I meant "user space programs" in the context
> > of Unix (more precisely: an unixoid operating
> > system). More specifically I meant
> > "practical, useful programs" and not
> > proofs-of-concepts.
> OK, but do you really have that many user space
> programs that does scheduling?

I'm actually enhancing one I wrote for a customer ten years
ago (C, GTK2). I have written many of those. And I'm far from
a special snowflake.

Every interactive program (worth its salt) does scheduling.
Every server which has to juggle different client requests
(web server, database server, ssh daemon, you name it).

In my current case, it's a GUI program. I want it to be
responsive to the user, but concurrently listen to database
notifications, send requests to the database and to an
LDAP server, and asynchronously wait for their responses
(that is: not block the GUI while doing so). At the same
time it is polling an RFID card reader hung on a serial
interface -- every 500 ms or so please look for it, again,
without glitching the GUI or missing a database notification.

Pretty standard fare, and the model isn't that different
of what Emacs does or Exim or lighttpd. Under an unixoid,
it reduces to watching a bunch of file descriptors using
one of the asynchronous interfaces offered to you by
your trusty operating system interface (select, poll,
epoll, perhaps AIO if you're fancy), thinking hard about
whether you need some prioritization (your life is way
easier if you don't) and keeping things well organized.
You notice when you don't :-)

It's not magic. It's pretty "classical" as Unix goes,
perhaps like [1].


- -- tomás
Version: GnuPG v1.4.12 (GNU/Linux)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]