Linked by iseyler on Thu 7th Apr 2011 18:31 UTC
OSNews, Generic OSes BareMetal Node is a HPC platform based off of BareMetal OS. The kernel binary on the nodes is 6KiB and mainly contains the network and disk drivers. A C or Assembly program can make use of all available CPU cores via the Orchestrator program that controls what the nodes are working on.
Permalink for comment 469820
To read all comments associated with this story, please click here.
Not that impressive...
by Megol on Mon 11th Apr 2011 20:58 UTC
Member since:

"we can achieve a runtime speed that is not possible with higher-level languages like C/C++, VB, and Java."?
Can, yes. But not with the kind of code used.
The source code feels like 8086 code with 64 bit thrown in for fun. 8086 type code isn't efficient on modern cores but can give small code size.
But not as used in this project.

In an initialization file (init_64.asm) 960kiB of memory is cleared. It's not in a critical path.
Their code:
mov rdi, os_SystemVariables
xor rcx, rcx ; 2 bytes (1 if assembler optimizes)
xor rax, rax ; 2 bytes ( -"-)
stosq ; 2 bytes
add rcx, 1 ; 4 bytes
cmp rcx, 122880 ; 7 bytes
jne clearmem ; 2 bytes

My code, being smaller, faster and IMHO cleaner:
mov rdi, os_SystemVariables

mov ecx, 122880; 5 bytes
xor eax, eax ; 1 byte, eax=0
rep stosq ; 3 bytes

Another example in kernel64.asm, in the ap_clear routine.
; Get local ID of the core
mov rsi, [os_LocalAPICAddress]
add rsi, 0x20 ; 4 bytes
lodsd ; 1 byte
shr rax, 24 ; 4 bytes - shr eax, 24 is analogous

My code:
mov rsi, [os_LocalAPICAddress]
movzx eax, byte [rsi+0x23] ; 4 bytes

Reply Score: 1