def __init__(self, threadLock, shared_data, domuid, rtxen_or_credit, timeslice_us, min_heart_rate, max_heart_rate, keys=['test'], base_path='/local/domain'): threading.Thread.__init__(self) self.domuid = (domuid) self.other_domuid = args["RTdomUs_Dummy"] if self.domuid == args["CreditdomUs"]: self.other_domuid = args["CreditdomUs_Dummy"] self.stride = int(10 / int(domuid)) self.keys = keys self.base_path = base_path self.threadLock = threadLock self.shared_data = shared_data self.algo = args["algo"] # if self.domuid==monitoring_domU[1]: # self.algo = 0 self.rtxen_or_credit = rtxen_or_credit # 1 is rtds, 0 is credit self.target_reached_cnt = 0 self.min_heart_rate = min_heart_rate self.max_heart_rate = max_heart_rate self.timeslice_us = timeslice_us self.mid = (min_heart_rate + max_heart_rate) / 2 self.pid = apid.AdapPID(self.mid, 1, min_heart_rate, max_heart_rate)
def __init__(self, threadLock, shared_data, domuid, rtxen_or_credit, timeslice_us, min_heart_rate, max_heart_rate, keys=['test'], base_path='/local/domain'): threading.Thread.__init__(self) self.domuid = (domuid) self.other_domuid = monitoring_domU[0] if self.domuid == monitoring_domU[0]: self.other_domuid = monitoring_domU[1] self.stride = int(10 / int(domuid)) self.keys = keys self.base_path = base_path self.threadLock = threadLock self.shared_data = shared_data self.algo = args["algo"] if self.domuid == monitoring_domU[1]: self.algo = 4 self.rtxen_or_credit = rtxen_or_credit # 1 is rtds, 0 is credit self.target_reached_cnt = 0 self.min_heart_rate = min_heart_rate self.max_heart_rate = max_heart_rate self.timeslice_us = timeslice_us self.mid = (min_heart_rate + max_heart_rate) / 2 self.pid = apid.AdapPID(self.mid, 1, min_heart_rate, max_heart_rate) self.allocMod = res_alloc.ResourceAllocation( args["static_alloc"], timeslice_us, min_heart_rate, max_heart_rate, self.algo, self.domuid, self.other_domuid, self.shared_data, rtxen_or_credit)
def __init__(self, threadLock, shared_data, domuid, xen_sched, timeslice_us, min_heart_rate, max_heart_rate, keys=['test'], base_path='/local/domain'): threading.Thread.__init__(self) self.domuid = (domuid) self.other_domuid = monitoring_domU[0] if self.domuid == monitoring_domU[0]: self.other_domuid = monitoring_domU[1] self.stride = int(10 / int(domuid)) self.keys = keys self.base_path = base_path self.threadLock = threadLock self.shared_data = shared_data self.algo = 4 if self.domuid == monitoring_domU[1]: self.algo = 0 self.xen_sched = xen_sched # 1 is rtds, 0 is credit self.target_reached_cnt = 0 self.min_heart_rate = min_heart_rate self.max_heart_rate = max_heart_rate self.timeslice_us = timeslice_us self.mid = (min_heart_rate + max_heart_rate) / 2 self.pid = apid.AdapPID(self.mid, 1, min_heart_rate, max_heart_rate)
def __init__(self,static_alloc, timeslice_us,min_heart_rate,max_heart_rate,algo,domuid,other_domuid,shared_data,rtxen_or_credit): self.static_alloc = static_alloc self.timeslice_us = timeslice_us self.mid_heart_rate=(min_heart_rate+max_heart_rate)/2 self.min_heart_rate=min_heart_rate self.max_heart_rate=max_heart_rate self.pid = apid.AdapPID(self.mid_heart_rate,1,min_heart_rate,max_heart_rate) self.algo = algo self.target_reached_cnt = 0 self.step_size = int(timeslice_us * 0.01) self.shared_data = shared_data self.domuid = domuid self.other_domuid = other_domuid self.rtxen_or_credit = rtxen_or_credit