aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/sharedres.cpp
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-05-16 12:37:19 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-05-16 12:37:19 -0400
commit4bfee51d6ae7356b3f6cb2cee74123a684b4d593 (patch)
treeb6053bcb137089f478b0b2eb7251e185bc04d456 /native/src/sharedres.cpp
parentdd7f66806e66d9637b070841c2a7c914671db969 (diff)
C++: Break out the G-OMLP and G-FMLP code into own file
Part of refactoring sharedres.cpp.
Diffstat (limited to 'native/src/sharedres.cpp')
-rw-r--r--native/src/sharedres.cpp104
1 files changed, 0 insertions, 104 deletions
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,
468 468
469// **** blocking term analysis **** 469// **** blocking term analysis ****
470 470
471BlockingBounds* global_omlp_bounds(const ResourceSharingInfo& info,
472 unsigned int num_procs)
473{
474 // split every thing by resources, sort, and then start counting.
475 Resources resources;
476
477 split_by_resource(info, resources);
478 sort_by_request_length(resources);
479
480 unsigned int i;
481 BlockingBounds* _results = new BlockingBounds(info);
482 BlockingBounds& results = *_results;
483
484 for (i = 0; i < info.get_tasks().size(); i++)
485 {
486 const TaskInfo& tsk = info.get_tasks()[i];
487 Interference bterm;
488
489 foreach(tsk.get_requests(), jt)
490 {
491 const RequestBound& req = *jt;
492 const ContentionSet& cs =
493 resources[req.get_resource_id()];
494
495 unsigned int num_sources = cs.size();
496 unsigned long interval = tsk.get_response();
497 unsigned long issued = req.get_num_requests();
498
499
500 unsigned int total_limit = (2 * num_procs - 1) * issued;
501 // Derived in the dissertation: at most twice per request.
502 unsigned int per_src_limit = 2 * issued;
503
504 if (num_sources <= num_procs + 1) {
505 // FIFO case: no job is ever skipped in the
506 // priority queue (since at most one job is in
507 // PQ at any time).
508 // Lemma 15 in RTSS'10: at most one blocking
509 // request per source per issued request.
510 per_src_limit = issued;
511 total_limit = (num_sources - 1) * issued;
512 }
513
514 bterm += bound_blocking(cs,
515 interval,
516 total_limit,
517 per_src_limit,
518 &tsk);
519 }
520
521 results[i] = bterm;
522 }
523
524 return _results;
525}
526
527
528BlockingBounds* global_fmlp_bounds(const ResourceSharingInfo& info)
529{
530 // split every thing by resources, sort, and then start counting.
531 Resources resources;
532
533 split_by_resource(info, resources);
534 sort_by_request_length(resources);
535
536
537 unsigned int i;
538 BlockingBounds* _results = new BlockingBounds(info);
539 BlockingBounds& results = *_results;
540
541 unsigned int num_tasks = info.get_tasks().size();
542
543 for (i = 0; i < info.get_tasks().size(); i++)
544 {
545 const TaskInfo& tsk = info.get_tasks()[i];
546 Interference bterm;
547
548
549 foreach(tsk.get_requests(), jt)
550 {
551 const RequestBound& req = *jt;
552 const ContentionSet& cs =
553 resources[req.get_resource_id()];
554
555 unsigned long interval = tsk.get_response();
556 unsigned long issued = req.get_num_requests();
557
558 // every other task may block once per request
559 unsigned int total_limit = (num_tasks - 1) * issued;
560 unsigned int per_src_limit = issued;
561
562 bterm += bound_blocking(cs,
563 interval,
564 total_limit,
565 per_src_limit,
566 &tsk);
567 }
568
569 results[i] = bterm;
570 }
571
572 return _results;
573}
574
575static ClusterLimits np_fifo_limits( 471static ClusterLimits np_fifo_limits(
576 const TaskInfo& tsk, const ClusterResources& clusters, 472 const TaskInfo& tsk, const ClusterResources& clusters,
577 unsigned int procs_per_cluster, 473 unsigned int procs_per_cluster,