Testing stuff with QEMU - Part 2: MenuetOS, a tiny OS written in 100% assembly language

Note: This article is part of my Testing stuff with QEMU series.

MenuetOS screenshot

From Wikipedia:

MenuetOS is an operating system with a monolithic preemptive, real-time kernel, including video drivers, all written in FASM assembly language, for 64-bit and 32-bit x86 architecture computers, by Ville Mikael Turjanmaa.

MenuetOS development has focused on fast, simple, efficient implementation. It has a graphical desktop, games, and networking abilities (TCP/IP stack), yet still fits on one 1.44MB floppy disk. It also facilitates easy, full-featured assembly language programming. This stands in marked contrast to the (as of 2007) widespread view that assembly languages are useful mainly for old and embedded systems.

Testing (the GPL'd) MenuetOS in QEMU is easy:

wget http://mesh.dl.sourceforge.net/sourceforge/menuet/M32-084.ZIP
unzip M32-084.ZIP
qemu -fda M32-084.IMG -m 384

There's also Menuet 64, written in 64-bit assembly, but that's not open source'd for some strange reason I don't understand. But you can try that one, too (the binary images, that is), using QEMU:

wget 'http://www.menuetos.be/download.php?CurrentMenuetOS'
unzip M64-059.ZIP\?3.1
qemu-system-x86_64 -fda M64-059.IMG

Measuring the energy consumption of everything you own

Voltcraft Energy Check 3000

Inspired by this post from Lars Wirzenius, I recently bought an electricity meter (or energy meter) and measured the energy consumption of everything I could find in my flat.

I did not yet perform any long-term tests, i.e. measuring the average consumption over multiple days or so, only some quick ad-hoc checks. I just recorded the number of watts the respective device used when powered on.

Here are the results:

Kitchen stuff:

  • Microwave. Off: 0 W. On: 1150 W.
    Depends on the configured "mode" of the microwave, I used the highest/hottest mode here.
  • Coffee machine. Off: 0 W. On: 884 W.
  • Mini-oven. Off: 0 W. On: 800 W.
    Depends on the configured "mode" of the mini-oven, I used the highest/hottest mode here.
  • Kettle. Off: 0 W. On: 2035 W.
    Quite a shock. I bet there are more energy-efficient ones out there, but still...
  • Toaster. Off: 0 W. On: 168 W.
  • Fridge. Off: 0 W. On: 110 W.
    This needs testing over a longer period of time. Fridges are not powered all the time.

Computer stuff:

  • Printer (Epson Stylus DX4200). Off: 0 W. Idle: 2.6 W. Printing: 10 W.
  • Laptop (Toshiba Satellite A80-117). Off: 0 W. On: 40 W. Heavy CPU load: 50 W. In powersave mode: 32 W.
  • PC (ASUS P4B266, 2 GHz). Off: 2.7 W. On: 60 W. Heavy CPU load: 92 W.
  • Computer monitor (CRT). Off: 1.7 W. On: 77 W. Pretty dark screen contents: 60 W. Text console: 50 W.
  • NSLU2. Off: 0 W. On: 3.5 W. Heavy CPU load: 3.9 W.
    This is one of the greatest pieces of hardware I ever bought, and these numbers are one reason for that!
  • External USB hard drive. Off: 0 W. On: 9.6 W. Heavy I/O load: 10.8 W.
  • DSL splitter + router. Off: 0 W. On: 1.2 W.
  • Radio. Off: 0.6 W. On: 2.1 W.
  • Shredder. Off: 0 W. On: 40-60 W.
  • External loudspeakers ("bass booster"). Off: 1.5 W. On: 3.5 W.
  • Portable mini CD player. Off: 0.4 W. On: 1.6 W.

By removing all devices which draw more than 0 watts in stand-by mode, I was able to reduce the overall (useless) energy consumption (and costs!) quite a bit.

I also replaced a bunch of 40 W and 60 W lightbulbs with energy saving lightbulbs which are equally bright, but only consume 8 W or 12 W respectively. On the long run you can save quite some amount of energy (and money) with them. They do cost a little bit more than normal lightbulbs, but save lots of electricity costs and they also last a lot longer (8000-15000 hours vs. 1000 hours according to Wikipedia).

Silent, fast, long-living USB storage devices for use as NSLU2 hard drive?

As I recently bought a NSLU2 ("slug") for 24/7 server usage and random ARM-based development (more on that later), I'm looking for a suitable storage device to use as the root filesystem for a complete Debian system.

The requirements are:

  • Large enough (>= 1 GB).
  • Silent. Hard disks are not an option (no IDE, no SATA, no USB, neither 2.5" nor 3.5")
  • Low power consumption.
  • As fast as possible.
  • USB-attached (the slug only has 2 USB connectors).
  • Should live as long as possible.

The last item is the most important.

The obvious choice is a USB memory stick, but unfortunately those are flash-based and only survive a certain number of write cycles. Thus I'm looking for something which at least survives enough write cycles to make it usable for a few years...

I do know several ways to reduce the number of writes via software, that's not what I'm currently interested in. I'd like to know which storage types will survive the longest amount of time (because of their hardware properties).

Some options:

  • USB memory stick, obviously. Usually quite slow, but there are quite fast ones (read 33 MB/s, write 22 MB/s), too. Some seem to survive 100.000 or even 1.000.000 write cycles, but that may not be enough. Are there any sticks with more possible write cycles?
  • Any other USB-attached (via external USB card-reader if necessary) silent storage type: SD, MMC, Transflash, Memory Stick, Compact Flash, whatever. Does any of those survive more write cycles?
  • Any other viable option?

Has somebody else done something like this before and can share some experiences as to which storage type is best suited for such a scenario? I suspect my slug will be mostly idle, but there might also be phases where it runs on 100% CPU and heavy disk I/O for multiple days in a row...

Google Summer of Code and LinuxBIOS

LinuxBIOS logo

We're happy to announce that the LinuxBIOS project will have the possibility to take part in this year's Google Summer of Code™ (GSoC) program. coresystems GmbH was accepted as a mentoring organization for the GSoC and will mentor all LinuxBIOS-related projects.

There is a GSoC page in the LinuxBIOS wiki which collects a few ideas for student projects, among others:

  • Booting Windows and other Operating Systems in LinuxBIOS
  • Port Grub2 to work in LinuxBIOS
  • SCSI booting in LinuxBIOS
  • CMOS Config / Device Tree Browser Payload
  • LinuxBIOS graphical port creator
  • Open Firmware payload for LinuxBIOS
  • GNUFI or TianoCore payloads
  • Boot OpenSolaris, FreeBSD, NetBSD, OpenBSD or other free OSes
  • Improve Linux as a BIOS

Feel free to post more ideas and wishlist items to the LinuxBIOS mailing list.

If you're interested in applying for a project, you need to hurry up. The deadline is March 24, 2007!

Syndicate content