Expose resource-waiter choice to custom scheduling strategies

オープン
#78 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
testing

調査の方向性

Start by reading SimulationScheduler.SelectResourceWaiter, ISimulationSchedulingStrategyRuntimeHooks.ChooseResourceWaiter, and SimulationResourceWaiterInfo, then trace how built-in strategies record ResourceWinner decisions. Check existing scheduler tests for waiter selection and exact replay. Done means a public optional strategy hook can choose among waiters and the choice is recorded for replay.

索引モデルが issue の本文から書いたものです。

説明

SimulationScheduler.SelectResourceWaiter asks the strategy for a waiter through ISimulationSchedulingStrategyRuntimeHooks.ChooseResourceWaiter, which is internal, as is SimulationResourceWaiterInfo. A custom ISimulationSchedulingStrategy therefore always wakes the first pending waiter of a semaphore, monitor, or wait handle. A systematic explorer built on the public strategy interface cannot enumerate wake orders, which is where some lock- and semaphore-ordering bugs live.

Proposal. Add a public optional interface which a custom strategy may implement, for example:

public interface ISimulationResourceWaiterStrategy
{
    int ChooseWaiter(IReadOnlyList<SimulationResourceWaiterInfo> waiters);
}

Make SimulationResourceWaiterInfo public, with the waiter's operation ID and the resource's identity. The scheduler would record the choice as a ResourceWinner decision, as it does for the built-in strategies, so exact replay is unchanged.

Consumer. Clog's WindowScheduleExplorer (ReubenBond/clog#365) enumerates scheduling choices inside concurrent windows by re-execution, with a preemption bound. Without this hook, Clog records FIFO wake order as a qualification boundary.

主要言語
C#
スター
0
フォーク
0
平均マージ
2時間 32分
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ReubenBond/Clockwork のほかの issue

ReubenBond/Clockwork の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。