Page 1 of 1
What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 7:42 pm
by Synon
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.).
Re: What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 8:50 pm
by thepowersgang
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.
Re: What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 9:02 pm
by Synon
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.
I was considering the TCP/IP stack and network driver as the same thing.
Re: What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 9:39 pm
by gravaera
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
Re: What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 9:54 pm
by Synon
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
I won't need proper memory management for a terminal emulator, will I?
Also, how difficult is an ATA/IDE/SCSi driver?
Re: What was the hardest thing to implement?
Posted: Sat Jun 26, 2010 11:54 pm
by pcmattman
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
Re: What was the hardest thing to implement?
Posted: Sun Jun 27, 2010 12:56 am
by gravaera
Synon wrote:
I won't need proper memory management for a terminal emulator, will I?
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.
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
Re: What was the hardest thing to implement?
Posted: Sun Jun 27, 2010 3:49 am
by Creature
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
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.
Re: What was the hardest thing to implement?
Posted: Sun Jun 27, 2010 6:12 am
by XanClic
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.