#452 let bochs sleep when the simulation is idle

CPU Model (36)


it definitely occured to you guys that bochs always runs on full cpu even if there is nothing to process such as when the simulated OS is idle and waiting for use input or something .....

it's absolutely necessary to end this CPU waste , is this really that hard to accomplish?



  • Volker Ruppert

    Volker Ruppert - 2011-12-16

    The X11 and term gui have support for the "idle hack" that is used when the cpu is in the HLT state. We have to implement something like "sleep until a keyboard or mouse event occurs" for other guis / platforms.

  • affiss

    affiss - 2011-12-17

    you mean "--enable-idle-hack" ?
    i've tried it out , but seems to do nothing it's literally "idle"

    here is the config line:
    ./configure --enable-x86-64 --enable-pci --enable-pcidev --with-x11 --enable-cdrom --enable-fpu --enable-readline --enable-all-optimizations --enable-usb --enable-usb-ohci --enable-smp --enable-long-phy-address --enable-show-ips --enable-sb16=linux --enable-readline --enable-clgd54xx --enable-idle-hack

  • Stanislav Shwartsman

    Not sure about idle-hack, but as far as I understand this could be done using
    slowdown timer sync option. If your Bochs is capable to run faster than realtime it will wait inorder to be not faster than realtime. When CPU is halted it runs time very fast and seeting 'slowdown' option makes CPU utilization lower at these moments.

    clock: sync=slowdown, time0=315529200 # Tue Jan 1 00:00:00 1980

  • affiss

    affiss - 2011-12-17

    okay , yeah it did limit the CPU usage but it also limited the response time .......

    let me re-formulate the request , is it possible to not make bochs hog the cpu while still enjoying full responsiveness just like on a real pc ?



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks