© Estwald ISI 2015 - 2025
For the Home, Office, Small and Medium Business                                                                                 Fredericksburg, VA

Estwald’s

Information System Infrastructures

The Operating System The computer operating system (OS), be it Windows, Linux, or iOS; consists of a secured kernel and a number of peripheral applications that directly interact with the kernel and are provided as part of the OS, also known as daemons. As a user, you mostly deal with daemons. The user groups, update program, active directory services, the file explorer, device manager, services manager, et al; are all daemons. They are provided to make it easier for you to communicate with the OS kernel but they are not part of it. The Kernel The kernel is the heart of the OS. It enforces user and application permissions. It allocates time, hardware, and resources. And it acts as a messenger and translator, passing information between and among applications and hardware that speak dissimilar languages. It is the benevolent dictator maintaining peace and order. When the OS is initially installed, the first user is automatically assigned the role of administrator. The administrator can then add other users either as users or administrators. Only administrators can add users and give them specific rights as an administrator or a user. They alone can install applications. Users cannot install applications or assign user rights. They are only allowed to run applications. A smart administrator creates a user account for him/herself for normal day to day use. This prevents malware from being loaded accidentally. User rights will prevent it. As stated under the hardware section, when an application is run, the kernel creates a workspace for it to operate in. Applications with filenames ending in .com are given a default workspace. Applications that end in .exe contain a header that defines the parameters of the workspace it needs to operate correctly. The kernel creates a virtual computer based on this information. If there are insufficient resources the kernel begins shuffling applications between memory and the hidden page file generally held on the boot drive. The Process Manager Even a newly booted computer has tens of programs running. Most of these are services the OS uses but some are user applications that start up on boot. The kernel’s process manager assigns processor usage by allocating time on the CPU cores. The first time a program runs it breaks itself down into small executable snippets called threads. Programs place these threads in a queue to be executed by one of the available CPU cores. The process manager prioritizes the threads and assigns each to an available core as they become available. The thread is allowed to run until it finishes or it exceeds its allocated time. If a thread is not completed in the allotted time, its stopping point is recorded, and it is placed back in the queue to finish when next up. And here is one point where a workstation kernel differs from a server kernel. The allotted time, or time slice, for a workstation is about 2 milliseconds (ms) whereas the time slice in a server is about 6 ms. The shorter time slice of the workstation makes it far more responsive to user inputs although it adds greatly to processing overhead and is overall less efficient. Threads Most applications at this point in time are single threaded. That means that only one thread can be in the queue at any one time. The current thread must finish before the next thread is allowed to be placed in the queue for processing. Some higher end applications are multi-threaded, database server applications, CAD/CAM software, and some Adobe programs come to mind but there are many others. A multi-threaded application can place multiple threads into the queue at the same time, and assuming multiple cores, all threads will be serviced at nearly the same time. This obviously speeds an application’s processing. Multi- threading is written into the code by the application’s programmer and can only be performed when multiple independent operations need to be completed before a follow-on operation is executed. Optimizing code for multi-threading is extremely time consuming and the marketers of such programs charge the consumer dearly for them. Drivers & Applications Now that you understand how an application is executed let’s turn to how it communicates. As mentioned earlier, the OS loads tens of services during boot. These handle the mouse, keyboard, NIC, USB ports, storage devices, graphics and all other system hardware. But since each of these pieces of hardware can be provided by any number of manufacturers each with its own set of embedded commands and arguments how does everything communicate with everything else? This is where drivers come in. Drivers are executable system files that serve the purpose of converting and forwarding commands and data between a specific hardware item and the kernel. Some drivers are written by the OS manufacturer. These are for well-established hardware like the keyboard, mouse, and hard drive where the manufacturers have agreed to a common set of commands for basic functionality. For more advanced functionality of basic devices and for devices that do not have a common set of commands it is up to the device manufacturer to create and provide the driver to the user through their website and perhaps the OS manufacturer for redistribution. The driver sits squarely between the hardware and the kernel. If the hardware wants to speak to either the kernel, or indirectly to an application, the driver takes the message, converts it to a standard set of commands and data understood by the kernel, and passes it on. In the other direction, the kernel’s messages are converted and optimized to take advantage of the hardware’s command set, and sent to the hardware. The same thing occurs between applications and the kernel except applications already speak the kernel’s language so no driver is needed. That is one of the many reasons an application is sold specifically for iOS, Linux, or Windows. A program written and compiled for one OS does not know how to speak to another OS. Freezes & Reboots And one last thing, the Blue Screen of Death (BSD) and other ailments that users continually blame the OS for are more than likely due to a poorly written driver and on occasion by an application. Such misbehavior occurs less often with iOS because Apple has a closed environment where every piece of hardware and associated drivers and applications are controlled and approved for use by Apple. Irony is Apple’s 1984 commercial for Apple is Big Brother. Windows, on the other hand, is a truly open architecture and environment where any manufacturer or individual can create and sell virtually anything for it without so much as an email to Microsoft. In an attempt to reduce driver issues Microsoft began a voluntary certification process whereby they approve drivers and issue software certificates. Driver installations without the certificate force a window open notifying the user that the driver being installed has not been certified, but this will not prevent the user from installing it. The choice remains with the user. The certification process is in use on Windows 7 and greater, 64 bit versions only.