From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 12 17:47:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 273491065680 for ; Fri, 12 Dec 2008 17:47:40 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id D39038FC14 for ; Fri, 12 Dec 2008 17:47:39 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1LBC70-0008qm-Gl; Fri, 12 Dec 2008 19:47:38 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: rihad In-reply-to: <49429027.8060701@mail.ru> References: <494235CA.2050101@mail.ru> <49426B64.1070004@mail.ru> <49429027.8060701@mail.ru> Comments: In-reply-to rihad message dated "Fri, 12 Dec 2008 20:24:07 +0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 12 Dec 2008 19:47:38 +0200 From: Danny Braniss Message-ID: Cc: freebsd-hackers@freebsd.org Subject: Re: preventing FIFO from EOF X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 17:47:40 -0000 > > BTW, buffer was written way back when memory was measured > > in kilobytes and the ethernet was 10 mgb, so things have changed a bit, and > > its effectivness is questionable :-) > > > My scenario: > > prog1 | prog2 > > where both are daemons. prog1 does all the work, and sends commands for > prog2 to do when needed. I don't want prog1 to block while prog2 is busy > executing the command. So a buffer is inserted between the two: > > prog1 | buffer | prog2 > > Asynchronous execution of commands. It's as simple as that. ahh, but you see, you have now 4 processes, which the scheduler has no real reason to treat specialy, each can block. Then again, I have no idea how much data you are moving around, and how fast you need to process it. buffer was designed to keep a magnetic tape writing at full speed - streaming, or at least for some longer time. then again, there is nothing better than trying it out, instead of out guessing the os :-) cheers, danny