Date post: | 07-Jul-2015 |
Category: |
Technology |
Upload: | santosh-nage |
View: | 73 times |
Download: | 1 times |
Scheduling in Next Generation Operating Systems
Presented By:
Santosh G. Nage
Guide:
Prof. Girish Potdar
HOD (Computer Engineering)
April 24, 20141
o Need
o Motivation
o Literature Survey
o Objective
o Architecture of multi-core processor
o Scheduler design
o New scheduling policy
o Proposed MM
o Implementation
o Advantages
o Conclusion
o References
Agenda
Scheduling in Next Generation Operating Systems 2
Need
Scheduling in Next Generation Operating Systems3
…
Moore’s Law for Software??
…
Moore’s law
speed of computers doubled every 18-24 months
Need
Scheduling in Next Generation Operating Systems4
o Scheduling - directly affects the performance of the system.
o The existing scheduler does not necessarily yield the best
performance for multi-core systems.
o Need - new scheduling policy specifically for multi-core
systems.
Motivation
Scheduling in Next Generation Operating Systems 5
o Existing Scheduling policies are not optimally utilizing CPU resources.
o To modify the existing scheduling policy for multi-core systems.
o To solve a given problem with different performances under different
circumstances. We need to specify several algorithms for each task
and OS selects the most suitable one.
o Breaking tasks among several cores to implement parallel working.
Literature Survey
Name of paper Name of Author Key idea
Cache Friendliness-Aware Management of Shared Last-Level Caches for High Performance Multi-Core Systems
Dimitris Kaseridis, Muhammad Faisal Iqbal, Lizy Kurian John
Last Level Cache management
Adaptive Cache Aware BitierWork-Stealing in Multi socket Multi core Architectures
Quan Chen, Minyi Guo, Zhiyi Huang
Traditional approach with divide and conquer
On benefits of Work Stealing in Shared Memory Multiprocessors
Danial Neill, Adam Wierman Stealing is better than sharing
6Scheduling in Next Generation Operating Systems
Objectives
Scheduling in Next Generation Operating Systems 7
o To study existing Different Scheduling Policies.
o To understand the data structures and functions.
o To design new scheduling policy, which will give better performance
on the Multi-core machines as compared to existing policy.
o To embed the newly implemented policy into existing scheduler.
o Compare the performance on multi-core system.
Architecture of Multi-core
Scheduling in Next Generation Operating Systems 8
Scheduler Architecture
Scheduling in Next Generation Operating Systems 9
Sched_mcoreSched_fair (CFS) Sched_rt
SCHEDULER
SCHED_FIFOSCHED_RRSched_mcoreSCHED_NORMAL SCHED_NORMAL
Task of scheduler
• Be fair – give each process a fair share of the CPU, allow each process to run in a reasonable amount of time.
• Be efficient – keep the CPU busy all the time.
• Maximize throughput – service the largest possible number of jobs in a given amount of time; minimize the amount of time users must wait for their results.
• Minimize response time – interactive users should see good performance.
• Be predictable – a given job should take about the same amount of time to run when run multiple times.
• Minimize overhead – don’t waste too many resources. Keep scheduling time and context switch time at a minimum.
• Maximize resource use – favour processes that will use underutilized resources. Giving the process more CPU time may free up the resource quicker.
• Enforce priorities – if the scheduler allows a process to be assigned a priority, it should be meaningful and enforced.
10Scheduling in Next Generation Operating Systems
New Scheduling Policy
• Work Sharing
A working core with parallel task queries see the other which is free to take on additional work.
• Work Stealing
A core that finds itself without work simply selects one other core at random and pulls task out of its queue.
• Work shrugging
Pushing surplus work away from busy processors onto less loaded neighbours, rather than have idle processors pulling work from busy neighbours
11Scheduling in Next Generation Operating Systems
Proposed Mathematical Model
Let, S:Y= fs (X) be a system such that
S = {s,e,X,Y,Ep,Sp,Cp,DD,NDD,Sr,F }
s-be start state of the system
e-be end state of the system
X-be the set of processes as set of input to the multi-core processor .
{ P1,P2,P3,…..}
Sr-be the shared resources.
{Sr1,Sr2,Sr3,…..}
Ep-set of execution times of processes.
{ep1,ep2,ep3,…..}
Sp-set of spawned process.
{sp1,sp2,sp3…..}
Scheduling in Next Generation Operating Systems 12
NDD- A given multithreaded program when run on a given input can sometimes generate more than one multithreaded computation.
DD- The same multithreaded computation is generated by the program on the input no matter how the computation is scheduled, then the program is deterministic.
Tcp-set of tasks scheduled on cores of processor.
Total time required for execution is
Tcp= min(Epi) where i=1,2,3…..
one core can execute only one instruction at a time.
T∞-critical path as many instructions per core.
We must have,
Tcp≥T1/(P+T∞)
13Scheduling in Next Generation Operating Systems
Tcp≥T∞
T there exist P -processor execution schedules X with
T(X ) ≤ T1=P + T1.
Consider the execution of any multithreaded computation with critical path length ‘T∞’ by scheduling algo. On parallel computer with Cp-multi-core processor.
for any € > 0 probability at least (1-€). At most
O(P(T∞+log(1/€))) work stealing occurs.
Each process allocates a task on each core.
F(allocate): P Cp
If Cp is ideal then it steals an instruction of randomly a core.
F(rand) : P(Sp1,Sp2,Sp3…..)Cp
14Scheduling in Next Generation Operating Systems
It returns back the results to the victim core.
F(return) :Cp(Y)P
Y-tasks are scheduled on the cores and gives output.
15Scheduling in Next Generation Operating Systems
Implementation
Scheduling in Next Generation Operating Systems 16
o Steps involved in the implementation:
o Install Linux (Ubuntu 12.04 LTS) 64-bit
o Download Linux source code 3.14.1
o Analyze dependencies of sched.c and kernel source
o Implementing new scheduling policy
o Embed new scheduling policy into existing scheduler
o Make necessary changes in other files
Advantages
Scheduling in Next Generation Operating Systems
• Scalable performance in accordance cores with minimal
communication overhead.
• Scheduling can support core-affinity.
• Simple approach to avoid code complexity.
• Maintainable as code available as a patch.
• Improved performance because of optimal core utilization.
• Improved flexibility in the design.
17
Conclusion
o In this seminar, the existing scheduler has been modified
for the multi-core systems.
o A new scheduling policy has been designed and
implementing specifically for the multi-core systems.
o In future different scheduling policies and the criteria's for
multi-core processor will be coined and designed for
maximizing the CPU resources more efficiently.
o Concept of Hyper Threading Technology can be introduced.
Scheduling in Next Generation Operating Systems 18
References
Scheduling in Next Generation Operating Systems 19
[1] A. Silberschatz, P.B. Gailvin, G. Gagne, “Operating System Concepts,” 7th Edition, John Wiley
& Sons Inc., 2005.
[2] Yizhuo Wang, Weixing Ji, Qi Zuo, Feng Shi, “A Hierarchical Work-Stealing Framework for
Multi-core Clusters”, 2012 13th International Conference on Parallel and Distributed Computing,
Applications and Technologies
[3 Javier Diaz, Camelia Mun˜oz-Caro, and Alfonso Nino, " A Survey of Parallel Programming Models and Tools in the Multi and Many-Core Era,” IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 23, NO. 8, AUGUST 2012.
[4 Dimitris Kaseridis, Muhammad Faisal Iqbal, Lizy Kurian John, Cache Friendliness-Aware Management of Shared Last-Level Caches for High Performance Multi-Core Systems," IEEE TRANSACTIONS ON COMPUTERS, VOL. 63, NO. 4, APRIL 2014.
[5 James Dinan, D. Brian Larkins,P. Sadayappan, Sriram Krishnamoorthy, Jarek Nieplocha" Scalable Work Stealing,” SC 09 November 14-20, 2009, Portland, Oregon, USA Copyright 2009 ACM 978-1-60558-744-8/09/11
[6 ]R.M. Ramanathan , Intel® Multi-Core Processors Making the Move to Quad-Core and Beyond,” White Paper.
[7] SIMON PETER," Resource Management in a Multicore Operating System “, PhD thesis in 2012
[8] Quan Chen, Minyi Guo, Zhiyi Huang “Adaptive Cache Aware Bitier Work-Stealing in Multisocket Multicore Architectures” IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 24 NO 12, DEC 2013
[ 9 ] Danial Neill, Adam Wierman, “On benefits of Work Stealing in Shared Memory Multiprocessors” .
[ 10 ] Shay Gal-On and Markus Levy, “Measuring Multi-core Performance”, Published by IEEE Computer Society Nov 2008.
20
References
Scheduling in Next Generation Operating Systems
Scheduling in Next Generation Operating Systems 21
Scheduling in Next Generation Operating Systems 22