+ Reply to Thread
Results 1 to 13 of 13

Thread: Freeze/Hibernate program through the OS possible?

  1. #1
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4

    Freeze/Hibernate program through the OS possible?

    I've been wondering how difficult it would be to implement a function of the OS to essentially freeze a program from using any more CPU resources. It wouldn't matter to me to let it remain in the RAM to get back going again. Are there any operating system that already do this?

    I only wonder since Windows Task Manager requires at least one CPU thread be utilized by a program.
    Think, Hold that thought, Complete.

  2. #2
    CapnBFG's Avatar
    CapnBFG is offline Improviser Extraordinaire 10,000,000 Points
    Join Date
    Jun 2007
    Location
    Burlington, VT
    Posts
    1,464
    If I'm understanding you right, then this is something that can be done on Unix/Linux systems in a couple of different ways. First, when you have a process running in a terminal in the foreground, hitting Ctrl+Z causes the program to sleep/pause/stop. It will sit there until you tell it to do something else. For example, typing 'bg' will make it run in the background, no longer linked to the terminal from which you launched it, and 'fg' will bring it back to running in the terminal as it was before you paused it. The other way I know of is to sleep it by process ID. Typing 'ps' at the command line gives you a list of processes running within that shell, or 'top' will give you all the processes with the most usage. I don't remember offhand what the command is to list all processes in all shells, but you can get that info from the Gnome/KDE equivalent of the Windows task manager. Anyway, once you have the numeric PID of the process you want to sleep, you just type 'kill -stop PID' where PID is the number itself. To resume it you type "kill -cont PID'. If you leave off the -stop or -cont, it will actually kill the process, just like you can do from the Windows task manager. Then there is also xkill, which lets you just click on the window you want to kill without knowing the process name or ID. That's one feature I wish Windows had.
    Last edited by CapnBFG; 02-15-2010 at 03:50 PM.
    Core2Quad 9550 | ASUS P5Q Pro | 8GB Patriot DDR2-800 | XFX Radeon HD 5870 | SeaSonic X750 Gold | Antec P180B
    Phenom X2 7750 | MSI K9A2 Platinum | 2GB OCZ DDR2-1066 | VisionTek Radeon HD 4870 | OCZ GameXStream 700W | Thermaltake Shark
    Athlon X2 5600+ | EPoX MF570SLI | 4GB GeIL DDR2-800 | 2x EVGA GeForce 8800GT | Thermaltake ToughPower 700W | Apple PowerMac G5 case
    Athlon XP 2800+ | MSI KT4V-L | 2GB Kingston DDR-333 | HIS Radeon 3850 AGP | Antec NeoPower 480W | custom painted case
    Athlon 1.333GHz | MSI K7T266Pro | 1.4GB Kingston DDR-266 | 3dfx Voodoo 3000 PCI | generic 250W | custom Lexan SFF case
    Preshottt 3.2GHz | Gigabyte GA-945GCM | 2GB Mushkin DDR2-800 | Intel GMA 950 | FSP Saga+ 450W | Systemax Tiger μATX case


    A simple lie brings you down in an ordinary way.

  3. #3
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Appreciate it Capn. I figured Unix/Linux would have already adopted something like this (if it hadn't already had it since the beginning).
    Think, Hold that thought, Complete.

  4. #4
    Holy_COW's Avatar
    Holy_COW is offline Member 100,000 Points
    Join Date
    Sep 2007
    Location
    Costa Rica
    Posts
    369
    Dload process explorer (form sysinternals, now from microsoft) go to the process, right click, choose "suspend"

    it basically freezes the program, ram stays on current usage but cpu and time "freezes" for the program...

    Detailed BC2 Stats: http://bfbcs.com/stats_pc/Holy.COW



    Main PC: X3350 @ 3.4Ghz | Rampaged Maximus | 8GB Dominator 1066 | HD5870 Watercooled | Stacker 832
    Enermaxx Galaxy 850W | Dell 2408WFP | 2xST 1.5TB on R0 (os+games) + R1 (data) | Custom WC

    You're not drunk if you can lie on the floor without holding on.

  5. #5
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Quote Originally Posted by Holy_COW View Post
    Dload process explorer (form sysinternals, now from microsoft) go to the process, right click, choose "suspend"

    it basically freezes the program, ram stays on current usage but cpu and time "freezes" for the program...
    This thing is ****ing awesome. Thanks Holy_COW.
    Think, Hold that thought, Complete.

  6. #6
    Holy_COW's Avatar
    Holy_COW is offline Member 100,000 Points
    Join Date
    Sep 2007
    Location
    Costa Rica
    Posts
    369
    Quote Originally Posted by MagicLess View Post
    This thing is ****ing awesome. Thanks Holy_COW.
    You're welcome

    Those tools from sysinternals are great, they have one for handles, blocked files, tcp ports+app name details, etc...
    Some of them are old as they have not been updated (thanks microsoft...) but if you can, download the whole pack and try them, I bet you will find a couple of them very useful

    Detailed BC2 Stats: http://bfbcs.com/stats_pc/Holy.COW



    Main PC: X3350 @ 3.4Ghz | Rampaged Maximus | 8GB Dominator 1066 | HD5870 Watercooled | Stacker 832
    Enermaxx Galaxy 850W | Dell 2408WFP | 2xST 1.5TB on R0 (os+games) + R1 (data) | Custom WC

    You're not drunk if you can lie on the floor without holding on.

  7. #7
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Ports+apps will be good if I can port forward for FAH.

    Though on a sad note I stopped a program, resumed it, and after clicking on it I went straight to BSOD.
    Think, Hold that thought, Complete.

  8. #8
    Holy_COW's Avatar
    Holy_COW is offline Member 100,000 Points
    Join Date
    Sep 2007
    Location
    Costa Rica
    Posts
    369
    well it depends a lot what you freeze, if you suspend a critical OS service (like svchost, services.exe or kernel or a thing like that) a BSOD or full hang is almost guaranteed.

    Try it with notepad or a game, or word, and you will see they can be freeze and then resumed.

    Detailed BC2 Stats: http://bfbcs.com/stats_pc/Holy.COW



    Main PC: X3350 @ 3.4Ghz | Rampaged Maximus | 8GB Dominator 1066 | HD5870 Watercooled | Stacker 832
    Enermaxx Galaxy 850W | Dell 2408WFP | 2xST 1.5TB on R0 (os+games) + R1 (data) | Custom WC

    You're not drunk if you can lie on the floor without holding on.

  9. #9
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Quote Originally Posted by Holy_COW View Post
    well it depends a lot what you freeze, if you suspend a critical OS service (like svchost, services.exe or kernel or a thing like that) a BSOD or full hang is almost guaranteed.

    Try it with notepad or a game, or word, and you will see they can be freeze and then resumed.
    It was with only one program: Grand Theft Auto IV. It has a habit of consuming one full core when it's in the backround, which is why I wanted to freeze it. Losing one core with FAH causes a disproportional loss to performance. 1/8th loss of CPU usage seemed to causes FAH to run two to ten times slower.
    Think, Hold that thought, Complete.

  10. #10
    Holy_COW's Avatar
    Holy_COW is offline Member 100,000 Points
    Join Date
    Sep 2007
    Location
    Costa Rica
    Posts
    369
    what Os you're on? win7?
    I have tried the suspend in XP and Vista, dont recall using it yet on win7...

    Well other option may be that a game with DirectX and direct calls may not be "freezable" (at least with this tool) I do have used it with word/outlook and stuff like that... hmm now you made me curios about this lol, when I get home to my main pc i will fire a couple of games and try on win7 and let you know how it goes.

    Detailed BC2 Stats: http://bfbcs.com/stats_pc/Holy.COW



    Main PC: X3350 @ 3.4Ghz | Rampaged Maximus | 8GB Dominator 1066 | HD5870 Watercooled | Stacker 832
    Enermaxx Galaxy 850W | Dell 2408WFP | 2xST 1.5TB on R0 (os+games) + R1 (data) | Custom WC

    You're not drunk if you can lie on the floor without holding on.

  11. #11
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Yes, I am using Window 7. More precisely Win7 Pro 64-bit.
    Think, Hold that thought, Complete.

  12. #12
    Holy_COW's Avatar
    Holy_COW is offline Member 100,000 Points
    Join Date
    Sep 2007
    Location
    Costa Rica
    Posts
    369
    More info on suspend function:
    SuspendThread Function (Windows)

    Please note the Suspend WOW64 applications thread, if you're on a 64bit OS, maybe the game is 32bit running inside a WOW64 machine and caused the blue screen, since Process explorer its 32bit? (just guessing)

    When I have a chance I will test it on my home on both 32 and 64bit apps and games...
    Last edited by Holy_COW; 02-15-2010 at 05:58 PM.

    Detailed BC2 Stats: http://bfbcs.com/stats_pc/Holy.COW



    Main PC: X3350 @ 3.4Ghz | Rampaged Maximus | 8GB Dominator 1066 | HD5870 Watercooled | Stacker 832
    Enermaxx Galaxy 850W | Dell 2408WFP | 2xST 1.5TB on R0 (os+games) + R1 (data) | Custom WC

    You're not drunk if you can lie on the floor without holding on.

  13. #13
    MagicLess's Avatar
    MagicLess is offline No Dot Sam 250,000 Points
    Join Date
    Jun 2007
    Location
    Oshkosh, WI
    Posts
    3,488
    Blog Entries
    4
    Makes enough sense to me, since I don't know much about that kind of thing. Task Manager is saying it's a 32-bit game.
    Think, Hold that thought, Complete.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts