9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] bug in rio: unhiding deleted windows
Date: Wed, 26 Nov 2008 15:55:24 -0500	[thread overview]
Message-ID: <8146d476679d5cc0450451d5b26dfc09@quanstro.net> (raw)
In-Reply-To: <a560a5d00811261152mc310474g46e484f8cfdda82b@mail.gmail.com>

> What do you mean by unique ids? I think it is not enough to have a
> unique id at just one instant. We need a unique id for a qualitatively
> long time (i.e. infinite). It seems to me that numbers in /dev/wsys do
> not get reused, which would be just wanted, but is it really so?

yes they are unique for all time.  (per rio.)

>> acme has similar problems that tend to show up on laggy connections.
>what actually happens?

the mouse, keyboard and screen may be out-of-sync
for a short time.

> > why?  i don't think it makes sense to say static sizes are unequivicablly bad.
> > static allocation has advantages.  it's simplier and less error prone, and
> It's simpler in C, because dynamic allocation in C is a pain. If I
> were writing a window manager in say python, I wouldn't think about
> any allocation problems, I guess.

it's deeper than that.  if you do dynamic allocation in any
language you need to recover from the case that there is no
memory.

> I would just make a dictionary of
> windows hashed by a window's id and that would just work. Maybe I only
> have a very distorted view on it. I've never programmed anything like
> that.

fancy algorthims are slow when n is small.  n is usually small.
why hash something that is going to be a small number?

> > there are no concurrency considerations.  there are always tradeoffs.
> I can't see what you mean by concurrency considerations. :(

assignment of a shared pointer must consistent in all processes
with access.  thus some sort of atomic update or locking
mechanism must be used.

- erik



      reply	other threads:[~2008-11-26 20:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 20:51 andrey mirtchovski
2008-10-10 11:53 ` Rudolf Sykora
2008-10-10 12:32   ` andrey mirtchovski
2008-10-10 12:54     ` erik quanstrom
2008-10-10 20:23       ` Lyndon Nerenberg
2008-10-11  3:05         ` Russ Cox
2008-10-11 11:11           ` Rudolf Sykora
2008-10-10 13:15     ` andrey mirtchovski
2008-10-10 13:21       ` Rudolf Sykora
2008-10-10 13:18         ` erik quanstrom
2008-10-10 14:02           ` Rudolf Sykora
2008-10-10 14:41             ` erik quanstrom
2008-10-10 15:25               ` Rudolf Sykora
2008-10-10 15:21                 ` erik quanstrom
2008-10-10 15:42                   ` Rudolf Sykora
2008-10-10 15:33                 ` ron minnich
2008-10-10 15:41                   ` Rudolf Sykora
2008-10-10 16:20                     ` andrey mirtchovski
2008-10-10 16:26                       ` Rudolf Sykora
2008-10-10 16:30                         ` andrey mirtchovski
2008-10-10 16:43                           ` Rudolf Sykora
2008-10-10 15:45                   ` andrey mirtchovski
2008-10-10 16:36               ` matt
2008-10-10 16:40                 ` Rudolf Sykora
2008-10-11 12:44                 ` erik quanstrom
2008-11-23 19:50 ` Rudolf Sykora
2008-11-23 21:51   ` erik quanstrom
2008-11-26 19:52     ` Rudolf Sykora
2008-11-26 20:55       ` erik quanstrom [this message]

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=8146d476679d5cc0450451d5b26dfc09@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).