From 4bfee51d6ae7356b3f6cb2cee74123a684b4d593 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Wed, 16 May 2012 18:37:19 +0200 Subject: C++: Break out the G-OMLP and G-FMLP code into own file Part of refactoring sharedres.cpp. --- native/src/sharedres.cpp | 104 ----------------------------------------------- 1 file changed, 104 deletions(-) (limited to 'native/src/sharedres.cpp') diff --git a/native/src/sharedres.cpp b/native/src/sharedres.cpp index 259e5a7..4520ccb 100644 --- a/native/src/sharedres.cpp +++ b/native/src/sharedres.cpp @@ -468,110 +468,6 @@ static void charge_arrival_blocking(const ResourceSharingInfo& info, // **** blocking term analysis **** -BlockingBounds* global_omlp_bounds(const ResourceSharingInfo& info, - unsigned int num_procs) -{ - // split every thing by resources, sort, and then start counting. - Resources resources; - - split_by_resource(info, resources); - sort_by_request_length(resources); - - unsigned int i; - BlockingBounds* _results = new BlockingBounds(info); - BlockingBounds& results = *_results; - - for (i = 0; i < info.get_tasks().size(); i++) - { - const TaskInfo& tsk = info.get_tasks()[i]; - Interference bterm; - - foreach(tsk.get_requests(), jt) - { - const RequestBound& req = *jt; - const ContentionSet& cs = - resources[req.get_resource_id()]; - - unsigned int num_sources = cs.size(); - unsigned long interval = tsk.get_response(); - unsigned long issued = req.get_num_requests(); - - - unsigned int total_limit = (2 * num_procs - 1) * issued; - // Derived in the dissertation: at most twice per request. - unsigned int per_src_limit = 2 * issued; - - if (num_sources <= num_procs + 1) { - // FIFO case: no job is ever skipped in the - // priority queue (since at most one job is in - // PQ at any time). - // Lemma 15 in RTSS'10: at most one blocking - // request per source per issued request. - per_src_limit = issued; - total_limit = (num_sources - 1) * issued; - } - - bterm += bound_blocking(cs, - interval, - total_limit, - per_src_limit, - &tsk); - } - - results[i] = bterm; - } - - return _results; -} - - -BlockingBounds* global_fmlp_bounds(const ResourceSharingInfo& info) -{ - // split every thing by resources, sort, and then start counting. - Resources resources; - - split_by_resource(info, resources); - sort_by_request_length(resources); - - - unsigned int i; - BlockingBounds* _results = new BlockingBounds(info); - BlockingBounds& results = *_results; - - unsigned int num_tasks = info.get_tasks().size(); - - for (i = 0; i < info.get_tasks().size(); i++) - { - const TaskInfo& tsk = info.get_tasks()[i]; - Interference bterm; - - - foreach(tsk.get_requests(), jt) - { - const RequestBound& req = *jt; - const ContentionSet& cs = - resources[req.get_resource_id()]; - - unsigned long interval = tsk.get_response(); - unsigned long issued = req.get_num_requests(); - - // every other task may block once per request - unsigned int total_limit = (num_tasks - 1) * issued; - unsigned int per_src_limit = issued; - - bterm += bound_blocking(cs, - interval, - total_limit, - per_src_limit, - &tsk); - } - - results[i] = bterm; - } - - return _results; -} - static ClusterLimits np_fifo_limits( const TaskInfo& tsk, const ClusterResources& clusters, unsigned int procs_per_cluster, -- cgit v1.2.2