Re: Usage Scenarios for Fibers instead Threads,...
- From: "GP" <no@xxxxxxxx>
- Date: Tue, 23 Sep 2008 11:45:49 +0200
Hello Jochen!
Yes. But fibers are running inside the same process, so no need to
switch these descriptiors ;)
That is clear.
What is the reason for Windows to not perform such an User-Mode
"Context-Switch" when scheduling another Thread from the same process on the
same CPU? So that a User-Mode Thread-Switching is automaticly performed when
possible?
Of cause this would not be an option for any kind of waiting function, which
performs an User/Kernel Mode Transistion anyway. But what if the quantum
excides? Couldn't Windows switch to another thread (of the same process)
just in User-Mode? One problem I can think of is that no one can interrupt
the Thread (when the quantum excides), because the Thread doesn't call any
function (like SwitchToFiber) where the quantum could be checked. And the
OS-Scheduler which can interrupt the Code because of the higher IRL would
need to run in Kernel-Mode too.
What about syncronization in Fibers? If I understand it correctly, one
should not use Wait-Objects like Events, because no other Fiber would be
scheduled (the OS will schedule another Thread instead). Am I right when I
claim that by using Fibers you have to use an completly different
syncronization mechanism than by using Threads? So when some want to develop
something like SQL-Servers "Enable Fibers", the whole threading /
syncronization thing has to be abstracted?
GP
.
- Follow-Ups:
- Re: Usage Scenarios for Fibers instead Threads,...
- From: Jochen Kalmbach [MVP]
- Re: Usage Scenarios for Fibers instead Threads,...
- References:
- Usage Scenarios for Fibers instead Threads,...
- From: Kerem Gümrükcü
- Re: Usage Scenarios for Fibers instead Threads,...
- From: Jochen Kalmbach [MVP]
- Re: Usage Scenarios for Fibers instead Threads,...
- From: GP
- Re: Usage Scenarios for Fibers instead Threads,...
- From: Jochen Kalmbach [MVP]
- Re: Usage Scenarios for Fibers instead Threads,...
- From: GP
- Re: Usage Scenarios for Fibers instead Threads,...
- From: Jochen Kalmbach [MVP]
- Usage Scenarios for Fibers instead Threads,...
- Prev by Date: Re: Usage Scenarios for Fibers instead Threads,...
- Next by Date: Re: Usage Scenarios for Fibers instead Threads,...
- Previous by thread: Re: Usage Scenarios for Fibers instead Threads,...
- Next by thread: Re: Usage Scenarios for Fibers instead Threads,...
- Index(es):
Relevant Pages
|