Boot Linux In Your Browser 393
An anonymous reader writes "Fabrice Bellard, the initiator of the QEMU emulator, wrote a PC emulator in JavaScript. You can now boot Linux in your browser, provided it is recent enough (Firefox 4 and Google Chrome 11 are reported to work)."
Re:The burning question. (Score:5, Informative)
I did it for fun, just because newer Javascript Engines are fast enough to do complicated things. Real use could be: Benchmarking of Javascript engines (how much time takes your Javascript engine to boot Linux ?). For this particular application, efficient handling of 32 bit signed and unsigned integers and of typed arrays is important. Client side processing using an x86 library, for example for cryptographic purposes. For such application, the x86 emulator can be modified to provide an API to load x86 dynamic libraries and to provide a js-ctypes like API to call the C/C++ functions from javascript. A more advanced version would allow to use old DOS PC software such as games.
Done before with MIPS (Score:2, Informative)
This has been done before with JSMIPS - a Javascript MIPS system with well-implemented JIT optimizations. :)
See http://codu.org/jsmips/system.html. Even runs vi pretty well
Vital Stats (Score:5, Informative)
~ # cat
processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 4
model name : Pentium MMX
stepping : 3
cache size : 0 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : yes
coma_bug : no
fpu : no
fpu_exception : no
cpuid level : 1
wp : yes
flags
bogomips : 20.21
clflush size : 32
~ # cat
MemTotal: 30448 kB
MemFree: 26960 kB
Buffers: 2048 kB
Cached: 456 kB
SwapCached: 0 kB
Active: 2636 kB
Inactive: 64 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 8 kB
Writeback: 0 kB
AnonPages: 212 kB
Mapped: 324 kB
Slab: 700 kB
SReclaimable: 96 kB
SUnreclaim: 604 kB
PageTables: 36 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 15224 kB
Committed_AS: 456 kB
VmallocTotal: 1007592 kB
VmallocUsed: 0 kB
VmallocChunk: 1007592 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
~ # top
Mem: 3472K used, 26976K free, 0K shrd, 2048K buff, 472K cached
CPU: 0.5% usr 0.3% sys 0.0% nic 87.2% idle 0.0% io 6.2% irq 5.5% sirq
Load average: 0.08 0.04 0.01 1/12 78
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
78 75 root R 1136 3.7 0 12.7 top
75 1 root S 1156 3.8 0 0.0 sh
1 0 root S 1136 3.7 0 0.0
3 1 root SW< 0 0.0 0 0.0 [events/0]
4 1 root SW< 0 0.0 0 0.0 [khelper]
2 1 root SWN 0 0.0 0 0.0 [ksoftirqd/0]
5 1 root SW< 0 0.0 0 0.0 [kthread]
16 5 root SW< 0 0.0 0 0.0 [kblockd/0]
34 5 root SW< 0 0.0 0 0.0 [kswapd0]
35 5 root SW< 0 0.0