HAL and Kernel?

Discussion in 'MCDST' started by hugorilho, May 23, 2009.

  1. hugorilho

    hugorilho Byte Poster

    104
    0
    14
    What a boring discussion topic to be having on a Saturday but I must clear this one out of my mind. What's the difference between the Kernel and the HAL?? Both are abstraction layers that provide communication between hardware and software. So what's the easiest way to distinguish them?
     
    Certifications: MCDST
  2. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    7,200
    951
    318
    Hi Hugo, think of the HAL as the layer that controls the motherboard, CPU, Memory etc, turning higer level languages like C+, Java etc into machine code that can be interpreted by the CPU.

    Now think of the Kernel as doing the same thing but specific to the Operating System itself i.e. XP or Vista.

    Its hard to differentiate the two but the HAL basically is like your motherboard drivers that lets the Kernel be loaded so you can have an Operating system

    Hope that helps . . . .

    James
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs
  3. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259

    Nope it does not do this, thats what a compiler, JVM or assembler does, but otherwise good effort !

    The JVM is a sort of a HAL in very broad terms I guess, its a Virtual Machine, abstracting you from the processor and memory layout etc. Theres actually a thing called a JIT that performs just in time compilation from intermediate code to native machine code.

    In Operating System design theres usually a ring based design and the concept of user mode / priviledged mode.

    The very core of the operating system is usually callled 'the kernel' in a sort of nut analogy. The kernel performs the most core features of the OS like process scheduling and loading. It generally operates in a priviledged mode.

    Hardware abstraction layers are just what they say on the tin.
    The OS designer creates an idealised generic set of components that allow you to develop your OS without having to know the exact specifics of various devices.

    As long as the manufacturer complies with your HAL / driver model everythings fine. They are an abstraction layer between the OS and the hardware, or a high level interface.

    Think of how you drive a car, many people never look under the bonnet, they are happy with the high level abstraction of turning the key and the wheel and pressing the peddles, they don't get involved in pesky details.

    The Kernel is not just a HAL, it has very real responsibilities to fulfill. There are whole books on OS design. Theres also much debate over microkernels, monolithic kernels and hybrid kernels etc. Obviously the main two OS's to look at these days are probably Linux and Windows. There is a Windows Internals cert.

    People generally don't understand software because they can't see it, it has design like everything else, it is made up of components with various functions like many other things. These components or groups of components get given names, most people will never really understand or care what they do, the same way they don't know how their VCR works or what a DOHC is. Thats what differentiates a software engineer.

    Try wikipedia for better answers, I'm not an expert :wink:
     
  4. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    7,200
    951
    318
    Ah I stand corrected (dam ha ha). Mr Marsh is our code guru Hugo so apologies for getting that bit wrong.
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs
  5. hugorilho

    hugorilho Byte Poster

    104
    0
    14
    This idea seems clear to me.

    LOL...the shear fact that you guys are discussing the concepts legitimizes the hard time that i'm having trying to distinguish them. Being both of them abstraction layers I cannot diferentiate them using this idea so from now on it's probably best to look at them as follows ("inspired" by wikipedia):

    The function of the HAL is is to hide differences in hardware from most of the operating system KERNEL that in turn is responsible of managing the system's resources (the communication between hardware and software components).

    Do you guys aprove this condensed definition?
     
    Certifications: MCDST
  6. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Thats a broadly correct high level definition yes. :)
     
  7. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    7,200
    951
    318
    If its good enough for wiki its good enough for me :)
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs
  8. fuzzybear395

    fuzzybear395 New Member

    1
    0
    1
    Everyone, keep asking and answering these questions. They are very helpful. Thank you!
     
  9. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Basically windows does confuse the issue a little because the DLL that acts as the mainboard driver is also called 'the HAL'.

    You therefore get one 'HAL' for single processor systems and another for multiprocessor/multicore systems, this is however only part of the overall logical HAL in Windows that also includes your other device drivers and some small parts of the OS.
     
    Last edited: Aug 14, 2012

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.