Re: OS Threads behavior

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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 ?
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: OS Threads behavior
    ... Unless you have a quad CPU machine, ... >I care about it, since I need it, "This answer is so famelies in Microsoft ... > heavy tools in this language, the language does not support Hardware ... it's the OS the one who decide which thread to execute. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: UML Question (Object <-> ObjectFinder?)
    ... It also seems to me that the formality of one's language ... >the problem space one is defining constraints on behavior sequencing ... >> emulate the computing environment of those languages. ... Any language that can execute has some underlying assumptions about ...
    (comp.object)
  • Re: FpgaC developers wanted :)
    ... in many languages this requires a first assignment ... to the state of "don't care" that may or may not be overridden. ... doesn't have an explict implicant, ... there is no support in the language for this. ...
    (comp.arch.fpga)
  • Re: DiskBrowser Software - Work In Progress
    ... combining multiple statements on the same ... line degrades the readability of any program regardless of language. ... Sometimes readability isn't important. ... execute have multiple statements per line. ...
    (comp.sys.apple2)
  • Re: a relational database done in forth would r0ck
    ... Forth group implemented a smart card with an embedded web server in Forth - ... you stated they changed language and added people; you stated nothing about the similarity taken in the approach. ... Most of the strategies commonly associated with Forth programmers are part of modern software development practice. ... Those who care more about results don't care about historical timelines-- they just follow these strategies and get the same results regardless of language. ...
    (comp.lang.forth)