What's your OSDev AWWWW YEAH! moment?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: What's your OSDev AWWWW YEAH! moment?

Post by tsdnz »

After looking for more performance ( A lot of looking )..... I realised I was changing code just before a SYSRETQ call that used the changed code.
This caused a huge delay!!!!
I found where the cycles were going. Awesome!
Same user code as before, but the Kernel only changes the SYSRETQ entry code once.

If no context switching is required the Kernel can process just over 9 million queued messages per second per core.
From just over 2 million to just over 9.2 million, well worth tracking it down.
Great, averaging 202 cycles from user code to kernel to message queue, off message queue, a few checks, the back into user space.
Now I am happy, time to more on to the next step....
tsdnz wrote:Today tested the message queue, similar to Windows PostMessage.

With a 1.9 GHz machine
  • If no context switching is required the Kernel can process just over 2 million queued message per second per core.
  • If a context switch is required the Kernel can process just over 1 million queued message per second per core.
Used SysRetQ instead of IRETQ to enter ring 3, gaining around more speed.

Here is the User Program.

Code: Select all

volatile QWORD Me = 0x0;

void TestReentry()
{
	auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0);
	*t = Me;

	Me++;

	Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry);
};

void StartUserCode(void)
{
	auto t = (volatile QWORD*)Util.GetVirtualAddress_2m(100, 0, 0, 0);

	Me = 0x0;
	*t = 0x44;

	Cloud::SysCall_Queue(Cloud::tSysCall_Yeild_Option::YeildAlways, Cloud::tSysCall_Queue_Where::Append, TestReentry);
}
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

I finally got my ICH AC97 audio device working in VirtualBox. That makes 3 audio cards that I have working, at least in VirtualBox. I've tried HDAudio on real hardware and it just locks up, at the moment. I'll have to work on that later.

That only leaves the Ensoniq ES 1371 that I'm having a hard time figuring out, in VMWare.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

SpyderTL wrote:That only leaves the Ensoniq ES 1371 that I'm having a hard time figuring out, in VMWare.
lol who needs that?

I just passed over 5 new test cases in one afternoon! Not bad, especially considering that a lot of the functions that I wrote this morning are essential core functions. I also found a few bugs in yesterday's code, and once I had fixed those I passed like, 3 fairly complex test cases in one streak without a single bugfix (just goes to show how one buggy function can ruin a whole pile of good functions).
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

Finally got a bitmap memory allocator working. Took all morning and most of the afternoon. Had so many stupid bugs. Think I need to take a break from osdev for a few days now :-) .

Oh well, college will always make a nice break :-/ .
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
User avatar
Ycep
Member
Member
Posts: 401
Joined: Mon Dec 28, 2015 11:11 am

Re: What's your OSDev AWWWW YEAH! moment?

Post by Ycep »

I'm suprised what beast of computer have Max - 2800x1800 resolution using SUPER EXPENSIVE MAC!!!
Mac Mini in my country costs 1500 euros...
While iMac 21,5 inch costs about 2500 euros...
Last edited by Ycep on Wed Aug 03, 2016 6:26 am, edited 1 time in total.
SWGDev
Member
Member
Posts: 31
Joined: Wed Feb 10, 2016 3:29 am
Location: London, UK
Contact:

Re: What's your OSDev AWWWW YEAH! moment?

Post by SWGDev »

lukaandjelkovic wrote:I'm still an beginner for OS programming, but my happiest moment in my OS history (from December 2015/January 2016) was : my C++ Kernel executing.
Before that i just had bootloader coded in assembly.
After that i was pretty happy about my working keyboard driver, then my NIGUI (Non-interactive-graphical-user-interface) working.
I would scream that loud so everyone in my flat would hear me if my floppy driver suddenly get working.
Just suprised what beast of computer have Max - 2800x1800 resolution using SUPER EXPENSIVE MAC!!!
Mac Mini in my country costs 1500 euros...
While iMac 21,5 inch costs about 2500 euros...
Still an achievement! :)
BTW, prices are ridiculous. Even in my country mac mini (cheapest one) costs about 600 bucks. Well... Not from Apple Store or authorized re-seller, but still...
mmk
Posts: 8
Joined: Mon Aug 24, 2015 6:42 am

Re: What's your OSDev AWWWW YEAH! moment?

Post by mmk »

My best moment was when I got a (really) basic ELF loader working (some bugs to fix and features to add) and so I could load
a kernel module ELF executable from an initramfs and have it print "Hello module world"

Image
Techel
Member
Member
Posts: 215
Joined: Fri Jan 30, 2015 4:57 pm
Location: Germany
Contact:

Re: What's your OSDev AWWWW YEAH! moment?

Post by Techel »

Hey, I'm also working on an elf loader. :)
My first moment was when I finished the vm8086 and switched some video modes, my second will happen when this damned gcc is compiled.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

I just successfully redesigned my task switching logic from being a linked list to being a collection of Task objects. So I can now start new task by simply adding a Task object to a collection, and stop them by simply removing them from the collection.

This opens up a whole lot of opportunities going forward. The next thing I'll probably work on is to move my command parsing and execution logic out of the console application, and into its own static class, so that I can kick off commands on a separate background thread by doing something along the lines of:

Code: Select all

>System.GetTasks.Add(Task.Execute("Audio.GetDevices.First.Play(Storage.GetDevices.First.GetCdDrives.First.GetTracks.First.GetAudioReader)"))
To start playing the first track of an Audio CD in the background. Very cool! 8)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

SpyderTL wrote:I just successfully redesigned my task switching logic from being a linked list to being a collection of Task objects. So I can now start new task by simply adding a Task object to a collection, and stop them by simply removing them from the collection.

This opens up a whole lot of opportunities going forward. The next thing I'll probably work on is to move my command parsing and execution logic out of the console application, and into its own static class, so that I can kick off commands on a separate background thread by doing something along the lines of:

Code: Select all

>System.GetTasks.Add(Task.Execute("Audio.GetDevices.First.Play(Storage.GetDevices.First.GetCdDrives.First.GetTracks.First.GetAudioReader)"))
To start playing the first track of an Audio CD in the background. Very cool! 8)
It sounds like your OS has a very cool internal (and possibly external?) API. What language is it written in?
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: What's your OSDev AWWWW YEAH! moment?

Post by Roman »

SpyderTL's OS is written in C#. His signature contains a link.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

Roman wrote:SpyderTL's OS is written in C#. His signature contains a link.
Sort of. :)

I've essentially written my own language using XML, XSD and XSLT files. I only use C# to run the XSLT transforms, and to calculate memory addresses, and format output files for specific platforms. I could just as easily do this part in Java or Python.

I basically define all CPU instructions and platform memory locations in XML files (essentially name/value pairs), and then use XSLT files to transform any references to those names into the corresponding hex values. Then, I add more layers of XSLT transforms on top of that, and use C# code to recursively convert high level XML elements (<console:WriteLine>Hello, World!</console:WriteLine>) into low level XML elements (<cpu:WriteALToDXPort/>), and finally I use C# code to write these low level hex values to a file (or physical disk, if I'm feeling brave that day.)

Although, I wouldn't call it "cross-platform", I do have XML files defined for several different platforms, so I can actually build projects for x86, ARM, NES, SNES, N64, GameBoy, GBA, Windows, Java, .NET, and pretty much any other platform that I can find an emulator (and documentation) for. Eventually, I hope to have a very high level layer that truly is cross-platform, that will compile down to several different platforms, but I'm still quite far from that particular goal.

If nothing else, all of my files are in XML, so they should be fairly easy to transform into other languages, if you wanted to use them to build, say, your own emulator.

onlyonemac wrote:It sounds like your OS has a very cool internal (and possibly external?) API.
My goal was to build an OS that booted faster than MS-DOS, but had more built-in functionality than Windows does, out of the box. If you've ever used PowerShell, or the Immediate Window in Visual Studio, this is what I was shooting for. I want a simple object-oriented command line, with a large number of built in "classes" that can be combined to perform most every day tasks, like downloading files, reading web pages, playing video and audio streams, rendering 3D models, etc.

I also wanted to completely rethink OS development using modern tools and practices, in order to avoid inheriting any "legacy" patterns that most OS designs (even most indie OS designs) may gravitate toward. So, the system is built around Objects, Classes and Stream Readers, instead of traditional Files, File Systems, and Memory Buffers.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by onlyonemac »

In other words, you've defined your own XML-based cross-platform language, and written a basic compiler for it in C#.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

onlyonemac wrote:In other words, you've defined your own XML-based cross-platform language, and written a basic compiler for it in C#.
Yes, but it sounds better the way I said it, considering I've been working on it for about 7 years now... :)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your OSDev AWWWW YEAH! moment?

Post by SpyderTL »

AWWW YEAH!!!

I just successfully ran my first multiprocessor code on both Bochs (16 processors) and VirtualBox (4 processors).

It's all going according to my plan! :mrgreen:

EDIT: All processors are now running in 32-bit mode!

AWWW YEAH!!!
Last edited by SpyderTL on Thu Jul 14, 2016 7:11 pm, edited 1 time in total.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Post Reply