what the hell is that ??

This is a discussion on what the hell is that ?? within the Tech Board forums, part of the Community Boards category; jump?...

  1. #16
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    jump?
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #17
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I don't see anything odd or nefarious about that screenshot. The size of the idle process depends on what the system is doing (as has been said some operations are performed in the idle process), the type of CPU, the number of cores, etc.

    And of course you cannot shut down the idle process. Not a trojan, not a worm, and it's a bit scary that a computer literate person thinks that the idle process isn't legit. Truthfully a really nasty virus or trojan won't show up in the task manager because it will hook into svchost. If you see a lot of svchost's then that might be a cause for concern. svchost encompasses a large number of threads that are running on the system but unfortunately with the default task manager you cannot see what they are. I believe Salem's fav guys over at SysInternals have an answer to this with their own task manager app.
    Last edited by VirtualAce; 07-04-2009 at 10:54 AM.

  3. #18
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    Quote Originally Posted by Bubba View Post
    Not a trojan, not a worm, and it's a bit scary that a computer literate person thinks that the idle process isn't legit.
    It never even crossed my mind. I was just curious about the size of the process and wanted to know more. I was under the impression this was a fixed size, depending on the kernel. Sure, maybe the number of processors affected the size. But the math didn't add up to 28k. So I was just asking. Never really got an answer.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #19
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Sorry Mario F. I was addressing that to the OP and not you. I apologize if that was not clear. I would never question you on a simple matter such as this and hold your responses and abilities in very high regard. So to be clear I was stating the OP should know better.

  5. #20
    The Registered User Aparavoid's Avatar
    Join Date
    May 2009
    Posts
    74
    Quote Originally Posted by Bubba View Post
    I don't see anything odd or nefarious about that screenshot. The size of the idle process depends on what the system is doing (as has been said some operations are performed in the idle process), the type of CPU, the number of cores, etc.

    And of course you cannot shut down the idle process. Not a trojan, not a worm, and it's a bit scary that a computer literate person thinks that the idle process isn't legit. Truthfully a really nasty virus or trojan won't show up in the task manager because it will hook into svchost. If you see a lot of svchost's then that might be a cause for concern. svchost encompasses a large number of threads that are running on the system but unfortunately with the default task manager you cannot see what they are. I believe Salem's fav guys over at SysInternals have an answer to this with their own task manager app.
    Just because a person knows how to program doesn't make them computer literate. I can't speak for the OP but I know other than programming I'm not very good with computers.

  6. #21
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    I can't speak for the OP but I know other than programming I'm not very good with computers.
    That really scares me.

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    Quote Originally Posted by Bubba View Post
    That really scares me.
    Indeed. It's like trying to become a painter without learning about color theory.

    It is particularly scary in programming languages like those mostly discussed on these forums. Not only knowledge of computer and OS operation is mandatory in order to effectively use these languages for anything other than the simplest (read useless) programs, but what strikes me most chilling is the fact these languages usually provide their users with an immense incentive to learn more about the machine.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #23
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    Quote Originally Posted by Bubba View Post
    That really scares me.
    post of the year indeed
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  9. #24
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,666
    Quote Originally Posted by Mario F. View Post
    Ok, I'll officially hijack the thread.

    What exactly determines the size of this process?

    It's not hyperthreading either, since I have it on my processor (where 16k is reported). It can't be cores, since the math doesn't add up. I have 2 cores, so two idle threads. Just curiosity, but anyone knows?
    I believe the memory used column in taskman is merely the process' working set size, and not the actual memory used, in XP. They may have changed things in recent versions of windows; I don't rightly know.

  10. #25
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    I believe the memory used column in taskman is merely the process' working set size, and not the actual memory used, in XP. They may have changed things in recent versions of windows; I don't rightly know.
    I believe this is correct. You need to use something like perfmon on Windows to accurately see the amount of memory being used by a process.

  11. #26
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by maxorator View Post
    What is the second one?
    A proper "idle loop" will be:
    Code:
    here:
          hlt
          jmp here
    But for efficiency, the idle-loop may look more like this:
    Code:
    L1:
         cmp context_switch_needed, 0
         jz   L2
         call   do_context_switch
    L2:
         cmp other_work_needed, 0
         jz   here
         call other_work_function
    here:
          hlt
          jmp L1
    As to the "amount of memory for idle", that's probably dependant on a whole lot of things, including the stack for the idle process [we can't use the current process's stack, since we may end up in idle whan the current process has run out of stack and is waiting for the stack to be paged in]. So that makes it at least 8KB (4KB for the code, 4KB for the stack).

    As stated elsewhere, the idle process is sometimes doing REAL WORK, in which case it will also need memory for those things.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #27
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    I once had that Idle task thing, that was on Windows 7 build 7000, I havn't had it on task manager for XP, Vista or Windows 7 RC :S
    Also, it did scare me when I first saw it, like I looked at the CPU usage only and it said 99%, that gave me a shock...
    Also, I always have a load of those svhost processes, I always think the OS has some bug which makes it start it over and over again...
    Currently research OpenGL

  13. #28
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    Okies, been taking a look at the innards of working sets, which essentially forced me to revisit the whole memory management thingy.

    It's quite curious I never see a change on my Idle Process working set size. It boots on 16k and stays on 16k no matter what I do. With 3Gb RAM and with a very conservative memory usage, I'd expect less aging of the working sets. But I gather many things can affect this; like prefetch and an apparent preference for aged working sets over "free" memory, when handling soft faults.

    It however becomes established that the discrepancy in values of the Idle Process size report on XP is mostly a function of total system RAM. Thanks.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #29
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611
    Apparently the Idle loop runs at dispatch level (it's the last paragraph) so that'd explain it. At that level it can't use anything that'd need to be paged back in, because the page fault handling interrupt has been masked off as that runs at APC_LEVEL (the level below).

    Quote Originally Posted by http://msdn.microsoft.com/en-us/library/ms795133.aspx
    If a routine running at IRQL greater than APC_LEVEL causes a page fault, it is a fatal error.
    Everything it uses must stay resident, and it's most probably not allocating anything itself so it stays at a constant level. As for why 16K, no idea, but one can hazard a guess; a page for its KTHREAD, 2 pages of code, one for the kernel and one for the hal, and a page for the DPC list and/or other related structures.

  15. #30
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by Akkernight View Post
    I once had that Idle task thing, that was on Windows 7 build 7000, I havn't had it on task manager for XP, Vista or Windows 7 RC :S
    Also, it did scare me when I first saw it, like I looked at the CPU usage only and it said 99%, that gave me a shock...
    Also, I always have a load of those svhost processes, I always think the OS has some bug which makes it start it over and over again...
    Windows runs services inside host processes which are called, creatively, "svchost.exe." It can run more than one service in a single process, although it doesn't always. It is impossible to kill svchost.exe because that is not the proper way to terminate a service -- you terminate services using the control panel administrative plugin, or by the "net stop" command on the command line.

    I'm kind of disturbed that people don't seem to have ever looked at the task manager before, then are shocked at mundane things. God forbid you use Process Explorer...
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What the hell!? Crashes and memory leaks?
    By pobri19 in forum C++ Programming
    Replies: 3
    Last Post: 09-26-2008, 05:45 AM
  2. operator from hell
    By algi in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 12-24-2004, 06:36 AM
  3. DLL Hell
    By Sentaku senshi in forum Windows Programming
    Replies: 9
    Last Post: 11-21-2002, 07:06 AM
  4. Living in the 00'S
    By mithrandir in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-21-2002, 08:31 AM
  5. Heaven, Hell, and Aetheists/Non-believers
    By Aran in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 09-10-2001, 02:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21