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 = dummy_domU[0] if self.domuid == monitoring_domU[1]: self.other_domuid = dummy_domU[1] self.algo = args["algo"] self.keys = keys self.base_path = base_path self.threadLock = threadLock self.shared_data = shared_data self.timeslice_us = timeslice_us self.rtxen_or_credit = rtxen_or_credit 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, 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)