Modos

[Modular Operating System]

  • (2 Pages)
  • +
  • 1
  • 2

24 Replies - 4823 Views - Last Post: 03 April 2012 - 09:38 AM

#16 sbell1099  Icon User is offline

  • Inspiring StoryTeller
  • member icon

Reputation: 16
  • View blog
  • Posts: 685
  • Joined: 28-October 08

Re: Modos

Posted 08 June 2009 - 02:55 PM

lol
Edit:
You will need to find an ELF loader so that you can load you kernel etc

This post has been edited by sbell1099: 08 June 2009 - 06:18 PM

Was This Post Helpful? 0
  • +
  • -

#17 JavaNerd  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 103
  • Joined: 22-December 08

Re: Modos

Posted 08 June 2009 - 05:50 PM

Glad to see progress :)
Was This Post Helpful? 0
  • +
  • -

#18 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Modos

Posted 09 June 2009 - 07:19 AM

Nice... How's it going? I started making an OS ("Utopia") that's aim was to create a very scalable HTTP/FTP server for basic (and *EXTREMELY* low resource) usage.

It was pretty, but no time to continue development as of yet.

Posted Image
Was This Post Helpful? 0
  • +
  • -

#19 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: Modos

Posted 09 June 2009 - 08:54 AM

View Postsbell1099, on 8 Jun, 2009 - 04:55 PM, said:

lol
Edit:
You will need to find an ELF loader so that you can load you kernel etc

His kernel is probably just a binary blob right now so he doesn't need a loader. If he uses GRUB then I'm pretty sure it will handle loading his kernel regardless of the format it is in.
Was This Post Helpful? 0
  • +
  • -

#20 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,306
  • Joined: 07-September 06

Re: Modos

Posted 11 June 2009 - 11:56 PM

Before I need to worry about any of that (ELF or Kernel loading) I need to get a bin to successfully copy a file into memory and execute it. At this point that is where I have been stuck for the last couple of days...

I don't think I will be using Grub, as I have heard from multiple places that I will eventually be required to come up with a custom bootloader and bootsector for the OS, so I think I am going to try to get that done in the first place. I just hope it isn;t the death of me :)
Was This Post Helpful? 0
  • +
  • -

#21 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,306
  • Joined: 07-September 06

Re: Modos

Posted 17 March 2012 - 04:29 PM

Time for a great big necro :) Thankfully this is actually my topic and I am not some new member.

So, I started working on modOS again and hve made a significant amount of progress in comparison to where I was previously.

At this point I have a basic memory manager in place (malloc, new, new[], delete[], and free are all implemented), interrupts up and working (PITs and Hardware interrupts), keyboard input (basic stuff, doesn't work with all characters at the moment, but all lower-case characters can be typed and displayed). For the moment I am using bochs to load the kernel and act like a bootloaded (as it does it for me), then I am using the CMOS method to figure out how much memory I have available and breaking that up into at most 64-KB blocks, which I can malloc and free from (in fact I am creating a "virtual" memory address for the keyboard driver I am using -- granted, I haven't implemented paging or virtual memory as of yet -- hopefully soon). For the moment I am using first-fit, but that is just because it is easy and quick to implement. I am planning on recoding it to worst-fit (which actually is better for use as it leaves larger average chunks instead of the possibility of a lot of small holes that don't work for other allocs).

I also have some screen shots to show:
The current boot screen:
Attached Image
And some keyboard input:
Attached Image

With any luck I will get to VGA mode here soon and have some images to show (I will probably do that before paging and virtual memory tables).

For those of you who haven't read through the related threads or simply don't remember, modOS is going to be a modular operating system (hence the name) and is written in C++ (except for the assembly portions). At the moment I am burning a floppy image for boot, but I am hoping to roll my own bootloader here at some point and get it burning to an iso for CD boots.
Was This Post Helpful? 4
  • +
  • -

#22 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: Modos

Posted 17 March 2012 - 04:43 PM

Attached Image

Since this is to be modular, are you going for a microkernel design? Or are you thinking more like Linux (monolithic with loadable modules, pluggable scheduler, etc)?
Was This Post Helpful? 1
  • +
  • -

#23 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,306
  • Joined: 07-September 06

Re: Modos

Posted 18 March 2012 - 10:05 AM

At the moment I am planning on going towards more of a micro kernel, but who knows. I may build it as a bit of both though (have some services running on the kernel proper and others on the user space).

However I have recently (last night) found that bochs is putting me directly into protected mode, meaning that I can't actually find out how much memory I have (though I can find some of it -- about 4 MB) (Oh, and I can't get to VGA-256 mode either), so instead of attempting to return to real mode I think I may just attempt to do a nice and simple bootloader (something that finds the amount of ram and which monitor modes are available to me, then get to protected mode, load the kernel and jump to it (doesn't sound that difficult, we shall see).

My current goal is to get modOS up and running in VMWare instead of bochs, now I just need to get there...
Was This Post Helpful? 0
  • +
  • -

#24 Mike Chambers  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 59
  • Joined: 30-March 09

Re: Modos

Posted 18 March 2012 - 03:54 PM

cool, i love OS projects. a good way to figure out how much RAM you have is when your kernel first starts running, set up a single flat segment descriptor from 0 and make it's limit 4 GB (max addressable RAM with 32-bits). then in 1 KB or 1 MB increments you can write a pattern into RAM locations and then read it back. if the pattern is where you wrote it, there is still physical memory at that point. do this until you can't read back the proper pattern.

i've done an OS myself, it uses real-mode but it does do multitasking and has multiple virtual terminals and pseudo-terminals. i felt the hardest part was handling file systems.
Was This Post Helpful? 1
  • +
  • -

#25 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,306
  • Joined: 07-September 06

Re: Modos

Posted 03 April 2012 - 09:38 AM

Now that I have written my bootloader script, it seems to have thrown me a ways back. My strings are no longer in the correct place (or at least I can't read them) even though I have my rodata section in the linker script as it should be and other than that I haven't been able to get things back to their previous point.

I also found that I had a number of errors in the OS code which caused my OS to panic when run in VMWare that bochs allowed to work anyways. So I have stripped the OS down to its most basic points and am attempting to solve the problems as I go (just need to fix the string issue when I can repair the IDT, etc.) until I get back to the point I was previously in... Though it is currently going VERY slowly, and I am actually considering trashing the project and starting from scratch with it. Hopefully it doesn't get to that point, but I think that's what I'll end up doing if I haven't solved this problem by next week (sad day).

<edit>
For anyone who is also having this problem, or wants to see what the source (ugly as it is) currently looks like (stripped down to the essentials for the error to appear) it is all here.
</edit>
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2