| From | Sent On | Attachments |
|---|---|---|
| Daniel M. Eischen | Nov 20, 1999 8:12 pm | |
| Julian Elischer | Nov 20, 1999 8:30 pm | |
| Julian Elischer | Nov 20, 1999 8:37 pm | |
| Daniel M. Eischen | Nov 20, 1999 9:02 pm | |
| Nate Williams | Nov 20, 1999 9:14 pm | |
| Daniel M. Eischen | Nov 20, 1999 9:21 pm | |
| Julian Elischer | Nov 20, 1999 9:25 pm | |
| Nate Williams | Nov 20, 1999 9:27 pm | |
| Daniel M. Eischen | Nov 20, 1999 9:40 pm | |
| Julian Elischer | Nov 20, 1999 10:58 pm | |
| Daniel M. Eischen | Nov 21, 1999 5:40 am | |
| Chuck Robey | Nov 22, 1999 4:30 pm | |
| Julian Elischer | Nov 22, 1999 7:57 pm | |
| Chuck Robey | Nov 22, 1999 8:11 pm | |
| Julian Elischer | Nov 22, 1999 8:38 pm | |
| Chuck Robey | Nov 22, 1999 9:40 pm | |
| Daniel Eischen | Nov 23, 1999 4:19 am | |
| Jason Evans | Nov 23, 1999 11:30 am | |
| Daniel M. Eischen | Nov 23, 1999 1:22 pm | |
| Chuck Robey | Nov 23, 1999 9:06 pm | |
| Daniel Eischen | Nov 23, 1999 9:49 pm | |
| Julian Elischer | Nov 23, 1999 10:47 pm | |
| Julian Elischer | Nov 23, 1999 11:33 pm | |
| Julian Elischer | Nov 23, 1999 11:46 pm | |
| Julian Elischer | Nov 24, 1999 2:03 am | |
| Daniel C. Sobral | Nov 24, 1999 3:19 am | |
| Daniel C. Sobral | Nov 24, 1999 3:51 am | |
| Daniel M. Eischen | Nov 24, 1999 6:03 am | |
| Richard Seaman, Jr. | Nov 24, 1999 6:33 am | |
| Matthew Dillon | Nov 24, 1999 10:35 am | |
| Daniel Eischen | Nov 24, 1999 11:02 am | |
| Matthew Dillon | Nov 24, 1999 11:05 am | |
| Anthony Kimball | Nov 24, 1999 11:25 am | |
| Daniel Eischen | Nov 24, 1999 11:28 am | |
| Matthew Dillon | Nov 24, 1999 11:41 am | |
| Matthew Dillon | Nov 24, 1999 11:47 am | |
| Julian Elischer | Nov 24, 1999 11:54 am | |
| Louis A. Mamakos | Nov 24, 1999 11:57 am | |
| Matthew Dillon | Nov 24, 1999 12:00 pm | |
| Julian Elischer | Nov 24, 1999 12:20 pm | |
| Anthony Kimball | Nov 24, 1999 12:47 pm | |
| Doug Rabson | Nov 24, 1999 2:05 pm | |
| Jason Evans | Nov 24, 1999 2:16 pm | |
| Julian Elischer | Nov 24, 1999 2:28 pm | |
| Julian Elischer | Nov 24, 1999 2:40 pm | |
| Richard Seaman, Jr. | Nov 24, 1999 3:39 pm | |
| Jason Evans | Nov 24, 1999 9:24 pm | |
| Jason Evans | Nov 24, 1999 10:03 pm | |
| Julian Elischer | Nov 25, 1999 1:08 am | |
| Julian Elischer | Nov 25, 1999 1:33 am | |
| Daniel M. Eischen | Nov 25, 1999 3:08 am | |
| Doug Rabson | Nov 26, 1999 3:01 am | |
| Jordan K. Hubbard | Nov 26, 1999 10:33 am | |
| Doug Rabson | Nov 26, 1999 12:15 pm | |
| Matthew Dillon | Nov 27, 1999 7:38 pm | |
| Arun Sharma | Nov 27, 1999 8:57 pm | |
| Matthew Dillon | Nov 28, 1999 8:41 am | |
| Arun Sharma | Nov 28, 1999 10:25 am | |
| Matthew Dillon | Nov 28, 1999 5:06 pm | |
| Nate Williams | Nov 29, 1999 8:10 am | |
| Matthew Dillon | Nov 29, 1999 8:21 am | |
| Nate Williams | Nov 29, 1999 8:29 am | |
| Matthew Dillon | Nov 29, 1999 9:05 am | |
| Matthew Dillon | Nov 29, 1999 9:19 am | |
| Daniel M. Eischen | Nov 29, 1999 9:28 am | |
| Nate Williams | Nov 29, 1999 10:29 am | |
| Julian Elischer | Nov 29, 1999 11:23 am | |
| Nate Williams | Nov 29, 1999 1:39 pm | |
| Chuck Robey | Nov 29, 1999 6:06 pm | |
| Daniel M. Eischen | Nov 29, 1999 7:46 pm | |
| Chuck Robey | Nov 29, 1999 9:01 pm | |
| Julian Elischer | Nov 29, 1999 9:34 pm | |
| Chuck Robey | Nov 29, 1999 10:09 pm | |
| Daniel M. Eischen | Nov 30, 1999 4:02 am | |
| Jason Evans | Nov 30, 1999 2:25 pm | |
| Julian Elischer | Nov 30, 1999 2:42 pm |
| Subject: | Re: Threads | |
|---|---|---|
| From: | Julian Elischer (jul...@whistle.com) | |
| Date: | Nov 29, 1999 9:34:18 pm | |
| List: | org.freebsd.freebsd-arch | |
On Tue, 30 Nov 1999, Chuck Robey wrote:
Scenario: UTS on processor 1 is stopped due to a page fault, while it's in a critical section. UTS on processor 2 is entering a critical section, a spin lock which will end up in conflict with the processor 1 UTS, when it gets the upcall, telling it that processor 1 has a suspended UTS, so that this second UTS is pretty much dead in the water.
If it's possible for a UTS to get a page fault (or any other unpredictable swap-out) during a critical section may be a really bad idea. If it's possible for threaded process to run on multiple processors in time slots that *aren't* synchronous, then deadlocks would be a problem there too.
The difference I see between UTS threads, as against all other threads, is that all other threads implicitly depend on the UTS, so the UTS can't hang without serious performance impacts. Isn't this a problem for SA implementations?
My take on this is as follows: The UTS has some sort of structure that is private to itself. it also has a descriptor for each thread, and each thread has a stack on which there is some saved context.
The kernel needs to know that when the UTS is blocking it should NOT perform an upcall. The result of this is that yes, the UTS actually blocks. However this should only happen at startup because the UTS will be hot code and data. The kernle knows it's the UTS because it knows where the UTS's stack is and cna check whether the blocking thread is on that stack. Other time s that the UTS might block in a pagefault are when loading context from the incoming thread's stack (it may have been paged out.) and when reading the structure describing that thread.
In the first case, the UTS is about to relinquish control of the processor to the incomng thread, so we can move it's stack pointer to a location within the new stack already. This nesures that it will not be recognised as being the UTS and some other thread will be given the oportunity to run while the page is being brought in. The second is a bit more difficult, because the UTS may need to read this structure while doing more mundane tasks, (e,g figuring out who to run). However this structure is quite a bit smaller. it is possible that the page on which it sits will alway be in core as somewhere else on it is a thread that get's called more often. Still we need to keep this page resident. It is possible that we may be able to do some mmapp or sysvSHM trick to keep this small region in core. Failing this we may just need to block. I'm not sure that a goal of teh thread system is to have the programs NEVER EVER EVER block. What iof the whole program is swapped out at a busy time?
What we can do however is make it pretty dammed unlikely, by keeping these structures small and in hot pages.
Julian
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message





