This isn't really a "HELP ME" question so I put it in the semi-off-topic section.
Just out of interest, what was the hardest thing in your kernel(s) to implement?
I'm anticipating that the network driver will be the most difficult (I'm not writing an OS (yet), just a bootable terminal emulator so it only needs a keyboard, screen and network driver.).
What was the hardest thing to implement?
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: What was the hardest thing to implement?
Sofar for me it's been a tie between TCP and UDI
The network driver itself was rather simple, it's the protocols that run on top of it that are hard.
As for UDI, I just can't seem to get my head around it, but I reckon I will get it eventually.
The network driver itself was rather simple, it's the protocols that run on top of it that are hard.
As for UDI, I just can't seem to get my head around it, but I reckon I will get it eventually.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Re: What was the hardest thing to implement?
I was considering the TCP/IP stack and network driver as the same thing.thepowersgang wrote:Sofar for me it's been a tie between TCP and UDI
The network driver itself was rather simple, it's the protocols that run on top of it that are hard.
As for UDI, I just can't seem to get my head around it, but I reckon I will get it eventually.
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: What was the hardest thing to implement?
Proper memory management is one of the biggest obstacles you'll face, IMHO. Your definition of "proper" memory management could be very different from mine, though. But after you've done a proper MM, you should really have no further hassles with the actual kernel. Leaving the kernel though, yes: I agree that networking would be the next most challenging thing, though I'm nowhere close to networking in my current kernel.
--Nice topic,
gravaera
--Nice topic,
gravaera
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: What was the hardest thing to implement?
I won't need proper memory management for a terminal emulator, will I?gravaera wrote:Proper memory management is one of the biggest obstacles you'll face, IMHO. Your definition of "proper" memory management could be very different from mine, though. But after you've done a proper MM, you should really have no further hassles with the actual kernel. Leaving the kernel though, yes: I agree that networking would be the next most challenging thing, though I'm nowhere close to networking in my current kernel.
--Nice topic,
gravaera
Also, how difficult is an ATA/IDE/SCSi driver?
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: What was the hardest thing to implement?
I would say the hardest thing I've personally dealt with in OS development would have to be a tie between TCP and a POSIX subsystem.
The only planned feature I'm particularly worried about being difficult is page swapping to disk. That'll be fun when I finally get to it
The only planned feature I'm particularly worried about being difficult is page swapping to disk. That'll be fun when I finally get to it
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: What was the hardest thing to implement?
Well, that depends on how meticulous you are about design: it's unlikely that you load your kernel into low memory, where the VGA function's framebuffer resides, and it's also unlikely that you load it into the very high reaches of the physical address space to make it easier to access PCI; From a pure design standpoint, the idea of mapping your kernel out in virtual memory as reaching backwards one whole megabyte on every architecture simply because it's convenient to do that on the IBM-PC is unacceptable.Synon wrote: I won't need proper memory management for a terminal emulator, will I?
Proper design would dictate that you not have the 1st 1MB mapped along with the kernel, and that your memory manager be called by whichever code handles the video device to map the relevant video device into its address space. So with that in mind, you would need a virtual memory manager before you have access to arbitrary locations in RAM, such as the VGA framebuffer, or a VBE framebuffer, or a PCI graphics card framebuffer. Demand mapping is way more efficient since you can free up space in the kernel address space (assuming you use monolithic modules) when the VGA driver isn't actually functioning.
Again, it all depends on how stringent your rules about proper design are
--All the best,
gravaera
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: What was the hardest thing to implement?
I agree. At first it may seem simple, but creating a fully working (as in, it works as intended and correctly) MM (PMM, VMM, heap, possibly involving multithreading/multitasking) is a much larger task than it seems at first. Usually there are a lot of cases in e.g. heaps you didn't expect at first which turn out to be problematic later, after which you will need to come back and fix them.gravaera wrote:Proper memory management is one of the biggest obstacles you'll face, IMHO. Your definition of "proper" memory management could be very different from mine, though. But after you've done a proper MM, you should really have no further hassles with the actual kernel. Leaving the kernel though, yes: I agree that networking would be the next most challenging thing, though I'm nowhere close to networking in my current kernel.
--Nice topic,
gravaera
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Re: What was the hardest thing to implement?
As for me, it is/was USB. Getting network just working (pretty ugly TCP/IP stack for IRC) was a lot easier and can be achieved in a week, I think.