Semantical Cognitive SchedulingIgal ShilmanBen-Gurion University, Be’er-ShevaJoint work with: Prof. ShlomiDolevBen-Gurion University, Be’er-ShevaDr. AviMendelsonMicrosoft Research, Hertzlia
AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
Background Cont.A processes is a program in execution.The  Operating System (OS) manages the processes.
The Process SchedulerA major component of operating systems. Scheduling policies:user interactivitythroughputreal time responsiveness
User interactivityMeasured as the amount of 	time passed from the user’s action	 and the program response.Two Major algorithms that adhere to user interactivity are:Priority basedGuaranteed based
MotivationSuppose we have Skype running but no internet connection present.Observe the following behavioral pattern:Tries to connect(I/O)Tries to connect(I/O)…Connection Failed.Wait a whileConnection Failed.Wait a whileTime
Motivation Cont.Clearly semantical progress that Skype does (and therefore benefit to the user) is: None!AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
Our ApproachProcess behavior depends greatly on the state of the OS. A good scheduler will take into account the current state of the system. There is nosuch scheduler!
Our Approach – Def.A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.Utility valuestateNo Internet connection presentConnection is present
Our Approach – Def .A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.Stateis the position of the RW headP want to get block yyP’ want to get block xx
Our Approach – Def.A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.State Utility valueCoefficients  Reflects importance
AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
Obtaining the Utility ValueClassical scheduling techniques assume no (a priori) knowledge.The amount of unique classes of applications that the scheduler meets is relatively small.We propose few approaches for obtaining the utility value.
Obtaining the Utility ValueBlack box approach.Use machine learning theory.Correlate state and application compatibility statistically.Learning users feedback.Interpret user actions (like clicks, amount of time that the window reminded focused, etc)
Obtaining the Utility ValueWhite box approach. Provided by software vendors.An agent that lives inside the process and communicates with the OS-defined APIVendors interests.
AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state spaceThe use of the dependency graph
SystemSettingsA set of n processes,A set of r states, A utility functionwhich assigns a value to each process and state.A transition function.An initial stateWe wish to find an ordering                       which will maximize:
Example
Example
AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
Problem ComplexityTheorem 1: Any algorithm that solves the utility maximization problem, for which                     , has to consider any ordering, thus its time complexity is            .     is a black-box.  Need to explore 	Unique edges.Each edge introduce new	Weight.
Problem ComplexityTheorem 1: Any algorithm that solves the utility maximization problem, for which                     , has to consider any ordering, thus its time complexity is            .This problem is HARD!
AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
Bounded state spaceGeneral case:  We assume, that the number of abstract states is bounded, in fact: ≤For example ACPI has a constant (140) number of states.
Dynamic programming approachWe need to scheduleInitial state:  sRecursive equation:The Problem is reduced to finding an optimal ordering of              processes which start at:
Dynamic programming - Cont.There are              subsets of P.Each subset has to be considered with any of the r states from S. Number of recursive calls is                  Running time is:        Space is: Which is an improvement over
Non-optimal approachGreedy approach:Chose the process that introduces the maximal utility value in the current state.The batch could be scheduled in p1p1p1S3S2S1
Non-optimal approachGreedy approach:Chose the process that introduces the maximal utility value in the current state. The batch could be scheduled in The method could be extended naturally for a parameter t:EvaluateTime:  O(nt)  (Bounded depth DFS)

Semantical Cognitive Scheduling

  • 1.
    Semantical Cognitive SchedulingIgalShilmanBen-Gurion University, Be’er-ShevaJoint work with: Prof. ShlomiDolevBen-Gurion University, Be’er-ShevaDr. AviMendelsonMicrosoft Research, Hertzlia
  • 2.
    AgendaBackground & MotivationOurApproach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
  • 3.
    Background Cont.A processesis a program in execution.The Operating System (OS) manages the processes.
  • 4.
    The Process SchedulerAmajor component of operating systems. Scheduling policies:user interactivitythroughputreal time responsiveness
  • 5.
    User interactivityMeasured asthe amount of time passed from the user’s action and the program response.Two Major algorithms that adhere to user interactivity are:Priority basedGuaranteed based
  • 6.
    MotivationSuppose we haveSkype running but no internet connection present.Observe the following behavioral pattern:Tries to connect(I/O)Tries to connect(I/O)…Connection Failed.Wait a whileConnection Failed.Wait a whileTime
  • 7.
    Motivation Cont.Clearly semanticalprogress that Skype does (and therefore benefit to the user) is: None!AgendaBackground & MotivationOur Approach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
  • 8.
    Our ApproachProcess behaviordepends greatly on the state of the OS. A good scheduler will take into account the current state of the system. There is nosuch scheduler!
  • 9.
    Our Approach –Def.A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.Utility valuestateNo Internet connection presentConnection is present
  • 10.
    Our Approach –Def .A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.Stateis the position of the RW headP want to get block yyP’ want to get block xx
  • 11.
    Our Approach –Def.A state is an abstract description of the OS’s memory.The utility valueassigns a value to the semantical progress gained when some process is scheduled in a certain state.State Utility valueCoefficients Reflects importance
  • 12.
    AgendaBackground & MotivationOurApproach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
  • 13.
    Obtaining the UtilityValueClassical scheduling techniques assume no (a priori) knowledge.The amount of unique classes of applications that the scheduler meets is relatively small.We propose few approaches for obtaining the utility value.
  • 14.
    Obtaining the UtilityValueBlack box approach.Use machine learning theory.Correlate state and application compatibility statistically.Learning users feedback.Interpret user actions (like clicks, amount of time that the window reminded focused, etc)
  • 15.
    Obtaining the UtilityValueWhite box approach. Provided by software vendors.An agent that lives inside the process and communicates with the OS-defined APIVendors interests.
  • 16.
    AgendaBackground & MotivationOurApproach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state spaceThe use of the dependency graph
  • 17.
    SystemSettingsA set ofn processes,A set of r states, A utility functionwhich assigns a value to each process and state.A transition function.An initial stateWe wish to find an ordering which will maximize:
  • 18.
  • 19.
  • 20.
    AgendaBackground & MotivationOurApproach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
  • 21.
    Problem ComplexityTheorem 1:Any algorithm that solves the utility maximization problem, for which , has to consider any ordering, thus its time complexity is . is a black-box. Need to explore Unique edges.Each edge introduce new Weight.
  • 22.
    Problem ComplexityTheorem 1:Any algorithm that solves the utility maximization problem, for which , has to consider any ordering, thus its time complexity is .This problem is HARD!
  • 23.
    AgendaBackground & MotivationOurApproach Obtaining the utility valueSystem SettingsProblem ComplexityBounded state space
  • 24.
    Bounded state spaceGeneralcase: We assume, that the number of abstract states is bounded, in fact: ≤For example ACPI has a constant (140) number of states.
  • 25.
    Dynamic programming approachWeneed to scheduleInitial state: sRecursive equation:The Problem is reduced to finding an optimal ordering of processes which start at:
  • 26.
    Dynamic programming -Cont.There are subsets of P.Each subset has to be considered with any of the r states from S. Number of recursive calls is Running time is: Space is: Which is an improvement over
  • 27.
    Non-optimal approachGreedy approach:Chosethe process that introduces the maximal utility value in the current state.The batch could be scheduled in p1p1p1S3S2S1
  • 28.
    Non-optimal approachGreedy approach:Chosethe process that introduces the maximal utility value in the current state. The batch could be scheduled in The method could be extended naturally for a parameter t:EvaluateTime: O(nt) (Bounded depth DFS)

Editor's Notes

  • #4 להוסיף תמונות של תוכנות ומערכות הפעלה ותמונה לפעולת מערכת הפעלה
  • #5 - Assigns process to CPU