OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 9:26 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12  Next
Author Message
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Nov 17, 2015 7:04 pm 
Offline
Member
Member

Joined: Sun Jun 16, 2013 4:09 am
Posts: 333
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:
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);
}


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Fri Nov 27, 2015 7:10 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sat Nov 28, 2015 10:15 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Sun Nov 29, 2015 10:55 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 07, 2016 3:30 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 401
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.

Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 07, 2016 9:15 am 
Offline
Member
Member

Joined: Wed Feb 10, 2016 3:29 am
Posts: 31
Location: London, UK
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...

_________________
Software development blog
Mobile Development Team
Web Development Team
UX/UI


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Wed Jun 08, 2016 5:29 pm 
Offline

Joined: Mon Aug 24, 2015 6:42 am
Posts: 8
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Wed Jun 08, 2016 10:07 pm 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
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.


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Jun 27, 2016 12:09 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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:
>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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 28, 2016 12:44 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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:
>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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 28, 2016 8:54 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 28, 2016 9:46 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 28, 2016 11:07 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Tue Jun 28, 2016 12:12 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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


Top
 Profile  
 
 Post subject: Re: What's your OSDev AWWWW YEAH! moment?
PostPosted: Mon Jul 11, 2016 9:38 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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!!!

_________________
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


Last edited by SpyderTL on Thu Jul 14, 2016 7:11 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 178 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group