priority round-robin scheduling for very large virtual environments chris faisstnauer, dieter...
Post on 19-Dec-2015
213 views
TRANSCRIPT
Priority Round-Robin SchedulingPriority Round-Robin Schedulingfor for
Very Large Virtual EnvironmentsVery Large Virtual Environments
Chris Faisstnauer, Chris Faisstnauer,
Dieter Schmalstieg, Werner PurgathoferDieter Schmalstieg, Werner Purgathofer
Vienna University of TechnologyVienna University of Technology
2 / 17Chris Faisstnauer
IntroductionIntroduction
Virtual Environments with large amounts of elementsVirtual Environments with large amounts of elements
Competition for limited resources (bottleneck)Competition for limited resources (bottleneck) Graphics pipeline (rendering)Graphics pipeline (rendering) Processing power (simulation)Processing power (simulation) Network bandwidth (updates)Network bandwidth (updates)
Selection of element subsetSelection of element subset Reduce absolute numberReduce absolute number Traditional scheduling for objectsTraditional scheduling for objects
Degradation of system performanceDegradation of system performance
Approximation must be madeApproximation must be made
3 / 17Chris Faisstnauer
GoalGoal
Development of a generic scheduling algorithmDevelopment of a generic scheduling algorithm Employ it as stand-alone schedulingEmploy it as stand-alone scheduling Combine with “element-reduction” methodsCombine with “element-reduction” methods
Graceful degradation (find best approximation)Graceful degradation (find best approximation) Output sensitiveOutput sensitive Immune to starvationImmune to starvation Enforce use of prioritiesEnforce use of priorities Priorities based on freely definable error metricPriorities based on freely definable error metric
E.g.: fast entities E.g.: fast entities frequent updates frequent updates slow entities slow entities seldom updates seldom updates
4 / 17Chris Faisstnauer
Related WorkRelated Work
Short-term schedulingShort-term scheduling independent processesindependent processes allocate processor timeallocate processor time optimize system behavioroptimize system behavior
First Come-First Served (FCFS) / Round-Robin (RR)First Come-First Served (FCFS) / Round-Robin (RR) execute in order of submission (no priorities)execute in order of submission (no priorities) output sensitive, immune to starvationoutput sensitive, immune to starvation
Multi-Level Feedback QueueMulti-Level Feedback Queue levels with decreasing prioritieslevels with decreasing priorities risk of starvation vs. constant monitoringrisk of starvation vs. constant monitoring
5 / 17Chris Faisstnauer
Basic Priority Round-Robin 1/3Basic Priority Round-Robin 1/3
Elements compete for resources Elements compete for resources accumulate error accumulate error
Error modeled as error metricError modeled as error metric Assign each element: Error Per Unit (EPU)Assign each element: Error Per Unit (EPU)
GoalGoal: minimize cumulative error: minimize cumulative error
No traditional sortingNo traditional sorting
Approximate sorting in multiple levels (FIFO)Approximate sorting in multiple levels (FIFO) Elements assigned to level according EPUElements assigned to level according EPU Level priority reflects scheduling frequencyLevel priority reflects scheduling frequency Combines advantage of Round-Robin & full sortingCombines advantage of Round-Robin & full sorting
6 / 17Chris Faisstnauer
Basic Priority Round-Robin 2/3Basic Priority Round-Robin 2/3
Selected elements: A,C,G - B,D,G - A,E,G - B,F,G
Repetition counti = NrElementsi * NrLevels
Predicted error = ErrorPerUnit * Repetition Count
i=0
i=1
i=2
7 / 17Chris Faisstnauer
Basic Priority Round-Robin 3/3Basic Priority Round-Robin 3/3
Assignment of elements to levelsAssignment of elements to levels Minimum overall errorMinimum overall error Average Error Per Unit Average Error Per Unit variable size levels variable size levels
Dynamic VE Dynamic VE dynamic error distribution dynamic error distribution
Varying traversal rate (level Varying traversal rate (level ii))
level
1ii
i
ii tr*
tr
nrc
ni: number of elements in level itri: traversal rate of level ilevel: number of levels
8 / 17Chris Faisstnauer
Optimum Traversal Rate 1/2 Optimum Traversal Rate 1/2
level
1ii
i
ii tr*
tr
nrc
level
1kk
i
i2i
iiii tr*tr
av*nrc*av*nlerr
level
1ii
level
1i i
i2i
level
1ii tr*
trav*n
lerrerr
level: number of levelsni: nr of elements in level i avi: average EPU of level irci: repetition count of level i tri: traversal rate of level ilerri: level error err: cumulative error
9 / 17Chris Faisstnauer
Optimum Traversal Rate 2/2 Optimum Traversal Rate 2/2
level
1i ii
2ilevel1 tr
1*) av* (n)tr,...,err(tr
1trconslevel
1ii
grad err = * grad cons
level
1kk
2k
i2
ii
av* n
av* n tr
level: number of levels ni: nr of elements in level iavi: average EPU of level irci: repetition count of level itri: traversal rate of level ilerri: level errorerr: cumulative error
10 / 17Chris Faisstnauer
EvaluationEvaluation
Client-server systemClient-server system Server hosts simulator (translates elements in 2D)Server hosts simulator (translates elements in 2D) Client visualizes scene (needs position updates)Client visualizes scene (needs position updates)
Subset of element’s position can be updatedSubset of element’s position can be updated Select subset using PRR-schedulingSelect subset using PRR-scheduling
Visual error: distance object position on server / clientVisual error: distance object position on server / client
Evaluation of PRR (Priority Round-Robin)Evaluation of PRR (Priority Round-Robin) Comparison PRR vs. plain RRComparison PRR vs. plain RR Comparison DR+PRR vs. plain DRComparison DR+PRR vs. plain DR
12 / 17Chris Faisstnauer
Example 1Example 1Scheduling 1000 out of 10000 simulated cars (10%)Scheduling 1000 out of 10000 simulated cars (10%)
Velocities (in units):Velocities (in units): 500 cars - velocity 500 cars - velocity [9,10] [9,10]
1500 cars - velocity 1500 cars - velocity [3,4] [3,4]
8000 cars - velocity 8000 cars - velocity [0.1,0.5] [0.1,0.5]
Overall error of PRR is 73% lower than RR
13 / 17Chris Faisstnauer
Example 2Example 2
Scheduling 1000 out of 10000 simulated cars (10%)Scheduling 1000 out of 10000 simulated cars (10%)
Velocities (in units):Velocities (in units): 10000 cars - velocity 10000 cars - velocity [1,10] [1,10]
Overall error of PRR is 7.5% lower than RROverall error of PRR is 7.5% lower than RR
14 / 17Chris Faisstnauer
Example 3Example 3Scheduling 1000 out of 10000 simulated cars (10%)Scheduling 1000 out of 10000 simulated cars (10%)
Simulating cars using Dead Reckoning (Simulating cars using Dead Reckoning ( 25% cars above threshold) 25% cars above threshold)
500 cars 500 cars - velocity- velocity[9,10] [9,10] - angle offset - angle offset [19[19,20,20]] every 10 stepsevery 10 steps
1500 cars1500 cars - velocity- velocity[3,4] [3,4] - angle offset - angle offset [4[4,5,5] ] every 10 stepsevery 10 steps
8000 cars8000 cars - velocity- velocity[0.1,0.5][0.1,0.5] - angle offset - angle offset [1[1,2,2] ] every 10 stepsevery 10 steps
Overall error of DR+PRR is 63% lower than DR
15 / 17Chris Faisstnauer
Example 4Example 4
Quake Deathmatch: scheduling 2 out of 9 playersQuake Deathmatch: scheduling 2 out of 9 players
Position / velocity of entities given by recorded demoPosition / velocity of entities given by recorded demo
Overall error of PRR is 48% lower than RROverall error of PRR is 48% lower than RR
16 / 17Chris Faisstnauer
ConclusionsConclusions
Enhance (plain) RR Enhance (plain) RR Priority Round-Robin (PRR) Priority Round-Robin (PRR) Enforcement of prioritiesEnforcement of priorities Output sensitiveOutput sensitive Immune to starvationImmune to starvation Freely definable error metricFreely definable error metric
PRR is a suitable substitute for RR in most casesPRR is a suitable substitute for RR in most cases Minimize overall visual error in VEMinimize overall visual error in VE
Combine Priority Round-Robin and Dead ReckoningCombine Priority Round-Robin and Dead Reckoning
Combine Priority Round-Robin and visibility techniquesCombine Priority Round-Robin and visibility techniques
17 / 17Chris Faisstnauer
Future WorkFuture Work
Measure for object “activity”Measure for object “activity”
Use of visibility informationUse of visibility information Temporal Bounding Volumes (TBV)Temporal Bounding Volumes (TBV) Temporally invariant Bounding Volumes (tiBV)Temporally invariant Bounding Volumes (tiBV)
Evaluate motion data from large Virtual EnvironmentsEvaluate motion data from large Virtual Environments E.g. “Everquest”, “Ultima Online”E.g. “Everquest”, “Ultima Online” Scheduling humanoid avatars Scheduling humanoid avatars Multiple Levels Of Detail (LOD)Multiple Levels Of Detail (LOD)
18 / 17Chris Faisstnauer
OS vs. VE - SchedulingOS vs. VE - Scheduling
Operating systemsOperating systems
Scheduled onceScheduled once Priorities: scheduling orderPriorities: scheduling order Small number of elementsSmall number of elements Constant monitoringConstant monitoring Variable amount resourcesVariable amount resources
Virtual EnvironmentsVirtual Environments
Scheduled repeatedlyScheduled repeatedly Priorities: scheduling frequency Priorities: scheduling frequency (Very) large number elements(Very) large number elements Output sensitiveOutput sensitive Constant amount resourcesConstant amount resources
Optimize system parametersOptimize system parameters Enforce prioritiesEnforce priorities Minimize risk starvationMinimize risk starvation