The Completely Fair Scheduler in the Linux Kernel

Document Type:Thesis

Subject Area:Engineering

Document 1

Thus the need for a scheduler to allocate time for the multiple runnable tasks, giving preference to high-priority tasks and at the same time avoiding low-priority process starvation. The Completely Fair Scheduler (CFS) was designed to achieve an ideal scheduler which can run multiple processes simultaneously thus sharing equally the processing power. Thus the notation, “Completely Fair. ” Each process ought to be allocated a fair share of the processor. It was developed to replace the O(1) Scheduler that managed to allow multitasking in the CPU by allocating different time slots to running processes. For the scheduler to exercise this ideal and precise nature of multitasking, it has to have the following; 1. A means to count the amount of time taken by a waiting task while the processor was running the assigned task.

Sign up to view the full document!

This value of time is assigned to a variable named as wait_runtime. A means to calculate the CPU fair share per process. A global run queue variable fair_clock is assigned. Each task tracks its runtime and is queued in the red-black tree, thus ensuring the task that has run least is at the leftmost node. The entire work done is noted by the min_vruntime and is used to allocate the latest process towards the left side of the binary tree. Tasks that run at a default priority are assigned a zero value. A load weight factor is used to calculate the vruntime. Group scheduling is also implemented in that each user is allocated equal processing power to avoid disadvantaging of a user.

Sign up to view the full document!

It only guarantees unfairness level to be less than O(n), for n number of processes. Wi-Fi support in Linux Wireless Fidelity (Wi-Fi) support in Linux is composed of two parts: the driver support and the configuration and management support. The driver support is provided through open source drivers and also from end manufacturers. The configuration and support part is implemented by software that enumerates, joins and checks the status of the available Wi-Fi networks. There exist two types of Wi-Fi devices that depend upon where IEEE802. The transmission passes through the socket layer where struct sk_buff holds the pointer to a data buffer and keeps track of the data length. It is then passed to the network protocol block.

Sign up to view the full document!

After the network protocol, it is transmitted to the agnostic layer that links hardware devices, among them Wi-Fi, to different network protocols. Interfacing with the kernel is done through net_device_ops. Mac80211 is used to register Wi-Fi devices with net_device_ops. In the Linux kernel, the virtual memory is divided into the userspace and kernel. This is to enhance memory security and protect hardware from malware. The user space is the memory location where drivers and application software are run. Every userspace process runs on its own virtual memory space. Protection rings are used to separate the kernel from the userspace. IPv6 vs. IPv4 IPv6 is a reviewed version of IPv4. IPv6 was developed to take care of the flaws of IPv4.

Sign up to view the full document!

IPv6 is designed to allow an increase in the number of hosts and data traffic to be transmitted. It is much more advanced and has some features that make it more sufficient than its predecessor. Address Resolution Protocol (ARP) is applied in IPv4 to locate a physical address like the Media Access Control. On the other hand, IPv6 fixes these functions within the Internet Protocol on its own applying Internet Control Message Protocol (ICMPv6). In IPv6, configuration by assigning IP addresses and also routes has to be done on newly installed systems. In IPv6 though, the configuration is optional. Its interfaces are self-configuring. IPv6 has a lesser boundary limit, which is 1280 bytes. This higher value in IPv6 improves efficiency by reducing the rate at which fragmentation is done.

Sign up to view the full document!

From $10 to earn access

Only on Studyloop

Original template

Downloadable