The Process Control Management In Linux Information Technology Essay

Linux began to develop in 1991 when a Finnish student, Linus Torvalds, wrote a tiny self-contained kernel for the 80396 processors. Linux source code was available free on the internet. Due to that Linux developed by many users from around the world. Linux is a free operating system and modern based on UNIX standards. A complete Linux system contains many components that were developed independently of Linux. The core of Linux operating system kernel is completely original, but it allows many existing free UNIX software to run, resulting in a complete UNIX compatible operating system free from proprietary code.

Introduction

A process is the basic context between all user activity and user-request within the operating system. Linux needs to use a process model familiar to other versions of UNIX to be compatible with them. Linux operates same as UNIX and differently few key places.

Section 1: Operating Systems

Process control management in Linux

Processes and Threads

Linux prepares a fork () system call with the customary functionality of replicating a process. Linux provide ability to create threads through the clone () system call. However, Linux cannot mark as different between processes and threads. Actually, Linux usually uses the term task when applying to a flow of control within a program. When clone () is requested, it is passed a group of flog that determine how much sharing is to take place between the parent and child duties. Thus, if clone () is approved the flags CLONE_FS, CL0NE_VM, CLONE_SIGHAND, and CLONE_FILES, the parent and child duties will share the same file-system information, the same memory space, the same signal handlers, and the same set of open files. Using clone () in this style same as creating a thread in other systems, since the parent duty shares most of resources with child duty.

The lack of difference between processes and threads might be possible because Linux does not hold a entire process context within the main process data structure. It keeps the context within autonomous sub-contexts. The process data structure basically contains pointers to these other structures, so every number of processes able easily shares a sub-context through pointing to the same sub-context as suitable.

The arguments to the clone () system command it which sub-contexts to copy, and which to share, when it makes a new process. The new process constantly is given a new personality and a new scheduling context; in accord with arguments passed, however, it may either make new process use the same sub-context data structures being used by the parent. The fork () system call si special case of clone () that duplicate all sub-context and nothing to share.

Process Scheduling

Scheduling is allocating CPU time to different tasks within an operating system. Commonly, being the running and interrupting of process are normal thinking about scheduling, but another aspect of scheduling is also important to Linux which is running of the various kernel tasks. Kernel tasks surround both tasks that are requested through a running process and tasks which execute internally on behalf of device driver.

Linux has two separately different process-scheduling algorithms. First one is a time-sharing algorithm for fair, preemptive scheduling within multiple processes; the second one is designed for real-time task, where particular priorities are more important than fairness.

The scheduling algorithm used for routine, time-sharing tasks received a major overhaul with version 2.5 of the kernel. Before version 2.5, the Linux kernel made a variation of the scheduling algorithm in traditional UNIX. Problems with the traditional UNIX are among other issues that it does not provide sufficient support for SMP systems and that it does not scale very well as the number of tasks on the system grows. The renovation of the scheduler kernel with version 2.5 now provides a scheduling algorithm that runs in constant time without consideration of the number of task on the system. The new process scheduler also provides reduced support for SMP, including processor affinity and load balancing, besides maintaining fairness and interactive tasks supporting.

Read also  PC World: Environmental Analysis

The Linux scheduler is a particular, priority-based algorithm with two priority ranges separately: a real-time range from 0 to 99 and a nice value ranging from 100 to 140. These two ranges map into universal priority scheme through numerically lower values indicate higher priorities.

Linux assigns higher-priority tasks longer time quanta and vice-versa. Due to unique nature of the scheduler, this is suitable for Linux.

A run able task is considered qualify for execution on the CPU while it has time remaining in its time slice. When a task has expended its time slice, it is considered expired and is not eligible for twice execution till all other tasks have also exhausted their time quanta. The kernel support s a list of all run-able tasks in a run-queue data structure. Due to its support for SMP, each processor maintains its own run-queue and schedules itself independently. Each run-queue includes two priority arrays which are active and expired. The active array contains all expired tasks and each of these priority arrays contains a list of tasks indexed according to priority. The scheduler selects the task with the highest priority from the active array for execution on the CPU. On some multiprocessor machines, this means that each processor on the single machine is scheduling the highest-priority task from its own run-queue structure. So when all tasks have expended their time slices which is the active array is empty, the two priority arrays are replaced as the expired array becomes the active array and vice-versa.

Tasks are allocated dynamic priorities that are based on the nice value minus or plus until value 5 based upon task interactivity. Whether a value is subtracted or added from a nice value task depends on the task interactivity. A task’s interactivity is determined by how long it has been sleeping during waiting for I/O. Tasks that are more communicating typically have longer sleep times and so are more probably to have an adjustment closer to -5, as the scheduler supports such interactive tasks. in an opposite manner tasks with shorter sleep times are in many cases more CPU-bound and therefore will have their priorities decreased.

The recalculation of dynamic priority task happens when the task has depleted its time quantum and is to be moved to the expired array. Therefore, when the two arrays are exchanged, all tasks have been assigned in the new array to new priorities and similar time slice.

Real-time scheduling in Linux is simpler still. Linux performs the two real-time scheduling classes required by POSIX.1b: first come, first served (FCFS) and round robin. Each process has a priority extra to its scheduling class in both of them. Processes of different priorities might be competed with one another to some extent in scheduling of time sharing; in real time scheduling, however, the scheduler most of the time runs the process with the highest priority. Among equal priority processes, it runs the process which has been waiting longest. The only difference between round robin and FCFS scheduling is that FCFS processes continue to run till they either exit or block, but a round robin process will be acquired after a while and will be moved to the end of the scheduling queue, thus, equal priority round-robin processes will automatically time-share between themselves. Unlike usual time-sharing tasks, real-time tasks are allocated static priorities.

Read also  Bertram Chemicals Company Case Information Technology Essay

Real-time Linux scheduling is soft rather than hard real-time. The scheduler gives strict guarantees about the relative priorities of real time processes, beside the kernel does not offer any guarantees that how quickly a real time process will be scheduled once that process become run able.

Section 2: Computer Systems Architecture

Microprocessors

Single-Processor Systems

Most of computer systems use a single processor. The diversity of single-processor systems may be surprising, however, since these computer systems range from PDAs through mainframe systems. There is one main CPU capable of performing a general purpose instruction set on a single processor system that including instructions from user processes. Almost all computer systems have other special purpose processors as well. They may come through device specific processors, for example graphics controllers, disk and keyboard; or, on mainframes, they may come from of more general processors, such as I/O processors which move data quickly among the component of the system.

All of these special purpose system processors run a CPU limited instruction set in most of the time and do not run user processes. Sometimes they are administered by the operating system, in that the operating system sends them quickly information about their next task and then monitors their status alternatively. For instance, a disk controller microprocessor in a system receives a sequence of requests from the main CPU and executes its own disk queue and scheduling algorithm. This arrangement releases the main CPU of the overhead of the disk scheduling. All the PCs contain a particular microprocessor in the keyboard to change the keystrokes into code to be dispatched to the CPU. In some systems special purpose processors are low-level ingredient built into the system’s hardware. The operating system cannot communicate correctly with these kinds of processors; they do their task independently. The use of special purpose microprocessors is usual and does not change a single processor system into a multiprocessor. However, the system is a single-processor system if there is only one general-purpose CPU.

Multiprocessor Systems

Although single processor systems are most ordinary, multiprocessor systems known as parallel systems are growing in importance also. These systems have two or more processors in close communication, sharing the computer bus and sometimes the clock.

Multiprocessor systems in computers have three main advantages:

Increased throughput: it is expected to get more work done in few time by increasing the number of processors. When multiple processors work together on a task, a specific amount of overhead is incurred relevant all the parts working well.

Economy of scale: Multiprocessor systems can sometimes cost less than multiple single processor systems, because they can share accessories, mass storage and power supplies. If several programs tasks operate on the same set of data, it costs little money to store those data on one hard disk and to have all the processors share them than to have many systems with local disks or many copies of the data.

Increased reliability: if tasks can be distributed properly among several processors, so the failure of one processor will not stop the whole of system, only slow it down. For example; if we have five processors and one fails, then rest of the remaining four processors can obtain a share of the work of failed processor. So, the entire system runs only five percent slower, and not failing altogether.

Read also  Configure Dns Server Settings Understanding Forwarders Information Technology Essay

Increased reliability of a system is critical in many programs. The capability to continue providing service balanced to the level of surviving computer hardware is called graceful degradation. Some computer systems go beyond graceful- degradation and known fault tolerant, because they can tolerate a failure of any single component and then continue operation. Fault tolerance requires demands a mechanism to permit the failure to be detected, examined, and, if possible, corrected. The system is composed of multiple pairs of CPUs working in lock step. Both processors in the pair perform each instruction and compare the results. One CPU of the pair is at fault, and both are stopped if the results differ. the process which was being performed is then moved to another pair of CPUs, thus, the instruction that failed is restarted. This way is expensive, since it involves special system hardware and considerable hardware duplication.

These days the multiple processor systems in use are of two types. The first types systems use asymmetric multiprocessing, that each processor is assigned a specific task. Thus, a master processor controls the system; and the other processors take instructions or have predefined tasks from master. This plan defines a accurate master-slave relationship. The master system processor schedules tasks and then allocates work to the slave processors.

The most common computer systems use symmetric multiprocessing (SMP) to process the task, in which each processor executes all tasks within the operating system. SMP means that all system processors are peers; and no any master slave relationship exists among processors. Solaris is a commercial version of UNIX designed by Sun Microsystems that is a model of the SMP systems. A Solaris system might be configured to activate many of processors, all running Solaris.

The difference between asymmetric processors and symmetric multiprocessing may result from either hardware or software. Some special hardware can distinguish the multiple system processors, or the computer software can be written to permit only one master and multiple slaves.

A recent trend in CPU design these days is to comprise multiple compute cores on a single chip. Essentially, these are multiprocessor chips. Two—way multi processor chips are becoming mainstreams, while N-way chips are going to be common in high end systems. Except architectural consideration such as memory, cache and bus, these multi-core CPUs look to the operating system.

Lastly, blade servers are a recent development in which multiple processor boards systems, I/O boards and networking boards are placed in the same foundation. The difference between traditional multiprocessor systems and these is that each blade-processor boards are multiprocessor also, which makes difference between types of computers. In essence, those servers composed of multiple independent multiprocessor systems.

Conclusion

The Linux kernel is executed as a traditional en bloc kernel for performance reasons, but it is standardized enough in design to allow most drivers to be dynamically loaded and unloaded at run time.

Linux is a well done multiuser system, arranging protection between processes and running multiple processes according to a time sharing scheduler. Recently produced processes can share selective parts of their execution environment through their parent processes, allowing multithreaded programming.

Order Now

Order Now

Type of Paper
Subject
Deadline
Number of Pages
(275 words)