Date: Tue, 9 Sep 1997 20:47:13 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: jamil@counterintelligence.ml.org (Jamil J. Weatherbee) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Realtime Programming Under FreeBSD? Message-ID: <199709091847.UAA19872@labinfo.iet.unipi.it> In-Reply-To: <Pine.BSF.3.96.970909114239.5264A-100000@counterintelligence.ml.org> from "Jamil J. Weatherbee" at Sep 9, 97 11:43:51 am
next in thread | previous in thread | raw e-mail | index | archive | help
> Can someone give a code snippet of the BEST way of running a 1000HZ for > loop under freebsd, without consuming massive amounts of cpu time. one way I can think of is to build a kernel with HZ=1000 (or higher). Make your process run at high priority, wake up at every tick (through setitimer or usleep etc.) do its task and go back to sleep. Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709091847.UAA19872>