Back to basics

I was reading a wonderful book Programming from Ground up by Jonathan. It reminds me old good days about assembly language on Dyna Microprocessor kits.  I thought about writing some points from that.

Let us start reading about the Computer Architecture:

Have you every thought when you type something on the keyboard how does computer display that on the Screen? I know I know we don't need to bother about that but I believe anyone who is a programmer must know these concepts.

So if we will look at architecture of Computer there are 3 main components:

  • Hardware
  • Kernel
  • User Application
    Let us go through each point one by one I will discuss the most important one at the end ;)

Hardware

Hardware includes everything that is physically available in the computer. For example Motherboard ,RAM, Processor, Keyboard, Mouse etc. Few of them require human interactions for example keyboard or mouse. But some of them for example microprocessor(most important IC(Integrated Circuits) on the motherboard ) need commands that will be executed by such kind of hardware. These command are written in Machine Language. I will explain about that later.

User Application

This represents any program written by User in any high level or low level language. For example if we take any editor that is used to write such blogs or for example music player on our computer where MJ rocks every time we play "Don't Stop Till You Get Enough" :)

Kernel

As I said earlier and I know you are smart enough to identify that Kernel is the most important part we should discuss here. have you ever written any code so that your music player will interact with the underlying hardware driver and play sound for your favorite song? I have never done that. Then who is doing that for me? Have you ever thought what the hell is Operating System? If yes then you know the answer of my previous question and if No then let me tell you OS is doing that for us. That is the reason today Bill Gates is a big Man with big big pocket! OS has Kernel to interact with hardware. Each OS expose some kind of entry point or we should say functions to interact with the Kernel. User applications use that entrypoint and using kernel interact with the hardware. So when we press a key a scancode goes to kernel. Then kernel converts that to actual letterand then pass to the OS and then OS will display that in the desired application for example editor. kernel also handle security issues like handling the permission of memory or file access for a particular program.

I hope you enjoyed reading this stuff do leave a feedback on that.  I will be looking forward for any kind of suggestions.

In windows we have everything which is executable with an extension "exe". But in Linux everything that is executable does not have any extension.

Share on : Twitter, Facebook or Google+