Re: DFly Tokens

看板DFBSD_kernel作者時間21年前 (2005/04/05 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
On Mon, Apr 04, 2005 at 02:19:15AM +0000, Terry Tree wrote: > Is it possible to pull in some of the same work that FreeBSD has done > using mutex locking into DragonFlyBSD using Tokens ? E.G. Reading > through the status log on the web site I haven't seen anything done > yet with the device drivers. Is it possible to use tokens inside > those code paths or is there already another chosen method for this ? The biggest difference between tokens and mutexes is that tokens allows blocking, but loose the atomicy, and mutexes normally don't allow to block to prevent dead locks. It is important to consider what device drivers have to serialize and how they are accessed. The two parts are the high-level kernel interface and the low-level interrupt handler. You have to serialize all high-level operations and all low-level changes with each other. One way to achieve this is via a mutex for all softc accesses. A different way is to serialize all accesses on one CPU and use a thread to handle the accesses. We most likely end up with something like that, but the details are still fuzzy. Joerg
文章代碼(AID): #12KO4J00 (DFBSD_kernel)
文章代碼(AID): #12KO4J00 (DFBSD_kernel)