Hey,
I have prepared floppy image with boot sector that prints message at screen.
After message print is done then bochs starts using much CPU and my main os (linux) is working very slow. It used to take up to 22% CPU usage (of Intel i3).
I have run this image with virtualbox and all was working fine, with no high cpu usage!
What may cause it ? How to deal with it ? - no errors in bochs's console! -
Bochs working very slow
Re: Bochs working very slow
So, what does your boot sector do after it has printed the message? I hope that you issue a "hlt" instruction rather than just looping.
Re: Bochs working very slow
That's by design. You are trying to compare two different tools.yee1 wrote:I have run this image with virtualbox and all was working fine, with no high cpu usage!
...
What may cause it ? How to deal with it ? - no errors in bochs's console! -
Virtual Box is a quick&dirty emulator + nowdays it uses HW virtualization assistance.
Bochs is a very thorough simulator that tries to be as accurate as possible. So, it introduces a significant slowdown, about 10**{2..3} (btw, this is very good result among architecture emulators). For real-time simulation one shouldn't specify more than 50-100M emulated ticks per second (and that'll take 100% of the time of one of you CPU cores).
(Vanga mode) that's ~25% -> 100% of one of 4 Hyper-Threads. Just as predicted. Although, I wonder why your main OS works too slow when less than a half of the CPU power is occupied. You should configure your OS better or use smth less bloated.yee1 wrote:It used to take up to 22% CPU usage (of Intel i3).
...
my main os (linux) is working very slow.
+1, IIRC Bochs won't consume much CPU time when you use HLT instead of busy-loop. Although this thing has nothing to do with the speed of emulation.iansjack wrote:So, what does your boot sector do after it has printed the message? I hope that you issue a "hlt" instruction rather than just looping.