Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.
A register is a very small amount of very fast memory that is built into the central processing unit (CPU) in order to speed up its operations by providing quick access to commonly used value. They are temporal small memory unit that stores characters and they are located in the processers for ease in access. Registers are at the top of the memory branch, the use of registers on the computers was first introduced in the late 1970’s and its use has grown throughout the computer market.
WHY THE NEED FOR REGISTERS?
First we know almost all the modern computers possess system that involves moving data from the main memory to registers and then back to the main after being used for storage purpose, and then interpretation and execution of sets of instructions are done immediately. Therefore this is the reason why registers are important and needed in the modern computers. They assume the role of temporarily storing the respective information and directing it towards the control unit after handling the process of execution on a more efficient and effective order.
To conclude up we see that without registers the CPU would have to carry a tight job of gathering data from the main memory for a thousand different functions while running the risks of accounted bizarre such as processes running out of page memory, and also absence of registers would mean consumption of hard disk space to make up for the pieces of data are directed to the control unit one by one which in turn resulting to a longer time for processes to be executed (LTT) longer turnaround time). The total numbers of registers present in the processer and the operation they respectively perform have an impact on efficiency of code produced by the optimizing the compilers. In the end some of the registers are visible to programmers.
TYPES OF REGISTERS
There are about fourteen different types of registers, but the number various depending on the CPU make. Among the several types of Registers include:
Data Registers which are used to hold different types of data including integers and/or floating points. Some architecture uses an alternative register similar to data registers and they are known as accumulators.
Address Registers simply holds addresses to designated locale in the memory.
Conditional Registers are the holders of truth values, thus determining whether a process should be executed by matching conditions with the truth value.
General Purpose Registers are used to hold data and/or addresses.
Special Purpose Register is used to hold data concerning a program state; that is the program counter and pointers.
Status Register which is a collection of flag bits for processer that includes mathematical operations such as parity (Odd and even values) and it is mostly common on the X86 Architecture multiprocessors.
Pointer Registers holds the floating point values and other point related values.
Index Registers are used for special kind of indirect addressing where they modify the operand addresses during the running of the program.
Hardware Registers hold bits of information in manner that can be written and read simultaneously by transmission and reception of signals to and fro the register control but occurs outside the CPU.
Instruction Registers are used to hold an instruction that is concurrently being executed, extending its role to decoding and preparing an instruction even before execution.
Memory Management Registers comes in four different sub-types with a respective task of allocating of data structures which control segmented memory management. The main task is to store necessary data specific to the registers in question.
Vector Registers holds data for vector processing by SIMD Instructions (Simple Instruction, Multiple Data).
System Registers are responsible for assisting in the initializing of the processer and controlling system operation by the use of system flags.
THE SIZE AND ORGANISATION OF REGISTERS.
The sizes of the Registers do vary depending on its type but all registers are measure in the number of bits they can be able to hold. These categories include the: 4-bit, 8-bit, 16-bit and 32-bit registers. The 4-bit Registers are outdated so to speak because they carry minimal values. The 8-bit Register can be loaded from an external input and contains block and logics which holds two 8-bit inputs. Registers are now implemented as a register file but the same can be achieved through high speed core memory, thin film memory and other numerous in different machines. The 16-bit registers are responsible for a sole function which is to hold the memory address of the next instruction that is to be fetched from processer after executing the current instruction and repeats this operation whenever the function is needed. In addition to that, the 32-bit registers are accessible to programmers and they carry out the functions of storing the current instruction being executed by the processer thus being part of the computer. This classification in terms of size and number of bits depicts an organization of the registers in all computer system architectures.
PROCESS CONTROL MANAGEMENT
Window XP home premium is one of the Operating System which was developed by Microsoft Co-operation mainly for personal use and business as well. On the 25th October 2001 that is when Windows XP was released, being the successor of Windows 2000 and Window Me, therefore it brought upon improved: (efficiency, graphical user interface, stability and the most significant is the consumer orientation specifically to user at home due to the rate of growth in Information Technology which brought about home based businesses in the late 90’s.
First as we know that Window XP is the most widely used (OS) Operating System in the world as of the end of April 2010 with grades of 56.2% of the market share, Operating System platform statistic, the W3schools. Window XP continues to prosper above all Operating Systems by offering the best for User’s experience.
We see out of the two majors of Windows XP: Home Edition and Professional; Home Edition was mostly targeted for home users and the essence of their home requirements as far as computers are concerned.
As time continued, numerous upgrades were released later on after its release in 2001 and therefore made Window XP gain popularity in the market up to this day. The good thing about Window XP has the capacity to support multiple processors and contains the following: Encrypting File System and enhanced Media Center that supports additional multimedia features, Access Control for multiple users, Wider or roaming User profile, Remote Desktop function.
Windows task manager is an example of any windows platform: therefore a task manager controls the center that grants the user control of the running application, processes, activities with central processes unit performance and networking. Basically that’s is the essence of what process control management in Windows XP is all about
If you’re familiar with any windows platform then you must know of the ‘Windows Task Manager’, a task control center that the grants the user control of the running application, processes, activities with CPU  performance and Networking. Please refer to Figure 3 in the appendix on page 12 for an illustration of the Task Manager. Basically that is the essence of what Process Control Management in Windows XP is all about, but what really goes on in terms of process handling and scheduling is encapsulated and hidden from the Task Manager therefore users do not know how processes work.
Processes  and threads  are the components that make applications run in Windows XP, but they are managed by an order of which they are executed. The step-by-step function called an algorithm depicts that order by which all processes and threads abide to; thus Windows XP deploys a priority based algorithm, with an underlying implemented quantum based algorithm as its scheduling mechanism. All processes bear an ID that identifies it and a class level that identifies its priority level from one through five (One being the lowest and six being the highest priority class level). This algorithm is preemptive in nature, meaning it can interrupt a running process due to a condition that is met, for this case the condition is priority based therefore a higher priority process will replace a lower priority process as far as priority based algorithm is concerned.
Furthermore, preemption can occur due to termination of threads, time quantum exhausted as far as quantum based priority is concerned and/or a blocking system call such as for Input/Output prompts that awaits a feedback from the user whereby it leaves the running state and enters a waiting state as you shall see later on.
PROCESSES AND THREADS
A process is invoked by a user or the system, when a certain program or file is opened; it is allocated a class of priority and a state and is allocated a space in memory before being executed by the CPU, or more specifically the Kernel  . A process is initiated by a user and the system, hence the terms user and system process that can be seen distinctively on the task manager; but in reality the User mode is responsible for the creation of the threads for user process while as the Protected Mode is responsible for creation of the threads for system process. Details of the Kernel and Windows XP architecture can be seen under internal structure on page 6.
As mentioned previously, there are five levels of priority for processes and threads and their respective scheduling states on which they are identified in. Priority is grouped together in a range (0-31) is divided equally by base five for six priority classes. Please refer to Figure 1 below for an illustration of priority class level and their respective priorities.
The process that a user interacts with concurrently is known as the foreground process and in contrast, the process that is not being interacted with is the background process. By default, Windows XP assigns all user processes to ‘Normal’and this is known as the base priority. A single thread running at 0 is used for memory management which is why it is never used for neither foreground processes nor background processes.
Furthermore, the handling ofall processes and threads are carried out in separates queues for respective scheduling priority and then the dispatcher, responsible for handling of processes and threads and sitsin the kernel, uses these queues to locate a thread from highest to lowest priority until it finds a thread that is ready to run. In case, a ready thread is unavailable in its scheduling priority (for instance ‘Normal’ Scheduling Priority) then the dispatcher moves on to locate a ready thread in the next scheduling priority (for instance ‘Idle’ Scheduling Priority).
Figure : Windows Scheduling StatesWindows XP has six scheduling states of which a process and/or thread can be at a given time and they include; Ready, Standby, Running, Waiting, Terminate and Transition. All process must go through at least three states since they clarify what action is taken or is to be taken by a process and/or thread. Please refer to Figure 2 below for an illustration of these states.
Once a process is initiated by the user at a base priority, it enters the Ready State where it queues up while awaiting execution. In between, a process enters a Standby state in which prepares to run as it its waiting time elapses. In addition, a process that enters a Waiting State is simply being paused; at this state its priority being dropped to Idle as it waits for an Input/Output completion (Can be a Keyboard entry or a Disk I/O) and upon completion, the process moves up to the Ready State with a higher priority. A process can enter the Transition state only when a swapping event occurs in a page file in memory management; therefore this state is only for system processes. Preemption is inevitable between the Ready State and the Running State due to priority and quantum preemption; lastly all processes end by termination after it moves out of the Running State.
Windows XP is the only consumer-oriented OS produced by Microsoft with a Windows NT Architecture, a predecessor of Windows XP working on two modes or rather levels which are the User Mode and the Kernel/Protected Mode. The design is made to be Extensible (Layered Structure) and runs on two main APIs  known as WIN32 API and Native API. Please refer Figure 4 in the appendix on page 12 for an illustration on how API works. The kernel has a number of responsibilities that includes: thread scheduling, interrupt and exception handling, low-level processer synchronization and power failure recovery. The dispatcher mentioned previously is therefore within the kernel controlled by the system in the protected layer and supports waiting objects such as Disk I/O objects in request for completion to overcome the thread preemption.
Moreover, User threads are managed by a thread library which is known as the DLL  (Dynamic Link Library) and to be more explicit, it is the Windows APIs which are stored in the library. Since one of the main features of Windows XP is multitasking; this is usually achieved by having common functions stored in the library and have multiple processes access it at any given time. The science behind it is to have the user-level threads being mapped onto an associate kernel-level thread with respective DLL files necessary for a process execution, hence the communication between the User and the kernel. This mapping is known as the Light Weight Mapping (LWP).
The user mode is responsible for running of application programs, render an environment subsystem, communicating with the kernel through the API and providing other system services that can be controlled by the User such as security preferences or Logon processes. The architecture is designed in a way that almost all processes in the protected mode are never paged out of memory to prevent execution from being preempted; In case a critical protected mode thread is preempted, a blue screen of death with an error message pops up and prevents all user interactions and forces a system restart, thus the system failure from inability to handle such error exceptions. Please refer to Figure 5 in the appendix on page 13 for an illustration of the Windows XP Architecture.
PROBLEMS AND SOLUTIONS
There are a couple of problem that arise with the use of the scheduling algorithm used for Process Control Management. With the Priority-based algorithm, a thread with a higher priority preempts those with lower priority, so to say that real-time threads will absorb the execution time and holds the necessary resource to it until it is terminated. That is one of the main problems that Windows XP had.
Secondly, the Priority Inversion resolution is another problem faced by this scheduling algorithm. Since all threads that enter a waiting state have their priority level stripped down to idle; then the idle priority level remains the same after an Input/Output completion as it moves back to the Ready state. Thus, a real time priority thread may take longer to execute if it is waiting for on an input from a Normal priority thread (at the Ready Queue) which is unable to run due to an existing High priority thread at the Running state.
Microsoft solved both of these problems by having additional features in the scheduling algorithm and the architecture. The first problem was solved by running a quantum-based algorithm as a sub-scheduling algorithm that runs side by side with the main scheduling algorithm. What happens is each thread is allocated a time slice of a certain value depending on its priority level and the dispatcher is made to preempt threads in case it has exhausted its time slice. In addition to that, most architecture running Windows XP came with multi processors to prevent threads from idealizing a single processer; therefore allowing a switch between processor in case any one of the processor is idle or being exhausted by numerous threads.
The second problem of static priority level was solved by a technique of priority boost whereby a thread that is leaving the waiting state is given a special boost in priority to prevent to prevent the long waiting time to be executed in the running state.
Cite This Work
To export a reference to this article please select a referencing stye below:
Related ServicesView all
DMCA / Removal Request
If you are the original writer of this essay and no longer wish to have your work published on the UKDiss.com website then please: