Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Oct 2005 21:53:24 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        src-committers@FreeBSD.org, Andre Oppermann <andre@FreeBSD.org>, Bruce Evans <bde@zeta.org.au>, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, Andre Oppermann <oppermann@networx.ch>
Subject:   Re: Timekeeping [Was: Re: cvs commit: src/usr.bin/vmstat vmstat.c src/usr.bin/w w.c] 
Message-ID:  <31753.1129924404@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 21 Oct 2005 12:38:59 PDT." <01DFB595-5279-4D3A-BEDA-5F0285E9519B@xcllnt.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <01DFB595-5279-4D3A-BEDA-5F0285E9519B@xcllnt.net>, Marcel Moolenaar 
writes:

>> I think we need the definition to consider if (process- ?)state is
>> retained while the system is unconcious or not.
>
>I'm not sure. I think that might be what makes the definition
>complex.

Actually I don't think it does, it simplifies it.

If a process survives across the "unconcious" period, then it follows
that CLOCK_MONOTONIC cannot be reset to zero in relation to the
unconcious period.


But we are only just scratching the surface here, there are tons of
ambiguities we need to resolve, for instance:

	select(...., {3m0s})
	suspend
	[ 2 minutes pass ]
	resume

When does select time out ?

    One minute after the resume ?

    Three minutes after the resume ?

    Right after the resume with a special errno ?


Some code should obviously know about the suspend/resume event,
dhclient, wep, wpa, bgpd, sshd, just to mention a few

But the majority of processes couldn't care less.


I wish POSIX gang had taken a look at the HP Integral (I think it
came out in 1985 ?) and thought "Gee, we better think about how
portable unix should work in the future..."

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31753.1129924404>