From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 2 16:36:06 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 D750216A4CE for ; Thu, 2 Nov 2006 16:36:06 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46F1C43D78 for ; Thu, 2 Nov 2006 16:35:26 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GffWx-0007L1-1J for freebsd-hackers@freebsd.org; Thu, 02 Nov 2006 17:35:03 +0100 Received: from nat155.aci.icn.bmstu.ru ([80.92.248.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 17:35:02 +0100 Received: from thIOretic by nat155.aci.icn.bmstu.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Nov 2006 17:35:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: "Maxim A. Zhuravlev" Date: Thu, 2 Nov 2006 19:03:53 +0300 Lines: 36 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: nat155.aci.icn.bmstu.ru X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.5744.16384 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.5744.16384 Sender: news Subject: [call for comments] l2sched 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: Thu, 02 Nov 2006 16:36:06 -0000 What is l2sched? l2sched is a mechanism that allows multiple third-party thread schedulers collaborate. These schedulers are to be implemented as loadable kernel modules aka KLD (kernel loadable driver). l2sched is being designed to to make it possible to provide a complicated software system with a scheduler meeting the system's requirements. l2sched is going to increase the portability of a software, dependant on an OS-specific scheduler's behavior (e.g.. the software, requiring the POSIX real-time schedulers). Currently the POSIX real-time schedulers are implemented as a part of the system schedulers. l2sched should let to implement them independently. l2schd should provide an scheduling policy-independent interface for the thread/process-scheduler interaction. The interface is be based on /usr/src/sys/sys/sched.h. The policy-specific calls like void sched_prio(struct thread , u_char); are to be replaced by void sched_set_param(void*, void*). l2sched is to give scheduler access to the cpu on a priority-based, proportional basis (here we come - level 2 scheduling -l2sched). As the l2sched is being designed for a general-purpose OS FreeBSD, it should provide an adequate experience. So idle process' schedulers should act only if no time-sharing threads' schedulers have runnable threads. The latest should act only when no real-time schedulers are active. A scheduler can schedule any subset of process types. With two given schedulers, the one that hosts more threads should be provided with a bigger portion of processor's time. The author believes that the performance overhead can be minimized provided a well-designed internal calls interface. Any descussion/comments are wellcome. mailto:maxim.zhuravlev@gmail.com maxim (dot) zhuravlev (at) gmail (dot) com -- WBR Maxim A. Zhuravlev