From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 23 02:56:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 768F016A4CE for ; Fri, 23 Jul 2004 02:56:07 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3020D43D49 for ; Fri, 23 Jul 2004 02:56:07 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i6N2u0Wq031936; Thu, 22 Jul 2004 21:56:00 -0500 (CDT) (envelope-from dan) Date: Thu, 22 Jul 2004 21:56:00 -0500 From: Dan Nelson To: pradeep reddy punnam Message-ID: <20040723025600.GA3234@dan.emsphone.com> References: <410069F0.5040604@joelink.net> <20040723022324.55446.qmail@web53409.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040723022324.55446.qmail@web53409.mail.yahoo.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: Joseph M Link Subject: Re: regarding timeout/untimeout kernel functions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2004 02:56:07 -0000 In the last episode (Jul 22), pradeep reddy punnam said: > i thought of threading with select before , but i belive that if > the number of timers to be checked increases the number of the > threads to be maintained increses,so the process may become very > hevy. what do u think. Threads are very lightweight. You should be able to create hundreds of (mostly-sleeping) threads with no problem. You wouldn't even need to use select; just sleep (or nanosleep). > i think ultimatley i am going to use the above thing. but in the > process of my search i came across the timeout kernel function > implemenation but i can not use that ( which i belive very efficient > implementation of timers ), which user can not able to use it , so i > just want to discuss it . You could also use the kqueue/kevent functions to queue up an arbitrary number of timer events in a single process. -- Dan Nelson dnelson@allantgroup.com