logging in or signing up linux management kiranreddygudisa Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 99 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: August 27, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Seminar onLinux Process Management : Seminar onLinux Process Management Presentation by Manoj Dhage MTech 1st Year, SIT, IIT Kharagpur. Outline : Outline Process - process descriptor, process state, process switch. The Linux 2.6.8.1 Scheduler - Runqueues, priority arrays - Calcucalation of priorities and timeslices, - schedule() function - Scheduler tuning Process : Process Process Lightweight Process Process Descriptor Process Descriptor : Process Descriptor Ref: Understanding the Linux Kernel Process State : Process State TASK_RUNNING TASK_INTERRUPTIBLE TASK_UNINTERRUPTIBLE TASK_STOPPED TASK_ZOMBIE Process Descriptor Handling : Process Descriptor Handling The Process List Ref: Understanding the Linux Kernel continued… : continued… List of Data Structure Ref: Understanding the Linux Kernel Process Switch : Process Switch Hardware Context Happens only in schedule() function Steps - switch page global directory - switch kernel mode stack and H/W context The Linux 2.6.8.1 CPU Scheduler : The Linux 2.6.8.1 CPU Scheduler Runqueues The O(1) Scheduling Algorithm - one Runqueue per CPU - active priority array - expired priority array Use Priority Arrays : Use Priority Arrays active priority array bitmap[BITMAP_SIZE] bitmap[BITMAP_SIZE] : bitmap[BITMAP_SIZE] Calculating priority : Calculating priority static priority - nice() system call - specified by user - never modified by scheduler - used to calculate timeslice continued… : continued… dynamic priority - subtracts –5 to +5 from static priority depending on the time spend in running or waiting - used for scheduling purpose The schedule() function. : The schedule() function. steps involved - find process with maximum dynamic priority - prev and next pointers to process descriptors - switch to next switch page global directory switch kernel mode stack continued… : continued… Called in prev, return in next Why this is O(1) Invoked by - scheduler_tick() - system call scheduler_tick() : scheduler_tick() Invoked every 1 ms by timer interrupt Do not always invoke schedule() Whenever a task runs out of time slice, it is given new time slice and dynamic priority and put in expired array Reinsert interactive task on active array If there is no active task swap the pointers of active and expired arrays System calls : System calls Insert current task in a waitqueue Change state to TASK_INTERRUPTABLE or TASK_UNINTERRUPTABLE Invoke schedule() If resource available remove from waitqueue Handling real time tasks : Handling real time tasks Task priority range -20 to 19 SCHED_FIFO Scheduling SCHED_RR Scheduling Scheduler tuning : Scheduler tuning MIN_TIMESLICE AND MAXI_TIMESLICE PRIO_BONUS_RATIO STARVATION_LIMIT Future scope : Future scope Scheduler modes - server mode, bigger timeslice - desktop mode, more responsiveness Swappable schedulers - different scheduler for different users - basic kernel scheduler would be round robin 3. References : 3. References Josh Aas, “Understanding the Linux 2.6.8.1 CPU Scheduler”, February 2005. Abraham Silberschatz, Greg Gagne, Peter Galvin, “Operating System Concepts”, Wiley. Daniel P. Bovet, Marco Cesati, “Understanding the Linux Kernel”, 2ndEdition. O’Reilly, July 2003. http://plg.uwaterloo.ca/~itbowman/CS746G/a1/ . http://josh.trancesoftware.com/linux/ . Thank You. : Thank You. You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
linux management kiranreddygudisa Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 99 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: August 27, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Seminar onLinux Process Management : Seminar onLinux Process Management Presentation by Manoj Dhage MTech 1st Year, SIT, IIT Kharagpur. Outline : Outline Process - process descriptor, process state, process switch. The Linux 2.6.8.1 Scheduler - Runqueues, priority arrays - Calcucalation of priorities and timeslices, - schedule() function - Scheduler tuning Process : Process Process Lightweight Process Process Descriptor Process Descriptor : Process Descriptor Ref: Understanding the Linux Kernel Process State : Process State TASK_RUNNING TASK_INTERRUPTIBLE TASK_UNINTERRUPTIBLE TASK_STOPPED TASK_ZOMBIE Process Descriptor Handling : Process Descriptor Handling The Process List Ref: Understanding the Linux Kernel continued… : continued… List of Data Structure Ref: Understanding the Linux Kernel Process Switch : Process Switch Hardware Context Happens only in schedule() function Steps - switch page global directory - switch kernel mode stack and H/W context The Linux 2.6.8.1 CPU Scheduler : The Linux 2.6.8.1 CPU Scheduler Runqueues The O(1) Scheduling Algorithm - one Runqueue per CPU - active priority array - expired priority array Use Priority Arrays : Use Priority Arrays active priority array bitmap[BITMAP_SIZE] bitmap[BITMAP_SIZE] : bitmap[BITMAP_SIZE] Calculating priority : Calculating priority static priority - nice() system call - specified by user - never modified by scheduler - used to calculate timeslice continued… : continued… dynamic priority - subtracts –5 to +5 from static priority depending on the time spend in running or waiting - used for scheduling purpose The schedule() function. : The schedule() function. steps involved - find process with maximum dynamic priority - prev and next pointers to process descriptors - switch to next switch page global directory switch kernel mode stack continued… : continued… Called in prev, return in next Why this is O(1) Invoked by - scheduler_tick() - system call scheduler_tick() : scheduler_tick() Invoked every 1 ms by timer interrupt Do not always invoke schedule() Whenever a task runs out of time slice, it is given new time slice and dynamic priority and put in expired array Reinsert interactive task on active array If there is no active task swap the pointers of active and expired arrays System calls : System calls Insert current task in a waitqueue Change state to TASK_INTERRUPTABLE or TASK_UNINTERRUPTABLE Invoke schedule() If resource available remove from waitqueue Handling real time tasks : Handling real time tasks Task priority range -20 to 19 SCHED_FIFO Scheduling SCHED_RR Scheduling Scheduler tuning : Scheduler tuning MIN_TIMESLICE AND MAXI_TIMESLICE PRIO_BONUS_RATIO STARVATION_LIMIT Future scope : Future scope Scheduler modes - server mode, bigger timeslice - desktop mode, more responsiveness Swappable schedulers - different scheduler for different users - basic kernel scheduler would be round robin 3. References : 3. References Josh Aas, “Understanding the Linux 2.6.8.1 CPU Scheduler”, February 2005. Abraham Silberschatz, Greg Gagne, Peter Galvin, “Operating System Concepts”, Wiley. Daniel P. Bovet, Marco Cesati, “Understanding the Linux Kernel”, 2ndEdition. O’Reilly, July 2003. http://plg.uwaterloo.ca/~itbowman/CS746G/a1/ . http://josh.trancesoftware.com/linux/ . Thank You. : Thank You.