Date: Mon, 21 Dec 1998 11:30:25 -0500 (EST) From: Chuck Robey <chuckr@mat.net> To: Mike Smith <mike@smith.net.au> Cc: "Daniel C. Sobral" <dcs@newsguy.com>, current@FreeBSD.ORG Subject: Re: Pb with COMPAT_LINUX_THREADS Message-ID: <Pine.BSF.4.05.9812211118320.342-100000@picnic.mat.net> In-Reply-To: <199812211040.CAA00481@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Dec 1998, Mike Smith wrote: > > At Mon, 21 Dec 1998 01:13:24 -0800, you wrote > > > > > >> The ifdef'd version is to let people look at it and think about it.. > > >> possibly as has been suggested, the malloc'd space might only be used if > > >> there is a sharing of signals. Otherwise it might remain in the U area. > > > > > >That's certainly one way of doing it. You could implement structure > > >compression by COW off the parent's copy of the struct instead, that'd > > >be even more efficient. > > > > I have been wondering about this... Multithreading is usually used to improve > > performance. Wouldn't this "on-demand" allocation of shared signals impact of > > performance? > > You typically thread for the concurrency win, and wear the startup cost > as an overhead that you have to pay back with concurrency. Given that > at the moment we're looking at a heavyweight thread implementation, > this extra allocation is relatively trivial in the scheme of things. My semester is over, I'm only now starting to catch up on the interesting stuff on threads ... for scheduling purposes, then, you want to keep track of how many active threads a threaded process has, and have the scheduler grab that many cpus when a context switch occurs? How is the time for the threaded process to be accounted? I see (for purposes of scheduler priorities) that either total cputime given, across all cpus, could be used, if you wanted to keep non-threaded apps on an even parity with threaded apps. Alternatively, if you wanted to give threaded apps a definite win, then you would only keep cpu stats, perhaps, on a parent thread? This topic seems to be going on in two lists concurrently (FreeBSD-smp). I'd think it belongs better in smp, right? ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812211118320.342-100000>