Singularity source code available for download

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Singularity source code available for download

Post by Colonel Kernel »

http://www.codeplex.com/singularity

Now we can see how it actually works...
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

Hmm... I was wondering if they would ever open source it yesterday. Maybe MS have been reading my thoughts ;)

Anyway, I'll be taking a look over it later today
jzgriffin
Member
Member
Posts: 190
Joined: Tue Sep 26, 2006 1:40 pm
Libera.chat IRC: Nokurn
Location: Ontario, CA, USA
Contact:

Post by jzgriffin »

Singularity seems to be an interesting project. I've been following their progress for several months now. This was mentioned earlier on IRC, but I haven't had time to look at the code yet. Thanks for posting a link, I'd forgotten to bookmark it.
senaus
Member
Member
Posts: 66
Joined: Sun Oct 22, 2006 5:31 am
Location: Oxford, UK
Contact:

Post by senaus »

Oooh, I've been waiting for this :D

Now I've got decent bedtime reading material :)

Code: Select all

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M/MU d- s:- a--- C++++ UL P L++ E--- W+++ N+ w++ M- V+ PS+ Y+ PE- PGP t-- 5- X R- tv b DI-- D+ G e h! r++ y+
------END GEEK CODE BLOCK------
User avatar
astrocrep
Member
Member
Posts: 127
Joined: Sat Apr 21, 2007 7:21 pm

Post by astrocrep »

Anyone tried to get it up and running?

Or better yet... build it?

I am very excited to dive into the code and take a look around!

-Rich
Mouse Pad - Coming in the distant future...
Kernel: Indigo Kernel - v0.0.1

Thanks to JamesM and BrokenThorn for there tutorials!
User avatar
lollynoob
Member
Member
Posts: 150
Joined: Sun Oct 14, 2007 11:49 am

Post by lollynoob »

Looking at the bootloader right now, and so far (from the bootsectors and singldr) it looks pretty awful.

Code: Select all

shl     eax, 5                  ; (assume no overflow)
Sounds safe.

Code: Select all

else if (startKB + sizeKB >= Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR / 1024ul) {
      sm[i].size.hi = 0;
      sm[i].size.lo = Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR - startKB * 1024;
Loving the concise constant names.

Code: Select all

BdPrintString("-------------------------------------------------------------------------------\n", 80);
Nice horizontal rule!

I'm not sure if this is some sort of weird publicity stunt or what, but a lot of it looks really hackish and generally bad.

Edit: I guess they learned C and ASM on the fly or something; the C# parts (the kernel and whatnot) actually look pretty nice. As nice as object-oriented code can look, anyways.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

lollynoob wrote:

Code: Select all

else if (startKB + sizeKB >= Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR / 1024ul) {
      sm[i].size.hi = 0;
      sm[i].size.lo = Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR - startKB * 1024;
Loving the concise constant names.
My God. 'Struct_Microsoft_Singularity_BootInfo_MAX_VIRTUAL_ADDR'? They're ... kidding .. aren't they?
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
os.hacker64
Member
Member
Posts: 149
Joined: Mon Feb 11, 2008 4:43 pm
Location: Limbo City,Afterlife

Post by os.hacker64 »

:shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock:
Kanu Operating System
Working on:Paging and Multitasking

BURN /\/\1(40$0|=7
jzgriffin
Member
Member
Posts: 190
Joined: Tue Sep 26, 2006 1:40 pm
Libera.chat IRC: Nokurn
Location: Ontario, CA, USA
Contact:

Post by jzgriffin »

You never read the leaked source code for Win2k or WinNT, or even any Microsoft code examples? They love ridiculously long and obvious names. Either my ability to tell jokes from seriousness sucks, or they actually considered naming IE8 "IE Desktop Online Web Browser Live Professional Ultimate Edition for the Internet" (source). It certainly sounds Microsoft-ish.

Anyways, I'm back in Windows for the first time since Feb. 24th, so I'll see if I can compile it while I'm here.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

I'm betting those long names are required for using C# constructs from C++ or asm. Most likely the C# namespaces get munged into long_names_with_underscores in the symbol table.

@lollynoob: You realize this is a research OS and not a commercial product, right?
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
jzgriffin
Member
Member
Posts: 190
Joined: Tue Sep 26, 2006 1:40 pm
Libera.chat IRC: Nokurn
Location: Ontario, CA, USA
Contact:

Post by jzgriffin »

I just looked at a hex dump of a C# executable produced by gmcs. There were no long underscored names like that. It's a Microsoft thing.

Anyways, I lost interest in the code. It's not as fancy and clean looking as I imagined, sadly.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Jeremiah Griffin wrote:I just looked at a hex dump of a C# executable produced by gmcs. There were no long underscored names like that. It's a Microsoft thing.
Yes, exactly. Singularity's dialect of C# is compiled with Bartok, which emits native code, not assemblies containing IL as gmcs and friends do.
Anyways, I lost interest in the code. It's not as fancy and clean looking as I imagined, sadly.
In my experience, no kernel code is. It's just a grotty, detail-infested kind of domain to work in. :P If you want elegance, look at compilers for higher-level languages (written in those same languages) instead. ;)
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

I haven't dived into the code yet, but I've got it up and running with Virtual PC. The PDF in the source .zip details everything you need to do pretty well, except netbooting with VPC: You need to do

Code: Select all

boottest.cmd /net singularity.vmc
That starts up the netboot server program automatically (you need to have done the loopback setup stuff).

If you build everything (the World target), however, it takes eons to start from the netboot server.

Oh and one more thing, WinDbg is evil to work with ;)
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

Just uploaded some screenshots of it here

Managed to get the webserver "working", it's a bit rusty but it seems to work, you can see it in sing5.jpg. Sorry about the bad quality of the JPGs, all I had was Paint and it likes to save JPGs in crap quality.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

Jeremiah Griffin wrote: Anyways, I lost interest in the code. It's not as fancy and clean looking as I imagined, sadly.
FYI, another c# os http://gocosmos.org/

--
PS: i haven't looked at both os c# code.
Post Reply