My question is more related to Unix/Linux development rather than administration itself.

I think its directed for Unix/Linux low level system programmers rather than administrators. It will help me start kernel development and/or understanding Linux system development

What information specifically about the hardware do I need to start learning about how Linux interacts with hardware peripherals and modules. For example, the bus architecture and how to communicate with controllers.

Also, I'd like to mention that in most environments now the virtual machine is what Linux runs on. So, what is seen by the OS below it that's what I meant.

I need some references, please, or how to start learning about that.

I know basic x86 instructions but my questions is more about the memory and buses controllers around the processor itself; the programmer model I mean in the modern parallel programming environment.

  • Do you want to focus on kernel development or kernel module development? Or just get an overall understanding of all the pieces that goes into a linux based OS? – hakskel Mar 12 '20 at 19:11
  • for example if you click on an image file .. after the image is decompressed and a bitmap is obtained .. how does the OS send the bit map to the display adapter to be displayed on screen .. I have done some search I found on intel machines that there is what called memory mapped io in protected mode ... my question does these ranges vary with manifacturer ? or have standards ? how to use these ranges to do low level io – AbdAllah Talaat Mar 12 '20 at 19:40
  • 1
    Take a look at Linux Device Drivers, Third Edition. It's a bit dated now, but I think it's still very relevant: lwn.net/Kernel/LDD3 The whole thing is relevant to what you're asking at a high level, but specifically see Chapter 9 Communicating with Hardware. – Andy Dalton Mar 12 '20 at 21:45

How that works depends a lot on the architecture/machine. Linux (the kernel) creates a tree mapping the devices available and their connections on boot (and as plugged in devices appear/dissapear). Where the information comes from depends on the underlying hardware.

Other operating systems running on the same machine will have their own way of doing this, if they are meant to be very portable, they probably use a similar approach.

Mucking around with e.g. an original PC (or an emulation) gives you access to a number of fixed devices, accessed in some fixed (or almost) way. Some Unices I had the pleasure to shepheard shipped with object code for the system, to add/reconfigure devices meant editing some C files, recompile and relink the kernel. Tons of fun.


Get yourself something like a z80 prototyping board and try to bit bang stuff out the serial port or run an emulated ibm pc with dos and do the same stuff using DOS irq.

In the old Z80 machines with memory mapped text display it is easy to display at least text.

It is possible (with ease or a little bit harder or impractical) to do stuff like this using: assembler, Pascal, Ada, C (why you would use C++ for this), BASIC and a fair bit of other languages, expect a LOT OF WORK !

For rather moderna processor which can support a fair amount of memory, take a look on the MIPS2000 and its compatriots (large memory space which easily allow direct access to 512 MB of RAM) if you want to program in C/Assembler/Ada (i think pascal to.) I say this because that family of processors has a fairly simple memory architecture.

Check out the sources for grub !

If you are interested in how to load a program (boot loader) at boot, or check out the grub-ified games like space invaders (a clone of space invaders which runs on the bare metal.)

You can boot grub-invaders in a virtual machine see grub-invaders

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.