1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

    jk2447 Petabyte Poster Moderator

    5,482
    352
    249
    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: 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, VCP4, CCA (XenApp6.5), MCSA 2012, VCP5, VCP6-NV
  3. dmarsh

    dmarsh Terabyte Poster

    3,782
    302
    184

    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:
     
    Certifications: CITP, BSc, HND, SCJP, SCJD, SCWCD, SCBCD, SCEA, N+, Sec+, Proj+, Server+, Linux+, MCTS, MCPD, MCSA, MCITP, CCDH
  4. jk2447

    jk2447 Petabyte Poster Moderator

    5,482
    352
    249
    Ah I stand corrected (dam ha ha). Mr Marsh is our code guru Hugo so apologies for getting that bit wrong.
     
    Certifications: 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, VCP4, CCA (XenApp6.5), MCSA 2012, VCP5, VCP6-NV
  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

    dmarsh Terabyte Poster

    3,782
    302
    184
    Thats a broadly correct high level definition yes. :)
     
    Certifications: CITP, BSc, HND, SCJP, SCJD, SCWCD, SCBCD, SCEA, N+, Sec+, Proj+, Server+, Linux+, MCTS, MCPD, MCSA, MCITP, CCDH
  7. jk2447

    jk2447 Petabyte Poster Moderator

    5,482
    352
    249
    If its good enough for wiki its good enough for me :)
     
    Certifications: 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, VCP4, CCA (XenApp6.5), MCSA 2012, VCP5, VCP6-NV
  8. fuzzybear395

    fuzzybear395 New Member

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

    dmarsh Terabyte Poster

    3,782
    302
    184
    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
    Certifications: CITP, BSc, HND, SCJP, SCJD, SCWCD, SCBCD, SCEA, N+, Sec+, Proj+, Server+, Linux+, MCTS, MCPD, MCSA, MCITP, CCDH

Share This Page

Loading...