Re: OS Threads behavior
- From: [Yosi] <Yosi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Aug 2005 07:46:33 -0700
I know everything your write, maybe my question was not clear enough, so here
is my question again :
When I make more than one thread , Does OS run them in order one by one
means x commands from thread1 x commands from thread2... or the OS run them
simultaneity (with no order)?
>From my old knowledge if I have xx thread/tasks with same priority OS run
them by order the task has been created firs run firs the second run after
and so ....
But I trying to be sure is this the same in XP/2K OS (.Net) , or not ?
If this is the same , is there anything to do with this order except to play
with the thread suspend/resume or abort/run deferent order each time?
"Willy Denoyette [MVP]" wrote:
> Unless you have a quad CPU machine (or a dual HT box), there is no chance to
> run 4 threads simultaneously( that is exactly at the same time). Even if you
> have 4 CPU's there is NO guarantee YOUR 4 threads will ever run in parallel,
> there are other threads in the system that are scheduled as well and these
> might run at higher priorities than your threads. For instance, one of these
> threads is your UI thread which runs with a higher priority than your
> auxiliary threads, just move your mouse and it will get a CPU.
>
> Willy.
>
>
> "[Yosi]" <Yosi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:C03DEEC8-9095-4C1C-A4EB-AFB9ECC50427@xxxxxxxxxxxxxxxx
> >I care about it, since I need it, "This answer is so famelies in Microsoft
> > responds , and I don't think it should be the way :-( ".
> > I need it since I trying to built an application which manage concurrency
> > tests, those test will access an external hardware connected to PC by LPC.
> > I care since I would like to be sure the tests will run in 100%
> > simultaneity
> > to be able to verify the HW modules are acting as will as expected. Each
> > test
> > run in deferent thread and if the threads are running in order this will
> > not
> > simulate all the validation cases may cause HW to fail and we will not
> > able
> > to catch all BUGS.
> > BYE the way I was working so hard in my company trying to integrate C# and
> > .Net to our testing engineering , and I already made more than 4 great and
> > heavy tools in this language, the language does not support Hardware
> > access
> > and (Semiconductors boundary )as C/C++, this is the reason I merge both
> > languages for my tools, All high level and user interface made by C# (As
> > manager tool) and the low level (like HW access /IO/MEM?USB....) by C/C++.
> > Thanks for your respond .
> >
> >
> > "Ignacio Machin ( .NET/ C# MVP )" wrote:
> >
> >> Hi,
> >>
> >> I don't think you are right, and even more I don't think that you should
> >> care about it, it's the OS the one who decide which thread to execute.
> >> Like
> >> for example, what happens when executed on a dual core processor, or a
> >> processor with HT, the OS can execute two threads at the same time under
> >> this escenario.
> >>
> >> What r u trying to do?
> >>
> >>
> >> cheers,
> >>
> >> --
> >> Ignacio Machin,
> >> ignacio.machin AT dot.state.fl.us
> >> Florida Department Of Transportation
> >>
> >>
> >>
> >> "[Yosi]" <Yosi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:0DEB1FDE-CBDC-4909-8242-81D330292ACD@xxxxxxxxxxxxxxxx
> >> >
> >> > I would like to know how threads behavior in .NET .
> >> > When an application create 4 threads for example start all of them, the
> >> > OS
> >> > task manager will execute all 4 thread in deterministic order manes,
> >> > OS execute (All have same priority)
> >> > Thread#1
> >> > may be other threads,
> >> > Thread#2
> >> > may be other threads,
> >> > Thread#3
> >> > may be other threads,
> >> > Thread#4
> >> > may be other threads,
> >> > Thread#1
> >> > may be other threads,
> >> > Thread#2
> >> > may be other threads,
> >> > Thread#3
> >> > may be other threads,
> >> > Thread#4
> >> > ......
> >> > I'm right ? if yes , is there any way to ask for run all those threads
> >> > simultaneity with no order ? or I will have to managed the tasks by
> >> > suspend /
> >> > resume for example ?
> >>
> >>
> >>
>
>
>
.
- Follow-Ups:
- Re: OS Threads behavior
- From: S. Senthil Kumar
- Re: OS Threads behavior
- From: Willy Denoyette [MVP]
- Re: OS Threads behavior
- References:
- OS Threads behavior
- From: [Yosi]
- Re: OS Threads behavior
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: OS Threads behavior
- From: [Yosi]
- Re: OS Threads behavior
- From: Willy Denoyette [MVP]
- OS Threads behavior
- Prev by Date: RE: Get Tabes Names in A Database
- Next by Date: Re: XML documentation on an interface
- Previous by thread: Re: OS Threads behavior
- Next by thread: Re: OS Threads behavior
- Index(es):
Relevant Pages
|