.

Sunday, March 31, 2019

Compare cpu scheduling of linux and windows

Compargon cpu schedule of linux and windowsACKNOWLEGMENTI mohd sharique ansari of B tech-M tech (CSE) would like to thank my teacher of numerical analysis Mr. RK Gupta who helped me throughout the education of this paper in best possible way. I would like take account the dedication and sincerity of my teacher for his guidance without whom this paper would not been possible.At last I would like to thank all my friends for their support.INTRODUCTION central door SCHEDULING plan basically deals with the selection of a process that exists in the memory and pee-pee to take to the woods. The selected process is allocated with the central processor. This function is performed by the processor scheduler. The CPU scheduler makes a sequence of moves that determines the interleaving of gets. Programs subroutine synchronization to prevent bad moves. exclusively otherwise schedule choices appear (to the program) to be nondeterministic.The schedulers moves are dictated by a programin g policy.A general overview of the scheduling is depicted by the below representation Windows process scheduling1) Windows 3.1 xs pulmonary tuberculosisd a non-preemptive scheduler, import that it did not interrupt programs. It relied on the program to end or furcate the OS that it didnt need processor so that it could move on to another(prenominal) process. This is usually called cooperative multitasking. Windows 95 introduced a rudimentary preemptive scheduler however, for legacy support opted to let 16 bit applications work out without preemption2) NT-based versions of Windows employment a CPU scheduler based on a multilevel feedback queue, with 32 priority levels defined. It is intended to meet the following design requirements for multimode systems Give appreciation to short jobs. Give preference to I/O bound processes. promptly establish the nature of a process and schedule the process accordingly. each(prenominal) processes receive a priority boost after a holdup eve nt, but processes that have experienced a keyboard I/O await get a larger boost than those that have experienced a disk I/O wait.Foreground processes given higher priority.3) Windows XP uses a quantum-based, preemptive priority scheduling algorithmic rule. The scheduler was modified in Windows Vista to use the cycle counter register of modern processors to keep track of hardly how many CPU cycles a get out has executed, rather than just employ an interval-timer interrupt routine.Linux Process SchedulingFrom versions 2.6 to 2.6.23, the kernel used an O (1) scheduler. The wholly Fair Scheduler is the name of a task scheduler which was merged into the 2.6.23 release of the Linux kernel. It handles CPU resource allocation for executing processes, and aims to maximize overall CPU habit while maximizing interactive performance. It uses that uses red-black trees instead of queues.Two classes of processesreal-time (soft deadlines)timesharing algorithmNormal process scheduling uses a prioritized, preemptive, credit-based policyScheduler ever so chooses process with the most credits to run.On each timer interrupt oneness credit is deducted until zero is reached at which time the process is preempted.If no ready process then all credits for a process mensural as credits = credits/2 + priority. This approach favors I/O bound processes which do not use up their credits when they run.The metre Robin and FIFO scheduling algorithms are used to switch surrounded by real-time processesWindows is by far the most popular proprietary own(prenominal) computer operating system, while Linux is the most prominent free computer software operating system.WindowsLinux1)Process a) train space, handle table, statistics and at least one ramble b)No inherent parent/child relationship1) Process is called a Task a) introductory Address space, handle table, statistics b)Parent/child relationship c)Basic scheduling unit2) Threads a) Basic scheduling unit b) Fibers cooperative us er-mode threads2) Threads a)No threads per-se b)Tasks gouge act like Windows threads by sharing handle table, pelvic inflammatory disease and address space c)P-Threads cooperative user-mode threads 3)windowingWindows has a kernel-mode Windowing subsystem. 3)windowing Linux has a user-mode X-Windowing system. 4)Two scheduling classes a)Real time (fixed) priority 16-31 b) Dynamic priority 1-154)Has 3 scheduling classes a)Normal priority 100-139 b)Fixed Round Robin priority 0-99 c)Fixed FIFO priority 0-995)Higher priorities are favored a) Priorities of dynamic threads get boosted on wakeups b)Thread priorities are neer bring downed5)Lower priorities are favored a) Priorities of normal threads go up (decay) as they use CPUb)Priorities of interactive threads go down(p) (boost) 6)Most threads run in variable priority levelsa)Priorities 1-15 b)A newly created thread starts with a base priority c)Threads that complete I/O operations experience priority boosts (but never higher than 15) d)A threads priority go out never be below base priority6)Most threads use a dynamic priority policy a)Normal class similar to the classical UNIX scheduler b)A newly created thread starts with a base priority c)Threads that block ofttimes (I/O bound) will have their priority stepwise increased d)Threads that always exhaust their time slice (CPU bound) will have their priority gradually decreased7)The Windows API function SetThreadPriority() sets the priority nurse for a specified thread a)This value, together with the priority class of the threads process, determines the threads base priority level b)Windows will dynamically adjust priorities for non-real-time threads 7)Nice value sets a threads base priority a)Larger values = less priority, lower values = higher priority b)Valid becoming values are in the range of -20 to +20 c)Non-privileged users can only specify positive nice value8) Real time scheduling in windows.Windows xp supports static round-robin schedul ing policy for threads with priorities in real-time range (16-31) a) Threads run for up to one quantum. b) Quantum is reset to full turn on preemption. c) Priorities never get boosted.9) RT threads can lust important system serve such as CSRSS.EXESe-Increase Base Priority Privilege is postulate to get ahead a threads priority into real-time range.8) Real time scheduling in Linux.Linux supports two static priority scheduling policies Round-robin and FIFO ( scratch in, first out) a) Selected with the sched-setscheduler( ) system call b) Use static priority values in the range of 1 to 99 c) Executed strictly in decree of decreasing static priority9) RT threads can easily starve lower-priority threads from executing Root privileges or the CAP-SYS-NICE capability are required for the selection of a real-time scheduling policy10) Some corpse calls and DPC/APC handling can cause priority inversion 10) recollective running system calls can cause priority-inversion11) Scheduling timesl ices in windowsThe thread time slice (quantum) is 10ms-120ms a)When quanta can vary, has one of 2 values11) Scheduling timeslices in Linux.The thread quantum is 10ms-200ms a)Default is 100ms b)Varies across entire range based on priority, which is based on interactivity level 12) Windows NT has always had an O (1) scheduler based on pre-sorted thread priority queues.12) The Linux 2.4 scheduler is O(n)If there are 10 active tasks, it scans 10 of them in a list in order to decide which should execute nextThis means long scans and long durations under the scheduler lock13) In windows (vista sp1) the time-slice varies -manual (user setting, window boost) as well as automatic (window boost).13) In Linux 2.6.28 the time-slice does not vary- manual(user setting, window boost) and automatic (window boost).14) In windows (vista sp1) CPU partitioning is not possible. 14) In Linux 2.6.28 CPU partitioning (CPU sets) is possible.15) Scheduler load equilibrize is not possible.15) Scheduler load balancing is possible.

No comments:

Post a Comment