Print this page | Go back to previous topic
Forum nameThe Computer Forum
Topic subjectRE: Games W2K
Topic URLhttp://www.pcqanda.com/dc/dcboard.php?az=show_topic&forum=2&topic_id=178465&mesg_id=178468
178468, RE: Games W2K
Posted by xinli1, Sun Dec-29-02 03:00 AM
Well, not exactly. SFC runs pretty much at the same layer as most of your games. When I say layer what I really mean is levels of access. To better visuallize this, draw a small circle on a piece of paper, and label that as hardware. inside this circle resides all of the hardware components -- CDROMs, CPUs, RAM, HDs, etc.. Now draw another circle outside of that, and label it as the Hardware Abstraction Layer. This is the middleman. Outside of that, draw another concentric circle, and label it as Applications. This is the ring in which most of your apps will be running. This is a greatly simplified view of the actual number of layers involved. But it gives you a good idea.

The rules of this game are simple. A process in your system can communicate only with other processes that reside within the same ring as it self, and with rings adjacent to it. What this implies is that your user level application can talk with other user level applications, and can talk to processes/apps residing within the HAL ring. But, it cannot talk to the hardware directly. The HAL can talk to everyone. What the HAL does is to accept hardware access requests from the user level application and to pass those requests (assuming they are valid and not dangerous to system stability) to the hardware. The hardware then responds to the HAL and the HAL pases the response back up to the user level application.

Seems like alot of trouble to gain very little. But there are actually a few very good reasons for doing this. First, as I've already somewhat alluded to, it helps to improve system stability. By preventing arbitrary access to the hardware by any arbitrary set of user processes, the HAL effectively enforces a set of usage policies designed to ensure maximum stability and security for the system. Another advantage is portability. Suppose Microsoft decides to port Windows XP over to the SUN machines, or the Mac (like that'll ever happen). Without the HAL, a large amount of code in the operating system must be rewritten to communicate with the new set of hardware devices and talk to the processor and other system components in the language defined by that platform. However, if a HAL is present, then all we need to do is to reprogram the HAL to talk to the underlying hardware, and anything that uses the HAL can still talk to the HAL the same way it did before. It makes porting a lot easier to deal with.

HTH

Xin Li