Why do you write a kernel?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
miaowei
Member
Member
Posts: 84
Joined: Wed Dec 18, 2013 9:10 am

Why do you write a kernel?

Post by miaowei »

Hi, every one.
I want to know how did the thought arise in your heart that you should write an os kernel ?

I write it because i need a way to learn linux kernel and finally get a relevant job.
Some people read to learn . I choose to write.

Of course , there exist some reasons I choose os development as my job:
I like to program under command line, because that way, i can use my lovely total-reflection screen(It doesn't emit light.. i don't know its english name) and e-ink screen, which both perform badly in GUI environment . But they are good for eyes.

And, i don't like writing 'app' or computer games, because i think in that field, programming is not the first thing, a product designer should be more important than programmers.

Maybe i should start my natural science research career in my nineteen :)

What's your reason? Might you tell me ?
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Why do you write a kernel?

Post by iansjack »

miaowei wrote:Hi, every one.
I want to know how did the thought arise in your heart that you should write an os kernel ?
Because it wasn't there.
miaowei
Member
Member
Posts: 84
Joined: Wed Dec 18, 2013 9:10 am

Re: Why do you write a kernel?

Post by miaowei »

iansjack wrote:
miaowei wrote:Hi, every one.
I want to know how did the thought arise in your heart that you should write an os kernel ?
Because it wasn't there.
Did i make grammar mistakes?
I should use 'why did ..", not 'how did .." ?
sebihepp
Member
Member
Posts: 190
Joined: Tue Aug 26, 2008 11:24 am
GitHub: https://github.com/sebihepp

Re: Why do you write a kernel?

Post by sebihepp »

After I learned programming I was asking myself, how to write code on the lowest level. There had to be a way to execute code without an Operating System. I wanted to know how the hardware is really programmed. How to read from HD? How to access PCI cards? How is all this working together. And how is everything connected electrically? What, if I only have the hardware but no mainboard or any software?

So it was interessted and began to learn digital electronics and microcontroller for hardware, and learning programming an os for the software part. The electronic side is finished now. I know most about it and the rest I can learn myself or search for in the internet. I designed a CPU in a FPGA, I designed circuit boards and realized a "Happy Brithday" playback device, Temperature sensor, using displays, generating VGA signals, programming microcontrollers and, the most important thing, how to read datasheets. (manual for electronic things, mostly digital ICs)
I know about signal delay and the problems of high frequency, etc.

Now I want to programm the hardware directly. I want to control the graphics card and display text and images, read and write from and to harddisk, cdrom, memory... I want to program a Filesystem and enumerate the PCI bus... and so on.

My goal is a small console which can run programs (compiled with gcc). The programs should be able to get fully access to the hardware, so I can quickly try and test things. But to run programs I need more things and a stable specified environment. So I decided to create a small OS for this purpose.

I like what I've learned and what I am still learning on the way there. Today I use Grub to boot a multiboot compatible kernel that uses Paging and Interrupts. One Timer is used for the minimalistic Scheduler and another one for updating the system time via RTC/CMOS. I have a fully working physical and virtual memory manager and I am able to create new threads in kernel or user space.
In future I will program the APIC, VGA, PCI, CDRom, Harddisk, Sound, Filesystem and a console. The exact list of what is planned is on my computer at home.

Next thing is to extend the Scheduler and extend system calls for process handling. And that's were... lets say I lack of motivation in the past half year. After that I plan to implement VGA and PCI. But first I need to wait until I get motivated. :-D

-------------------

Or to say all this in one sentence: I started programming an OS for educational and entertainment purpose. :-)
User avatar
osdever
Member
Member
Posts: 492
Joined: Fri Apr 03, 2015 9:41 am
Contact:

Re: Why do you write a kernel?

Post by osdever »

Just for fun.
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
miaowei
Member
Member
Posts: 84
Joined: Wed Dec 18, 2013 9:10 am

Re: Why do you write a kernel?

Post by miaowei »

sebihepp wrote:After I learned programming I was asking myself ...Or to say all this in one sentence: I started programming an OS for educational and entertainment purpose. :-)
designing and making a cpu with electronic components like 74HC should be interesting. I also have interest to do such thing in future.

But writing device driver(i.e. what you said, program on hardware) is quite boring, at least for me . During my teenage, i spent quite a lot time on chemistry, I finally didn't to take it as my career, but it seems take away all my curiosity.
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: Why do you write a kernel?

Post by onlyonemac »

I wanted to experiment with some new concepts in OS design.
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
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: Why do you write a kernel?

Post by klange »

My university offered a course, through the Electrical and Computer Engineering department, in operating systems, which involved a major group project of building a simple OS. I was not allowed to take that course, because I had already received credit from another course that conflicted. I started my OS project out of spite. I graduated four years ago, but the project continues.
User avatar
Mikumiku747
Member
Member
Posts: 64
Joined: Thu Apr 16, 2015 7:37 am

Re: Why do you write a kernel?

Post by Mikumiku747 »

I was interested in low level programming after messing around with Microcontrollers like the ATMega386 and such, and wanted to take on a slightly larger project than logic for some sensor or LEDs. After looking around for a while I thought operating systems might be what I was looking for, and then I stumbled upon the wiki (after seeing a few of those cringeworthy "Make your own OS" sites which let you change the window style of the desktop...), and that was where I really found some nice info and got started on my own kernel like everyone else here.

- Mikumiku747
User avatar
crunch
Member
Member
Posts: 81
Joined: Wed Aug 31, 2016 9:53 pm
Libera.chat IRC: crunch
Location: San Diego, CA

Re: Why do you write a kernel?

Post by crunch »

miaowei wrote:
sebihepp wrote:After I learned programming I was asking myself ...Or to say all this in one sentence: I started programming an OS for educational and entertainment purpose. :-)
designing and making a cpu with electronic components like 74HC should be interesting. I also have interest to do such thing in future.

But writing device driver(i.e. what you said, program on hardware) is quite boring, at least for me . During my teenage, i spent quite a lot time on chemistry, I finally didn't to take it as my career, but it seems take away all my curiosity.
I'm actually a biochemist as my day job. Having a programming background is extremely beneficial if you choose to go into this field - there is a ton of computational analysis work to be done, and not many scientists that are good at programming. However, most of that is going to be high-level language work.
Most of my day-to-day is just normal bench work.
sebihepp wrote:After I learned programming I was asking myself, how to write code on the lowest level. There had to be a way to execute code without an Operating System. I wanted to know how the hardware is really programmed. How to read from HD? How to access PCI cards? How is all this working together. And how is everything connected electrically? What, if I only have the hardware but no mainboard or any software?
This is exactly why I started writing my OS as well. It's the same reason that drove me to my field of study today - how do things work on the lowest level?
Well, actually I first started on it 9 years ago back when I was in high school and then totally forgot about it during college etc. I'm not sure what prompted me to come back... better programming skills?
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Why do you write a kernel?

Post by Schol-R-LEA »

My original goal was driven by precisely the sort of pure egotism I often criticize others for today: I saw the existing systems of the time (which in 1986 would have been mainly MS-DOS, though I had some very limited exposure to Xenix, AppleDOS, TRS-DOS, GEM, and early versions of MacOS), and with the utter lack of foresight typical of someone in their late teens, decided "I can do better than this". It took me another ten years before I could find even a small part of the information I would need, and by the early 2000s my interest had shifted towards more experimental ideas, while I had matured enough that I realized just how ridiculous my teenaged ambitions really were. I am now focused on exploring new approaches, rather than trying to take over the world, though in practice most of what I actually do is give advice and information (of often dubious quality, I must admit) to those who were where I had been thirty years ago.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
MichaelFarthing
Member
Member
Posts: 167
Joined: Thu Mar 10, 2016 7:35 am
Location: Lancaster, England, Disunited Kingdom

Re: Why do you write a kernel?

Post by MichaelFarthing »

Just for fun.
User avatar
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: Why do you write a kernel?

Post by Octacone »

Learning purposes + fun + self made OS I am willing to use
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
miaowei
Member
Member
Posts: 84
Joined: Wed Dec 18, 2013 9:10 am

Re: Why do you write a kernel?

Post by miaowei »

crunch wrote: there is a ton of computational analysis work to be done
biochemistry. I can image it :)
miaowei
Member
Member
Posts: 84
Joined: Wed Dec 18, 2013 9:10 am

Re: Why do you write a kernel?

Post by miaowei »

Schol-R-LEA wrote:I am now focused on exploring new approaches, rather than trying to take over the world, though in practice most of what I actually do is give advice and information (of often dubious quality, I must admit) to those who were where I had been thirty years ago.
" I'd just be the catcher in the rye and all."
Post Reply