|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
|
|||
Assembly and kernel programming.
What's the different of assembly language and kernel programming? Any suggested sources??
|
|
|||
The first is a language and the second is not.
You write code for the kernel in the second case. It's usually done with C but a smattering of assembly language can be found. In case you are confused about what the 'kernel' is, that's the core of the operating system that handles all system functions and communications between processes. Last edited by drhowarddrfine; 22nd April 2009 at 02:28 PM. |
|
|||
I, like bsdnewbie999 am interested in programming for a BSD kernel, but I do not know where to start. (I am not trying to hijack this thread, mind you.)
I have just one, simple question: FreeBSD's online documentation has a few sections on programming kernel modules (syn. drivers), but would that knowledge carry over to other BSDs (namely OpenBSD)? Is the BSD kernel a standardized thing, across various BSDs? |
|
|||
Begin by reading the kernel's source followed by reading it more. Unfortunately, you are seeing multiple issues at the same time:
Last edited by ocicat; 22nd April 2009 at 04:14 PM. |
|
|||
Quote:
FreeBSD for example has a totally different SCSI layer then the other BSD's.. They may still share some common code, it's becoming less easy to port drivers between them.. definitely not plug and play. NetBSD and OpenBSD have a kernel module framework called lkm(4), it is supported by both.. but it simply offers a way for modules to be loaded, such modules are free to use kernel functions/symbols which again may not be available or compatible between the two systems. Also, while OpenBSD does still support lkm(4).. it is not an active utilizer of it.. as jggimi said, the kernel is monolithic and all supported drivers are compiled into the default kernel binaries. FreeBSD has deprecated lkm(4) in favour of their own framework.. they call it kld(4). @bsdnewbie999, That kind of question could have been answered easily using a search engine.. was it really necessary to waste our time? Last edited by BSDfan666; 22nd April 2009 at 04:02 PM. |
|
|||
BSDfan666, jggimi, thank you both, very much, for your responses.
|
|
|||
indienick, I asked pretty much the same question from Marc Balmer (OpenBSD dev) and he suggested that I read the Design and implementation of 4.4BSD operating system and the Advanced Unix programming in Unix environment. This should give pretty good basis and then the kernel code would slowly start to make sense
The first book has bit old information but most of it should describe how things work on OpenBSD too. |
|
||||
If you have an interest in kernels, I would suggest digging up John Lions' commentary on UNIX 6th Edition, with Source Code*. The book covers a very old version of UNIX, C, and PDP assembly; but it offers a *much* less complex beast to study then the modern BSD or Linux kernels have become.
The best introduction to the modern kernels that I know of, is to poke around the source code, see where things are located, and find out how something you are interested in works; exempli gratia learn how the system goes from CPU power on, to allowing multiple users to login**. Or perhaps study how the the kernel executes programs***. You can even poke around various sub systems and drivers; the implementation of FAT file systems is a nice and simple file system to study compared to modern FSes. * http://en.wikipedia.org/wiki/Lions%2...th_Source_Code ** I found writing notes on that very fun and mildly educational. *** Doing that is a fun exercise
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Wonderful! Thank you very much, Zmyrgel.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
learn assembly | ephemera | Book reviews | 5 | 26th December 2012 06:29 PM |
Undertaking computer science degree, which BSD for learning professional assembly? | lionsong | Programming | 15 | 18th October 2009 11:26 PM |
Java and AI-programming | idefix | Programming | 4 | 7th February 2009 01:41 PM |
c programming - Modules | corey_james | Programming | 3 | 6th November 2008 08:49 PM |
GUI Programming | bsdnewbie999 | Programming | 6 | 17th August 2008 12:19 AM |