Skip to content

Refine resource's queue discipline #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Enchufa2 opened this issue Nov 23, 2015 · 9 comments
Closed

Refine resource's queue discipline #20

Enchufa2 opened this issue Nov 23, 2015 · 9 comments
Milestone

Comments

@Enchufa2
Copy link
Member

  • Add priorities.
  • Preemption?
@bart6114
Copy link
Member

bart6114 commented Dec 1, 2015

ideally different levels of priorities
where a higher "level number" equals a higher priority

e.g.

t0<-
  create_trajectory() %>%
  seize("operator", 1, priority=2) %>%
  timeout(3) %>%
  release("operator", 1)

@bart6114
Copy link
Member

bart6114 commented Dec 7, 2015

woops, didn't mean to close it 😬

@bart6114 bart6114 reopened this Dec 7, 2015
@bart6114
Copy link
Member

bart6114 commented Dec 7, 2015

@Enchufa2
Copy link
Member Author

Enchufa2 commented Dec 7, 2015

Nice! BTW, merge the latest developments of the master branch in your tree, please. For instance, I introduced the Boost library and I created a new header devoted to standardise the use of efficient containers (vector, queues, map, set...) through macros.

@bart6114
Copy link
Member

bart6114 commented Dec 7, 2015

nice^2

I'll try to do the merge this evening

@bart6114
Copy link
Member

bart6114 commented Dec 7, 2015

check 8a23121 for a start with testing FIFO processing (and implementation)

@bart6114
Copy link
Member

bart6114 commented Dec 7, 2015

moved compare func into the struct (tx, a lot more elegant) e2d2822

haven't had time to look into in in detail but couldn't get your suggestion working on the simple FIFO ordering when priorities are equal (for example, std::sort also doesn't guarantee preserving order of equal elements).

Enchufa2 added a commit that referenced this issue Dec 7, 2015
merging initial priority queue developments into dev-main (#20)
@Enchufa2
Copy link
Member Author

Enchufa2 commented Dec 7, 2015

You are right. Definitely, we need the arrived_at secondary key (and my tests suggest that the priority queue performs similarly to the previous FIFO queue 👍). As a consequence, I had to use priorities to ensure that releases go before seizes (see ac74e22 and this test).

Now, what about preemption? It is a far more complex task. 😬 I'm going to merge the current changes into the master branch before continuing with this.

Enchufa2 added a commit that referenced this issue Dec 7, 2015
Latest developments on #20 and some fixes
@bart6114
Copy link
Member

bart6114 commented Dec 8, 2015

Let's close this and discuss the preemption (which will be a far bigger challenge 😀) in #34

@bart6114 bart6114 closed this as completed Dec 8, 2015
@Enchufa2 Enchufa2 added this to the v3.1.0 milestone Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants