flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 Next |
Author |
|
revolution
I think the counter overflowed. Your PC is too fast sinsi. Either buy a slower PC, or change the timer from 10000ms to something smaller like 2500ms.
|
|||
![]() |
|
sinsi
Quote: Your PC is too fast sinsi. ![]() Quote: change the timer from 10000ms to something smaller like 2500ms. I assume you mean the Sleep call? Code: Total threads: 1 Thread: 0, 100% Total threads: 2 Thread: 0, 49% Thread: 1, 50% Total threads: 3 Thread: 0, 33% Thread: 1, 33% Thread: 2, 33% Total threads: 4 Thread: 0, 24% Thread: 1, 25% Thread: 2, 25% Thread: 3, 25% Total threads: 5 Thread: 0, 11% Thread: 1, 24% Thread: 2, 22% Thread: 3, 24% Thread: 4, 16% Total threads: 6 Thread: 0, 11% Thread: 1, 13% Thread: 2, 22% Thread: 3, 23% Thread: 4, 14% Thread: 5, 14% Total threads: 7 Thread: 0, 12% Thread: 1, 13% Thread: 2, 12% Thread: 3, 23% Thread: 4, 13% Thread: 5, 12% Thread: 6, 12% Total threads: 8 Thread: 0, 12% Thread: 1, 13% Thread: 2, 11% Thread: 3, 12% Thread: 4, 12% Thread: 5, 12% Thread: 6, 10% Thread: 7, 14% I would rather have my other reading - oh well ![]() |
|||
![]() |
|
revolution
sinsi wrote: although that's like saying my penis is too long |
|||
![]() |
|
sinsi
I've snorted (back-and-forth) milk through my nose involuntarily, but beer brings tears to the eyes - hah hah hah.
|
|||
![]() |
|
f0dder
revolution wrote: The cache thing is a red-herring anyway, and is independent of the scheduling algo. I just mentioned because Plue was concerned about it. But it shows the worst case scenario is no worse than the current scenario as far as cache performance. The NT scheduling algo isn't super for everything... it seems to try to load balance across all cores, which in my mind is pretty silly when you have a single cpu-intensive thread; you get sub-optimal cache use on AMD multi-core systems, and the additional cores are kept (slightly) busy instead of going to a lower power-consumption state. Btw., have you tried setting Processor Scheduling to "Background Services" instead of "Programs"? Dunno if it does anything for your case, only adjusts the quantum lengths iirc... but worth a shot. |
|||
![]() |
|
revolution
f0dder wrote:
f0dder wrote: The NT scheduling algo isn't super for everything... it seems to try to load balance across all cores, which in my mind is pretty silly when you have a single cpu-intensive thread; you get sub-optimal cache use on AMD multi-core systems, and the additional cores are kept (slightly) busy instead of going to a lower power-consumption state. f0dder wrote: Btw., have you tried setting Processor Scheduling to "Background Services" instead of "Programs"? Dunno if it does anything for your case, only adjusts the quantum lengths iirc... but worth a shot. |
|||
![]() |
|
AlexP
Yeah, I think that having over 880 threads running at one time (that's mine right now) is just a little too much... I guess having tons of junk on one's computer today is the standard, I mean I just bought this computer, haven't even installed anything (all files just sitting in desktop), and yet this thing is (sorry) fricken' slow!! I've got dozens of junk software installed that I didn't even ask for, the CPU is flying most of the time when I have no apps running, and stuff is being downloaded and updated every two seconds for programs that I can't even pronounce!
|
|||
![]() |
|
dosin
Quote: I guess having tons of junk on one's computer today is the standard, I mean I just bought this computer, haven't even installed anything (all files just sitting in desktop), and yet this thing is (sorry) fricken' slow!! Thats why its better to build one... either hand pick or buy a PC kit... I would never buy a computer from a store or online.. "dell..hp...etc...." all the 30 day trials... and junk software they put on them.. You may save a little money with them - but if you go the other route you will have less headaches! ![]() |
|||
![]() |
|
sinsi
Quote: 880 threads Wow, I thought mine was bad with 322. First thing to do with a new computer preinstalled with windows is...reinstall |
|||
![]() |
|
f0dder
revolution wrote: Yes, if the threads use more data/code than the cache size then you get cache misses, not flushes. But it makes no difference how the tasks are pushed to the cores, you will have to endure cache misses no matter what algo you use because there are more threads than cores. AlexP: sounds like you have malware installed on your system? ![]() I have a lot of stuff running, but only hit 32 processes and 391 threads. Most of those threads are in a blocking state, so that count isn't really a problem... I'd much rather have 50 threads in a blocking wait state than 1 thread in a polling loop. |
|||
![]() |
|
sinsi
f0dder wrote: Most of those threads are in a blocking state How can you tell? |
|||
![]() |
|
revolution
sinsi wrote:
|
|||
![]() |
|
f0dder
You can also use Process Explorer and look around the various processes, check the 'threads' tab and look at the "State" - most of them will be in Wait:something (typically UserRequest) state.
I dunno how Process Explorer gets the current thread state, doesn't seem to be present in the CONTEXT structure and I couldn't find any GetThread* function that seems to return the info... |
|||
![]() |
|
LocoDelAssembly
Quad core (Phenom II) on Windows 7 64-bit:
Code: Total threads: 1 Thread: 0, 100% Total threads: 2 Thread: 0, 50% Thread: 1, 49% Total threads: 3 Thread: 0, 33% Thread: 1, 33% Thread: 2, 33% Total threads: 4 Thread: 0, 24% Thread: 1, 25% Thread: 2, 25% Thread: 3, 25% Total threads: 5 Thread: 0, 21% Thread: 1, 25% Thread: 2, 15% Thread: 3, 25% Thread: 4, 12% Total threads: 6 Thread: 0, 12% Thread: 1, 24% Thread: 2, 12% Thread: 3, 24% Thread: 4, 12% Thread: 5, 13% Total threads: 7 Thread: 0, 12% Thread: 1, 8% Thread: 2, 8% Thread: 3, 25% Thread: 4, 12% Thread: 5, 24% Thread: 6, 8% Total threads: 8 Thread: 0, 12% Thread: 1, 8% Thread: 2, 8% Thread: 3, 12% Thread: 4, 12% Thread: 5, 24% Thread: 6, 8% Thread: 7, 12% ======================== SECOND RUN ======================== Total threads: 1 Thread: 0, 100% Total threads: 2 Thread: 0, 50% Thread: 1, 49% Total threads: 3 Thread: 0, 33% Thread: 1, 33% Thread: 2, 33% Total threads: 4 Thread: 0, 24% Thread: 1, 25% Thread: 2, 25% Thread: 3, 25% Total threads: 5 Thread: 0, 11% Thread: 1, 25% Thread: 2, 25% Thread: 3, 25% Thread: 4, 11% Total threads: 6 Thread: 0, 11% Thread: 1, 12% Thread: 2, 25% Thread: 3, 25% Thread: 4, 11% Thread: 5, 12% Total threads: 7 Thread: 0, 12% Thread: 1, 12% Thread: 2, 12% Thread: 3, 25% Thread: 4, 12% Thread: 5, 12% Thread: 6, 12% Total threads: 8 Thread: 0, 12% Thread: 1, 12% Thread: 2, 12% Thread: 3, 12% Thread: 4, 12% Thread: 5, 12% Thread: 6, 12% Thread: 7, 12% Not sure what conclusion should I get from this, it was easier with your scenario. ![]() [edit]f0dder, maybe Get{System|Process|Thread}Times function?[/edit] |
|||
![]() |
|
f0dder
Loco: those give info on the time information for threads, not the state
![]() |
|||
![]() |
|
LocoDelAssembly
Oh I see, I thought your goal was to find the CPU times (also reported in the same place by ProcessExplorer).
I've spent some time debugging but neither ProcessExplorer nor Windows' Task Manager seems to use any of those three functions ![]() ![]() |
|||
![]() |
|
revolution
f0dder: CreateToolhelp32Snapshot
|
|||
![]() |
|
f0dder
revolution wrote: f0dder: CreateToolhelp32Snapshot _________________ ![]() |
|||
![]() |
|
revolution
f0dder wrote: I don't see a member of THREADENTRY32 indicating state? It must be using undocumented methods then. |
|||
![]() |
|
Goto page Previous 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.