flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > MenuetOS > Menuet OS & emulation: Sluggish, and high CPU load

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Frank



Joined: 17 Jun 2003
Posts: 101
Menuet OS & emulation: Sluggish, and high CPU load
This is feedback, don't shoot the messenger.

Hardware: Pentium 4, 2.80 GHz, hyperthreading activated.
Software: Most recent Linux kernel and Xorg, Qemu 1.0, MenuetOS M64 0.98.36 (assigned 512 MB RAM in the virtual machine).

MenuetOS under Qemu runs worse here than the small Linux distributions (TinyCore, Slitaz) do. Screen activity such as opening and closing windows or menus is generally sluggish, with very noticeable delays in the half-second to several-seconds range. When opening or closing a submenu or a program, the mouse pointer disappears or becomes immobile for seconds, until everything has settled. Even with no menu or window open and no other activity, the MenuetOS virtual machine consumes 50% CPU (one hyperthread) all of the time. The Pentium's fan runs like crazy, for no obvious reason.

I am aware that the hardware is no speed wonder. But still, small Linux distros run so much better on the same hard- and software that I suspect a bug in MenuetOS. An ASM OS should certainly do better than C OSes, not worse.

EDIT: Removed superfluous word from the title.
Post 12 Feb 2012, 03:42
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
I can not talk much for menuetos, but this is the same with all ASM OS including mine.
This may surprise some people, but its true there is a bigger difference in speed between hobby OS that are run under real hardware and emulators.
Than OS like linux that run on real pc and in emulators.
Theres also the hlt loop problem where even with hlt in a loop it still runs at 100% cpu use.
This is not the case when run on real hardware.
I think the problem is that emulator are not really emulating x86, but more the way moden OS run on x86.
As a example KolibriOS runs faster in emulators than menuetos, i am not sure why this is, but i think it could be to do with the fact that its optimized to run under emulation.
As its no faster when run on real hardware compared to menuetOS.

As a side note, qemu runs hobby OS's faster than other emulators i have tried.
Post 12 Feb 2012, 21:39
View user's profile Send private message Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 199
We recommend VirtualBOX for testing. Menuet64 has a driver for the VirtualBOX network interface.

Besides, the GUI in Linux distributions you mentioned does not seem to have window 3D effects or transparency, which are enabled by default in Menuet64. These things should be taken into account when testing.

Emulators (especially software emulators) are really not our main target anymore.
All USB devices, for example, are used with real hardware.
Post 14 Feb 2012, 11:18
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2149
Location: Estonia
VirtualBox can have hardware virtualization enabled (when CPU supports it). QEMU can not. Bochs was even slower (I still use it sometimes because of its debugging capabilities).

Its always a good idea to disable transparency and other effects when testing on emulators. For better experience try the real hardware.
Post 15 Feb 2012, 15:16
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2110
Location: Usono (aka, USA)
I would make a (not very) educated guess that Fabrice Bellard codes so that the Linux emulation is fast, first and foremost. I'm not even sure QEMU supports segmentation properly (e.g. 16-bit pmode) from what I had read a few years ago. I doubt that's changed. In other words, nobody cares about anything but Linux Linux Linux and maybe Windows, esp. only 32-bit and 64-bit. It's even been said that finding a stable modern build of QEMU for Windows is almost impossible. I wouldn't doubt it. But anyways ....
Post 16 Feb 2012, 22:38
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
It is the fault of Menuet and not a problem with the emulators.

Menuet uses some wrong concepts and implementations. Those are not visible in real hardware because are hidden by the speed of modern hardware and somehow by the brute force of ASM.

However in emulators those conceptual error become visible and annoying because the emulators are slower and can not hide it anymore.

Yes emulators do have problems but if this was the case them Menuet would have not run at all in them (like Octa OS does).

I use nothing from linux or from windows in my SolarOS and still it runs very fast in emulators (faster than linux/unix/windows) and it runs even faster on real hardware.
Post 17 Feb 2012, 15:33
View user's profile Send private message Visit poster's website Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 199
Meanwhile, in a far away place, called the real world.

It is the fault of Solar OS and not a problem with real CPUs. Solar OS uses some wrong concepts and implementations. Those are clearly visible in real hardware. Solar OS is missing pre-emptive multitasking, television, printer, usb storage support and so on..

In other words, you can aim at emulators as long as you like, but at some point you need to start thinking about the features of real world computers and CPUs Smile

Menuet64 has support for pre-emptive multitasking, television, printer, usb storage.. the things you can not find by sticking your head in to the conviniently limiting world of software emulators.


Last edited by Ville on 17 Feb 2012, 19:57; edited 1 time in total
Post 17 Feb 2012, 16:20
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web

Ville wrote:
Menuet64 has support for pre-emptive multitasking


Multitasking is from the dark ages, it came about because cpu where so expensive, that they need to use every last ounce (time slicing).

But now in the modern world, cores are cheap, we will just give each task a core or two.
Take the i-pad or phone as a example of modern OS's, even though the OS could multi-task, steve jobs chose not to use it ( which is the same as saying it not needed).
And what people think is a form of multi-tasking, is really just a dedicated chip.
Everything comes full circle if you wait long enough.
Post 17 Feb 2012, 19:46
View user's profile Send private message Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 199
Multitasking is really just a part of the solution. The real aim is to have a protected environment, where one application doesn't interfere with another. With co-operative multitasking, executing a simple jmp $ will halt the entire system or cpu. With pre-emptive multitasking combinied with memory protection (M64), you can simply remove the misbehaving application from the process list.
Post 17 Feb 2012, 19:52
View user's profile Send private message Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 342
Location: Trollhättan, Sweden
Hahah, take it easy. Talking badly about someone's OS is like calling their children ugly. A big no-no! Wink
I felt I had to make a comment about it so there's not a full blown war next time I visit. Razz

Different goals is a good thing, and we'll just have to hope someone with time and emulator support as high priority will take the time to contribute some VESA optimizations to Menuet. Smile
Post 17 Feb 2012, 19:54
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Well, Ville is known as touchy person Wink, but IMHO, Bogdan is right here. Not because SolOS is so great, but because the ASM OS must work fast in emulators. Or at least the developers that claims emulators are bad, should provide some proofs about such claims. It is easy to say "It is optimized for Linux" but what exactly is optimized? Some instructions, rarely used by ASM coders and widely used by C compiler?
Post 17 Feb 2012, 20:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web

JohnFound wrote:
Well, Ville is known as touchy person Wink


It must be something to do with OS dev, as i am known for being touchy on other forums, but out of respect for Tomasz Grysztar, i keep my lips sealed Wink .

But to prove its the emulators fault, i can use 3 emulators all on the same PC, all running the same image and you will see big differences in the speed from each emulator.
virtualbox runs slow
bochs runs slow
qemu run OK

But run the same image on your PC, you may find that qemu is slow and virtualbox is OK.
They should all be the same.
Post 17 Feb 2012, 21:23
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
BTW QEMU have accelerator module that (AFAIK) runs some of the code directly to the CPU without emulation (if it is possible) but then 32bit Linux could be faster than 64bit Menuet if the host machine is 32bit because all 64bit instructions will be emulated.
This is normal and is not actually "optimized for Linux and Windows" in the same conditions 32bit Menuet will run faster as well.
Nevertheless I think that ASM written OSes must run relatively fast in any conditions.
Post 17 Feb 2012, 22:04
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14690
Location: Origae-6

JohnFound wrote:
Nevertheless I think that ASM written OSes must run relatively fast in any conditions.

Only if they are well written. Poorly written asm program can still run slow, just like all other poorly written code in any language.
Post 17 Feb 2012, 22:32
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
revolution - that is exactly what I wanted to say. Smile
Post 17 Feb 2012, 23:08
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
If that is the case, why is this slow on one emulator and OK in another.
http://www.dex-os.com/MinDos/freedos.img

In that freedos image is a program called fireworks, i renamed it fire.com
It runs fast or slow depending on emulator.
You can get the code and how its coded here: http://yaniv.leviathanonline.com/blog/comp/simd-fireworks/

I have chose dos as a single tasking example (so your only test program).

[EDIT] Because of this topic i down loaded sol os and i must say its a great OS, love the "GUI elements" and runs great on qemu, but its slows as hell in my virtualBox under linux.
So its no faster than any other asm OS[/EDIT]
Post 17 Feb 2012, 23:19
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Dex4u - Linux is slow by itself when we are talking about graphics and UI, so running GUI emulated OS on top of Linux should be really slow.

After some reading about emulators, I conclude that the only viable comparison of speeds can be made on Bochs.
All other emulators use tricks in order to accelerate the execution of the guest OS.
Post 18 Feb 2012, 07:10
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 561
This whole (hole? Smile) conversation is subjective without clear criteria (rated to a level of importance) and metrics to measure from. The permutations are endless until someone sets the specifics through a set of requirements. Then a test of those requirements has to be done to determine performance. Then you can compare the performances. Without the hard data, it is no comparison, therefore the conversation is subjective, which essentially means nothing, really. I like bubach's comment: "Talking badly about someone's OS is like calling their children ugly." A certain level of decorum is warranted, such that we all can learn something from one another. Doesn't that make sense? Very Happy

Good morning all, have a great day, ok?!
Post 18 Feb 2012, 12:53
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria

smiddy wrote:
I like bubach's comment: "Talking badly about someone's OS is like calling their children ugly."



There is a big difference - the parent can't change his children look&feel, but the OS creator can. So, teasing OS creators (wisely) can make them to reach the new achievements and not to sleep on his laurels. Very Happy And this is even more important for the closed source OSes as Menuet64 and SolOS, because we even can't fix the problems without the author-owner. Wink

_________________
Tox ID: A48DEF727DF44C3B5C2E576B65021F1A45D8FA52E2F8E257F1CAE148BBADB162FDF7820BD1F9
Post 18 Feb 2012, 13:19
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 342
Location: Trollhättan, Sweden
SolOS isn't GPL anymore? :s Maybe I shouldn't keep bits of his code online if he decided to close it?
http://bos.asmhackers.net/docs/floppy/snippet_2
Post 18 Feb 2012, 15:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.