๐Ÿ“ฆ Preemptively Scheduling Hard-Real-Time Sporadic Tasks on One Processor

Bardยท2025๋…„ 3์›” 31์ผ
1

RTCL

๋ชฉ๋ก ๋ณด๊ธฐ
6/8
post-thumbnail

Contributions

  • Sporadic Task Set์˜ Schedulability์— ๋Œ€ํ•œ ํ•„์š”์ถฉ๋ถ„์กฐ๊ฑด ๋„์ถœ
  • ๋Œ€๋ถ€๋ถ„์˜ ์ •์ˆ˜ ๋‹จ์œ„ Sporadic Task Set์—์„œ ๋™์ž‘ํ•˜๋Š” Pseudo-polynomial ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ œ์•ˆ.
  • feasibilityfeasibility ํ…Œ์ŠคํŠธ๊ฐ€ co-NP์ž„์„ ์ฆ๋ช…
  • ์ •์ˆ˜ ์ œ์•ฝ์ด ์—†๋Š” Continuous ๋ชจ๋ธ๋กœ์˜ ํ™•์žฅ
  • Sporadic + Polynomial task set์— ๋Œ€ํ•œ ๋…ผ์˜

Feasibility with respect to sporadic task systems

  • ์ด๋ฏธ Periodic task system์— ๋Œ€ํ•œ ์‹คํ–‰๊ฐ€๋Šฅ์„ฑ ๊ฒ€์‚ฌ๋Š” co-NP ์™„์ „์ž„์ด ์ฆ๋ช…๋˜์—ˆ์Œ.

Symbols

  • ฯ„\tau ๋Š” {T1,โ€ฆ,Tn}\{T_1, \dots, T_n\} ๋“ค์˜ ์ง‘ํ•ฉ.
  • Ti=(ei,di,pi)T_i = (e_i, d_i, p_i) : eie_i: ์‹คํ–‰ ์‹œ๊ฐ„, did_i: ์ƒ๋Œ€ ๋ฐ๋“œ๋ผ์ธ, pp: ์ตœ์†Œ ์‹คํ–‰ ์ฃผ๊ธฐ
  • P=lcm{p1,โ€ฆ,pn}P = \rm{lcm}\{p_1, \dots, p_n\}
  • (i,t0)(i, t_0): t0t_0 ์‹œ๊ฐ„์— ๋ฐœ์ƒํ•œ TiT_i์˜ ์š”์ฒญ (ฯ„\tau-request)
  • ฯ„\tau-request์˜ ์ง‘ํ•ฉ RR์ด schedulableschedulable ํ•จ : ํ”„๋กœ์„ธ์„œ๊ฐ€ RR์˜ ๋ชจ๋“  ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ์Œ.
  • legallegal : RR์ด (i,t1)(i, t_1)๊ณผ (i,t2)(i, t_2)๋ฅผ ํฌํ•จํ•  ๋•Œ, โˆฃt1โˆ’t2โˆฃโ‰ฅpi|t_1-t_2| \ge p_i๋ฅผ ๋งŒ์กฑํ•จ.
  • feasiblefeasible: ๋ชจ๋“  ฯ„\tau-requests ์˜ legallegalํ•œ ์ง‘ํ•ฉ์ด schedulableschedulableํ•จ.
  • ฯƒ\sigma ๋ผ๋Š” online scheduling iterative ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ •์˜ํ•จ.
  • (i,t0)(i, t_0)๊ฐ€ tt์— activeactive : t0โ‰คt<to+dit_0 \le t < t_o + d_i์ด๊ณ , ฯƒ\sigma๊ฐ€ (i,t0)(i, t_0)๋ฅผ ํ”„๋กœ์„ธ์„œ์— ํ• ๋‹นํ•˜์ง€ ์•Š์•˜์Œ.
  • tt์— failurefailure: t0+di=tt_0+d_i = t์ง€๋งŒ ฯƒ\sigma๊ฐ€ (i,t+0)(i,t+0)๋ฅผ [t0,t)[t_0, t)์— ํ”„๋กœ์„ธ์„œ์— ํ• ๋‹นํ•˜์ง€ ์•Š์•˜์Œ.
  • ฯƒ\sigma๋Š” ฯ„\tau-requests์˜ legallegal set์— ๋Œ€ํ•ด ์ ˆ๋Œ€ failurefailure๋ฅผ ๋„์šฐ์ง€ ์•Š์„ ๋•Œ schedulableschedulableํ•จ.
(ฯƒ.R)(t)={(i,t0),failuremeaningย thatย ฯƒย atย timeย tย allocatesย theย processorย toย ฯ„-requestย (i,t0)ย andย reportsย failure.(0,0),failuremeaningย thatย ฯƒย atย timeย tย leavesย theย processorย idleandย reportsย failure.(i,t0)meaningย thatย ฯƒย atย timeย tย allocatesย theย processorย toย ฯ„-requestย (i,t0)ย andย doesย notย reportย failure.(0,0)meaningย thatย ฯƒย atย timeย tย leavesย theย processorย idleย andย doesย notย reportย failure.(\sigma . R)(t) = \begin{cases} (i, t_0), \textit{failure} & \text{meaning that } \sigma \text{ at time } t \text{ allocates the processor to }\\ &\tau\text{-request } (i, t_0) \text{ and reports failure.} \\ (0, 0), \textit{failure} & \text{meaning that } \sigma \text{ at time } t \text{ leaves the processor idle}\\ & \text{and reports failure.} \\ (i, t_0) & \text{meaning that } \sigma \text{ at time } t \text{ allocates the processor to }\\ & \tau\text{-request } (i, t_0) \text{ and does not report failure.} \\ (0, 0) & \text{meaning that } \sigma \text{ at time } t \text{ leaves the processor idle }\\ & \text{and does not report failure.} \end{cases}
  • EDF๊ฐ€ ์ตœ์ ์ž„์ด ์ฆ๋ช…๋˜์–ด์žˆ์œผ๋ฏ€๋กœ, ฯƒ\sigma๋„ EDF ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋ผ๊ณ  ํ•˜์ž. + ์ผ๋ฐ˜์„ฑ์„ ์žƒ์ง€ ์•Š๊ณ , ๊ฐ™์€ ์šฐ์„ ์ˆœ์œ„์ผ ๊ฒฝ์šฐ ๋” ์ž‘์€ ์ธ๋ฑ์Šค์˜ ์ž‘์—…์„ ์‹คํ–‰ํ•œ๋‹ค๊ณ  ํ•˜์ž.

    Lemma 1
    ฯƒ\sigma๋Š” sporadic task system์— ๋Œ€ํ•ด ์ตœ์ ์ด๋‹ค. ๋”ฐ๋ผ์„œ
    ฯ„\tau๊ฐ€ feasiblefeasibleํ•จ โ€…โ€ŠโŸบโ€…โ€Š\iff ๋ชจ๋“  legallegalํ•œ ฯ„\tau-requests ์ง‘ํ•ฉ RR์— ๋Œ€ํ•ด (ฯƒ.R)(\sigma.R)์ด ์Šค์ผ€์ฅด๋งํ•  ์ˆ˜ ์žˆ์Œ.

  • hR(t)=โˆ‘(i,t0)โˆˆRโˆงt0+diโ‰คteih_R(t) = \sum_{(i,t_0) \in R \land t_0 + d_i \le t}e_i๋ผ๊ณ  ํ•  ๋•Œ ๋‹ค์Œ์ด ์„ฑ๋ฆฝํ•œ๋‹ค.

    Lemma 2
    hR(t)>th_R(t)>t๋ผ๋ฉด

    • (ฯƒ.R)(\sigma.R)์ด tt๋‚˜ ๊ทธ ์ด์ „์— failurefailure๋ฅผ ๋„์šธ ๊ฒƒ์ด๊ณ ,
    • RR์ด legallegal์ด๋ผ๋ฉด ฯ„\tau๋Š” feasiblefeasibleํ•˜์ง€ ์•Š๋‹ค. (Lemma 1.)

R1R_1์€ ๋‹จ ํ•œ๋ฒˆ๋งŒ failurefailure๋ฅผ ๋ณด๊ณ ํ•จ.

  • ฯ„\tau ๊ฐ€ feasiblefeasible ํ•˜์ง€ ์•Š๋‹ค๊ณ  ๊ฐ€์ •ํ•˜์ž.
  • ๊ทธ๋ฆฌ๊ณ  ฯƒ\sigma ๊ฐ€ ์ฒ˜์Œ ์‹คํŒจ๋ฅผ ๋ณด๊ณ ํ•˜๋Š” ์ˆœ๊ฐ„์„ tft_f๋ผ๊ณ  ์ •์˜ํ•˜์ž.
  • R0R_0 ์— ๋Œ€ํ•ด, ์šฐ๋ฆฌ๋Š” ์œ ํ•œํ•œ legallegal ์ง‘ํ•ฉ R1=R0โˆ’{(i,t0โˆฃt0+di>tf)}R_{1} = R_{0} - \{ (i, t_{0}| t_{0} + d_{i} > t_{f}) \}๋ฅผ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋‹ค.
  • EDF ์ •์ฑ…์— ์˜ํ•ด [0,tf)[0, t_f) ์‚ฌ์ด์—๋Š” R1R_1์˜ ์š”์ฒญ์ด activeactive ํ•œ ์ด์ƒ R0โˆ’R1R_0-R_1์˜ ์š”์ฒญ์„ ํ”„๋กœ์„ธ์„œ์— ํ• ๋‹นํ•˜์ง€ ์•Š์„ ๊ฒƒ์ด๋‹ค.
  • ๋”ฐ๋ผ์„œ, [0,tf)[0, t_f) ์‚ฌ์ด์—๋Š” R0R_0๊ณผ R1R_1์ด ์ •ํ™•ํžˆ ๋˜‘๊ฐ™์ด ๋™์ž‘ํ•  ๊ฒƒ์ด๋ฉฐ, (ฯƒ.R1)(\sigma.R_1)์€ tft_f์— ์‹คํŒจ๋ฅผ ๋ณด๊ณ ํ•  ๊ฒƒ์ด๋‹ค.

R1R_1์€ ํ”„๋กœ์„ธ์„œ๋ฅผ ์œ ํœด์ƒํƒœ๋กœ ๋‘์ง€ ์•Š์Œ

  • ๋‹ค๋ฅธ ๋…ผ๋ฌธ์—์„œ ๋งŽ์ด ์ฆ๋ช…ํ–ˆ์œผ๋ฏ€๋กœ ๋„˜์–ด๊ฐ.

R1R_1์˜ ์„ฑ์งˆ๋“ค์„ ๋‹ค์‹œ ์ •๋ฆฌํ•ด๋ณด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

  • ๋ชจ๋“  (i,t0)โˆˆR1(i, t_0) \in R_1 ์€ t0+diโ‰คtft_0 + d_i \le t_f์ด๋‹ค.
  • (ฯƒ.R1)(\sigma.R_1)์€ [0,tf)[0, t_f)์— ํ”„๋กœ์„ธ์„œ๋ฅผ idle ์ƒํƒœ๋กœ ๋‘์ง€ ์•Š๋Š”๋‹ค.
  • (ฯƒ.R1)(\sigma.R_1)์€ tft_f์— ๋‹จ ํ•œ๋ฒˆ ์‹คํŒจ๋ฅผ ๋ณด๊ณ ํ•œ๋‹ค.

์ด๋Š” โˆ‘(i,t0)โˆˆRโˆงt0+diโ‰คtei>tf\sum_{(i,t_0) \in R \land t_0 + d_i \le t}e_i > t_f์œผ๋กœ ์ด์–ด์ง€๋ฏ€๋กœ, Lemma 2์— ์˜ํ•ด ฯ„\tau๊ฐ€ notโ€…โ€Šfeasiblenot\;feasible์ด๋ผ๋Š” ๊ฒƒ์ด ์ฆ๋ช…๋œ๋‹ค.

ย 

์ด์ œ ๋ช‡๋ช‡ (i,t0)โˆˆR1(i, t_0) \in R_1์— ๋Œ€ํ•ด ๋‹ค์Œ์„ ๊ฐ€์ •ํ•ด๋ณด์ž.

  • t0โ‰กrmodโ€‰โ€‰pi,โ€…โ€Šrโ‰ 0t_0 \equiv r \mod p_i,\;r \neq 0
  • eachโ€…โ€Š(i,tโ€ฒ<t0)โˆˆR1โ€…โ€Šisโ€…โ€Štโ€ฒโ‰ก0modโ€‰โ€‰pi\text{each}\;(i, t' <t_0)\in R_1\;\text{is}\;t'\equiv0 \mod p_i

๊ทธ๋Ÿฌ๋ฉด ์šฐ๋ฆฌ๋Š” ์‰ฝ๊ฒŒ ๋‹ค์Œ์„ ํ†ตํ•ด, R4=R1โˆ’{(i,t0)}โ‹ƒ{(i,qโ‹…pi)}R_4 = R_1 - \{(i, t_0)\} \bigcup \{(i, q \cdot p_i)\} ๊ฐ€ schedulableschedulableํ•˜์ง€ ์•Š๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

โˆ‘(i,t0)โˆˆR4โˆงt0+diโ‰คtfei=โˆ‘(i,t0)โˆˆR1โˆงt0+diโ‰คtfei>tf\textstyle\sum_{(i,t_0) \in R_4 \land t_0 + d_i \le t_f}e_i = \sum_{(i,t_0) \in R_1 \land t_0 + d_i \le t_f}e_i > t_f

ย 

์ด๋Š” ์šฐ๋ฆฌ๊ฐ€ R1R_1์„ ํ†ตํ•ด ๋ฐ˜๋ณต์ ์œผ๋กœ Rโ€ฒR'์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธ ํ•œ๋‹ค. s.t.\rm{s.t.}

Rโ€ฒโŠ†โ‹ƒi=1nโ‹ƒkโ‰ฅ0{(i,kโ‹…pi)},&โˆ‘(i,t0)โˆˆRโ€ฒโˆงt0+diโ‰คtfei>tf\textstyle R' โŠ† \bigcup^n_{i=1} \bigcup _{k \ge 0} \{(i, k \cdot p_i)\},\quad\text{\&}\quad \sum_{(i,t_0) \in R' \land t_0 + d_i \le t_f}e_i > t_f

๊ทธ๋ฆฌ๊ณ  ์ด๋Š” ฯ„\tau๊ฐ€ notโ€…โ€Šfeasiblenot\;feasible์ด๋ผ๋Š” ๊ฒƒ๋„ ๋งํ•ด์ค€๋‹ค.

์•ž์œผ๋กœ R=โ‹ƒi=1nโ‹ƒkโ‰ฅ0{(i,kโ‹…pi)}\mathcal{R}=\bigcup^n_{i=1} \bigcup _{k \ge 0}\{(i, k \cdot p_i)\}์ด๋ผ ์ •์˜ํ•œ๋‹ค.

Lemma 3
ฯ„\tau ๋Š” notโ€…โ€Šfeasiblenot\;feasibleํ•˜๋‹ค. โ€…โ€ŠโŸบโ€…โ€Š\iff โˆƒโ€…โ€Štโ‰ฅ0โ€…โ€Šandโ€…โ€ŠtโˆˆZ\exists\;t\ge0\;\text{and}\;t \in \mathbb Z s.t.\rm s.t. hR(t)>th_{\mathcal{R}}(t) > t
๋” ๋‚˜์•„๊ฐ€, hR(t)>th_{\mathcal{R}}(t) > t๋ฅผ ๋งŒ์กฑํ•˜๋Š” ๊ฐ€์žฅ ์ž‘์€ tt๋Š” tft_f์™€ ๊ฐ™๋‹ค.

hRh_{\mathcal{R}}์€ โˆ‘i=1neiโ‹…c(i,t)\sum^n_{i=1}e_i \cdot c(i,t)๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๊ณ , ์—ฌ๊ธฐ์„œ c(i,t)c(i, t)๋Š” t0+diโ‰คtt_0 + d_i \le t๋ฅผ ๋งŒ์กฑํ•˜๋Š” ์š”์ฒญ (i,t0)(i, t_0)์˜ ๊ฐœ์ˆ˜์ด๋‹ค.

  • c(i,t)c(i,t)๋Š” kโ‹…pi+diโ‰คtk\cdot p_i + d_i \le t๋ฅผ ๋งŒ์กฑํ•˜๋Š” ๊ฐ€์žฅ ํฐ ์ •์ˆ˜ kk์— ๋Œ€ํ•ด k+1k+1๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๊ณ ,
  • ์ด๋Ÿฐ ์ •์ˆ˜๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด 00์ด ๋  ๊ฒƒ์ด๋‹ค.
  • ๋”ฐ๋ผ์„œ ์šฐ๋ฆฌ๋Š” c(i,t)=maxโก{0,โŒŠtโˆ’dipiโŒ‹+1}c(i, t) = \max\{0, \left\lfloor\frac{t-d_i}{p_i}\right\rfloor+1\}์ž„์„ ์•Œ ์ˆ˜ ์žˆ๊ณ ,
  • hR=โˆ‘i=1neiโ‹…maxโก{0,โŒŠtโˆ’dipiโŒ‹+1}h_{\mathcal{R}} = \sum^n_{i=1}e_i \cdot \max\{0, \left\lfloor\frac{t-d_i}{p_i}\right\rfloor+1\}๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

์ด๋ฅผ ํ†ตํ•ด ์šฐ๋ฆฌ๋Š” ฯ„\tau ๊ฐ€ feasiblefeasibleํ•˜๊ธฐ ์œ„ํ•œ ํ•„์š”์ถฉ๋ถ„์กฐ๊ฑด์„ ๋„์ถœํ•˜์˜€๋‹ค.
ํ•˜์ง€๋งŒ ์šฐ๋ฆฌ๋Š” hR>th_{\mathcal{R}} > t๋ฅผ ๋งŒ์กฑํ•˜๋Š” tt๋ฅผ ์„ ์ œ์ ์œผ๋กœ ์•Œ ์ˆ˜ ์—†๊ณ , ๋‹ค์Œ ์„ธ๊ฐœ์˜ ๋ณด์กฐ์ •๋ฆฌ๊ฐ€ ์ด๋ฅผ ๋” ์œ ์šฉํ•˜๊ฒŒ ๋งŒ๋“ค์–ด ์ค„ ๊ฒƒ์ด๋‹ค.

Lemma 4
โˆ‘i=1nei/pi>1\sum^n_{i=1}e_i/p_i > 1 ์ด๋ผ๋ฉด ฯ„\tau๋Š” notโ€…โ€Šfeasiblenot\;feasibleํ•˜๋‹ค.

Proof

โˆ‘i=1nei/pi>1\sum^n_{i=1}e_i/p_i > 1๋ผ ๊ฐ€์ •ํ•˜์ž. ์šฐ๋ฆฌ๋Š” hR>th_{\mathcal{R}} > t๋ฅผ ๋งŒ์กฑํ•˜๋Š” tt๊ฐ€ ์กด์žฌํ•จ์„ ๋ณด์—ฌ์•ผ ํ•œ๋‹ค.

๋‹ค์Œ์„ ๋งŒ์กฑํ•˜๋Š” t>maxโก1โ‰คiโ‰คn{di}t > \max_{1\le i \le n}\{d_i\}๋ฅผ ์„ค์ •ํ•˜์ž.

Pโˆฃt&t>โˆ’โˆ‘i=1neiโ‹…โŒŠpiโˆ’dipiโŒ‹โˆ‘i=1neipiโˆ’1P|t\quad\text{\&}\quad t > -\frac{\sum^n_{i=1}e_i\cdot \left\lfloor\frac{p_i-d_i}{p_i}\right\rfloor}{\sum^n_{i=1}\frac{e_i}{p_i}-1}

์ด๋•Œ ๋‹ค์Œ์ด ์„ฑ๋ฆฝํ•œ๋‹ค.

hR(t)=โˆ‘i=1neiโ‹…maxโก{0,โŒŠtโˆ’dipiโŒ‹+1}=โˆ‘i=1neiโ‹…(โŒŠtโˆ’dipiโŒ‹+1)=โˆ‘i=1neiโ‹…(โŒŠt+piโˆ’dipiโŒ‹)=tโ‹…โˆ‘i=1neipi+โˆ‘i=1neiโ‹…[piโˆ’dipi]=tโ‹…(1+โˆ‘i=1neipiโˆ’1)+โˆ‘i=1neiโ‹…[piโˆ’dipi]=t+tโ‹…(โˆ‘i=1neipiโˆ’1)+โˆ‘i=1neiโ‹…โŒŠpiโˆ’dipiโŒ‹>t+โˆ’โˆ‘i=1neiโŒŠpiโˆ’dipiโŒ‹โˆ‘i=1neipiโˆ’1โ‹…(โˆ‘i=1neipiโˆ’1)+โˆ‘i=1neiโ‹…โŒŠpiโˆ’dipiโŒ‹=t\begin{aligned} h_{\mathcal{R}}(t) = &\sum_{i=1}^{n} e_i \cdot \max\{0, \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1\} \\ = &\sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1 \right)\\ = &\sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t + p_i - d_i}{p_i} \right\rfloor \right)\\ = &t \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} + \sum_{i=1}^{n} e_i \cdot \left[ \frac{p_i - d_i}{p_i} \right]\\ = &t \cdot \left(1 + \sum_{i=1}^{n} \frac{e_i}{p_i} - 1 \right) + \sum_{i=1}^{n} e_i \cdot \left[\frac{p_i - d_i}{p_i}\right]\\ =&t + t \cdot \left( \sum_{i=1}^{n} \frac{e_i}{p_i} - 1 \right) + \sum_{i=1}^{n} e_i \cdot \left\lfloor \frac{p_i - d_i}{p_i} \right\rfloor\\ > &t + \frac{-\sum_{i=1}^{n} e_i \left\lfloor\frac{p_i - d_i}{p_i}\right\rfloor}{\sum_{i=1}^{n} \frac{e_i}{p_i} - 1} \cdot \left( \sum_{i=1}^{n} \frac{e_i}{p_i} - 1 \right) + \sum_{i=1}^{n} e_i \cdot \left\lfloor \frac{p_i - d_i}{p_i} \right\rfloor\\ = &t \end{aligned}

๋”ฐ๋ผ์„œ hR(t)>th_{\mathcal{R}}(t) > t ์ด๋‹ค. โ– \blacksquare

Lemma 5

โˆ‘i=1nei/piโ‰ค1\sum^n_{i=1}e_i/p_i \le 1์ด๊ณ  t>maxโก1โ‰คiโ‰คn{di}t > \max_{1\le i \le n}\{d_i\}๋ผ๋ฉด hR(t)>th_{\mathcal{R}}(t) > t ์ด๋‹ค.

Proof
โˆ‘i=1nei/piโ‰ค1\sum^n_{i=1}e_i/p_i \le 1์™€ t>maxโก1โ‰คiโ‰คn{di}t > \max_{1\le i \le n}\{d_i\}๋ฅผ ๊ฐ€์ •ํ•˜์ž. ๊ทธ๋Ÿฌ๋ฉด:

hR(t)+P=โˆ‘i=1neiโ‹…(โŒŠtโˆ’dipiโŒ‹+1)+Pโ‰ฅโˆ‘i=1neiโ‹…(โŒŠtโˆ’dipiโŒ‹+1)+Pโˆ‘i=1neipi=โˆ‘i=1neiโ‹…(โŒŠtโˆ’dipiโŒ‹+1)+โˆ‘i=1neiโ‹…Ppi=โˆ‘i=1neiโ‹…(โŒŠt+Pโˆ’dipiโŒ‹+1)=hR(t+P)>t+P\begin{aligned} h_{\mathcal{R}}(t) + P &= \sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1 \right) + P \\ &\ge \sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1 \right) + P \sum_{i=1}^{n} \frac{e_i}{p_i} \\ &= \sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1 \right) + \sum_{i=1}^{n} e_i \cdot \frac{P}{p_i}\\ &= \sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t +P- d_i}{p_i} \right\rfloor + 1 \right)\\ &=h_{\mathcal{R}}(t+P)\\ &> t+P \end{aligned}

๋”ฐ๋ผ์„œ hR(t+P)>t+Ph_{\mathcal{R}}(t+P) > t+P๊ฐ€ ์„ฑ๋ฆฝํ•˜๊ณ , hR(t)>th_{\mathcal{R}}(t) > t์ด๋‹ค. โ– \blacksquare

Corollary 1

ฯ„\tau๊ฐ€ feasiblefeasibleํ•˜์ง€ ์•Š๊ณ , โˆ‘i=1neipiโ‰ค1\sum^n_{i=1}\frac{e_i}{p_i}\le 1 ์ด๋ผ๋ฉด,

hR(t)>th_{\mathcal{R}}(t) > t๋ฅผ ๋งŒ์กฑํ•˜๋Š” t<P+maxโก1โ‰คiโ‰คn{di}t < P + \max_{1\le i \le n}\{d_i\}๊ฐ€ ์กด์žฌํ•œ๋‹ค.

Lemma 6

ฯ„\tau๊ฐ€ feasiblefeasible ํ•˜์ง€ ์•Š๊ณ , โˆ‘i=1neipi<1\sum^n_{i=1}\frac{e_i} {p_i} < 1, hR(t)>th_{\mathcal{R}}(t)>t๋ผ๋ฉด:

  • t<maxโก1โ‰คiโ‰คn{di}t < \max_{1\le i \le n}\{d_i\} ๋˜๋Š”
  • t<maxโก1โ‰คiโ‰คn{piโˆ’di}โ‹…โˆ‘i=1neipi/(1โˆ’โˆ‘i=1neipi)t < \max_{1\le i \le n}\{p_i-d_i\}\cdot\sum^n_{i=1} \frac{e_i}{p_i}\big/\left(1-\sum^n_{i=1}\frac{e_i}{p_i}\right)์ด๋‹ค.

Proof

ฯ„\tau๊ฐ€ feasiblefeasible ํ•˜์ง€ ์•Š๊ณ , โˆ‘i=1neipi<1\sum^n_{i=1}\frac{e_i} {p_i} < 1, hR(t)>th_{\mathcal{R}}(t)>t์ด๋ฉฐ tโ‰ฅmaxโก1โ‰คiโ‰คn{di}t \ge \max_{1\le i \le n}\{d_i\}๋ผ๊ณ  ๊ฐ€์ •ํ•˜์ž.
์ด๋•Œ, t<maxโก1โ‰คiโ‰คn{piโˆ’di}โ‹…โˆ‘i=1neipi/(1โˆ’โˆ‘i=1neipi)t < \max_{1\le i \le n}\{p_i-d_i\}\cdot\sum^n_{i=1} \frac{e_i}{p_i}\big/\left(1-\sum^n_{i=1}\frac{e_i}{p_i}\right)์„ ์ฆ๋ช…ํ•˜๋ฉด ๋œ๋‹ค.

hR(t)=โˆ‘i=1neiโ‹…(โŒŠtโˆ’dipiโŒ‹+1)โ‰คโˆ‘i=1neiโ‹…(t+piโˆ’dipi)=tโ‹…โˆ‘i=1neipi+โˆ‘i=1neipi(piโˆ’di)โ‰คtโ‹…โˆ‘i=1neipi+maxโก1โ‰คiโ‰คn{piโˆ’di}โˆ‘i=1neipi\begin{aligned} h_{\mathcal{R}}(t) &= \sum_{i=1}^{n} e_i \cdot \left( \left\lfloor \frac{t - d_i}{p_i} \right\rfloor + 1 \right)\\ &\le\sum_{i=1}^{n} e_i \cdot \left( \frac{t + p_i - d_i}{p_i} \right) \\ &= t \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} + \sum_{i=1}^{n} \frac{e_i}{p_i} (p_i - d_i)\\ &\le t \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} + \max_{1 \leq i \leq n} \{ p_i - d_i \} \sum_{i=1}^{n} \frac{e_i}{p_i} \end{aligned}

์—ฌ๊ธฐ์—์„œ hR(t)>th_{\mathcal{R}}(t)>t ์ด๋ฏ€๋กœ, ์œ„ ์‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ •๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

t<tโ‹…โˆ‘i=1neipi+maxโก1โ‰คiโ‰คn{piโˆ’di}โ‹…โˆ‘i=1neipiโ‰กt(1โˆ’โˆ‘i=1neipi)<maxโก1โ‰คiโ‰คn{piโˆ’di}โ‹…โˆ‘i=1neipiโ‰กt<maxโก{piโˆ’di}1โ‰คiโ‰คnโ‹…โˆ‘i=1neipi/(1โˆ’โˆ‘i=1neipi).โ– \begin{aligned} t &< t \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} + \max_{1 \leq i \leq n} \{p_i - d_i\} \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} &\equiv\\ t\left(1-\sum^n_{i=1}\frac{e_i}{p_i}\right) &< \max_{1 \leq i \leq n} \{p_i - d_i\} \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} &\equiv\\ t &< \max \{ p_i - d_i \}_{1 \leq i \leq n} \cdot \frac{\sum_{i=1}^{n} e_i}{p_i}{\bigg/ \left( 1 - \sum_{i=1}^{n} \frac{e_i}{p_i} \right)}. &\blacksquare \end{aligned}

Lemma 3,4,5,6๊ณผ Corollary 1์— ์˜ํ•ด์„œ ๋‹ค์Œ์ด ์„ฑ๋ฆฝํ•œ๋‹ค.

Theorem
โˆ‘i=1neipi=c\sum^n_{i=1}\frac{e_i}{p_i}=c์ด๊ณ , ฯ„\tau ๊ฐ€ feasiblefeasibleํ•˜์ง€ ์•Š๋‹ค๋Š” ๊ฒƒ์€ ๋‹ค์Œ๊ณผ ๋™์น˜์ด๋‹ค.

  1. c>1c>1 ๋˜๋Š”
  2. hR(t)>th_{\mathcal{R}}(t)>t๋ฅผ ๋งŒ์กฑํ•˜๋Š” ์ •์ˆ˜ t<min{P+maxโก1โ‰คiโ‰คn{di},c1โˆ’cmaxโก1โ‰คiโ‰คn{piโˆ’di}}t < min\left\{P+\max_{1\le i \le n}\{d_i\}, \frac{c}{1-c}\max_{1\le i \le n}\{p_i-d_i\}\right\}๊ฐ€ ์กด์žฌํ•œ๋‹ค.

Corollary 2
Sporadic task system์˜ feasibilityfeasibility ๊ฒ€์‚ฌ๋Š” coco-NP\rm NP์ด๋‹ค.

Proof

  • ์ •์ˆ˜ t<P+maxโก1โ‰คiโ‰คn{di}t < P+\max_{1\le i \le n}\{d_i\}๋Š” ๋น„๊ฒฐ์ •๋ก ์  ๋‹คํ•ญ์‹œ๊ฐ„์— ์ถ”์ธก๋  ์ˆ˜ ์žˆ์œผ๋ฉฐ,
  • ๋ฐ˜๋ก€๋กœ ์‚ฌ์šฉ๋˜๋Š” tt๋Š” ์‹œ์Šคํ…œ ํŒŒ๋ผ๋ฏธํ„ฐ์— ๋Œ€ํ•ด ๋‹คํ•ญํ•œ ๋ฒ”์œ„ ๋‚ด์— ์žˆ๊ณ ,
  • hR(t)>th_{\mathcal{R}}(t)>t ๋˜๋Š” โˆ‘i=1neipi>1\sum^n_{i=1}\frac{e_i}{p_i}>1์„ ๊ฒ€์ฆํ•˜๋Š” ๊ฒƒ์€ ๊ฒฐ์ •๋ก ์  ๋‹คํ•ญ์‹œ๊ฐ„์— ๋‹ฌ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. โ– \blacksquare

An algorithm for feasibility testing

๋ณธ ๋…ผ๋ฌธ์—์„œ ์ œ์‹œํ•˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ๋ฐ˜๋ณต์ ์œผ๋กœ hR(t)>th_{\mathcal{R}}(t)>t ๋ฅผ ๋งŒ์กฑํ•˜๋Š” ์–‘์ˆ˜ tt๋ฅผ ์ฐพ๋Š”๋‹ค.

์‹œ๋ฎฌ๋ ˆ์ด์…˜์€ hR(t)h_{\mathcal{R}}(t) ์„ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋Œ€์ฒด๋œ๋‹ค.

์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์†Œ๊ฐœํ•˜๊ธฐ ์ „, ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์ข€ ๋” ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๊ฒฐ๊ณผ๋ฅผ ์ œ์‹œํ•œ๋‹ค.

Lemma 7

โˆ‘i=1neipiโ‰ค1\sum^n_{i=1}\frac{e_i}{p_i}\le 1 ์ด๊ณ , ๋ชจ๋“  1โ‰คiโ‰คpi1 \le i \le p_i์— ๋Œ€ํ•ด diโ‰ฅpid_i\ge p_i๋ผ๋ฉด ฯ„\tau๋Š” feasiblefeasibleํ•˜๋‹ค.

Proof

โˆ‘i=1neipiโ‰ค1\sum^n_{i=1}\frac{e_i}{p_i}\le 1์ด๊ณ , ๋ชจ๋“  1โ‰คiโ‰คpi1 \le i \le p_i์— ๋Œ€ํ•ด diโ‰ฅpid_i\ge p_i๋ผ๊ณ  ๊ฐ€์ •ํ•˜์ž.

์šฐ๋ฆฌ๋Š” ๋ชจ๋“  ์ •์ˆ˜ tโ‰ฅ0t \ge 0์— ๋Œ€ํ•ด hR(t)โ‰คth_{\mathcal{R}}(t)\le t๋ฅผ ๋ณด์ด๋ฉด ๋œ๋‹ค.

hR(t)=โˆ‘i=1neiโ‹…maxโก{0,โŒŠtโˆ’dipiโŒ‹+1}โ‰คโˆ‘i=1neiโ‹…โŒŠtpiโŒ‹โ‰คtโ‹…โˆ‘i=1neipiโ‰คtโ– \begin{aligned} h_{\mathcal{R}}(t) &= \sum^n_{i=1} e_i \cdot \max \left\{0, \left\lfloor\frac{t-d_i}{p_i}\right\rfloor+1\right\}\\ &\le \sum_{i=1}^{n} e_{i} \cdot \left\lfloor \frac{t}{p_{i}} \right\rfloor \\ &\le t \cdot \sum_{i=1}^{n} \frac{e_i}{p_i} \\ &\le t &\blacksquare \end{aligned}
bool isFeasible(Taskset tau) {
  c = sum(e[i] / p[i])
  if (c > 1) 
    return false; // Lemma 4
  if (d[i] > p[i] for i in 1..n) 
    return true; // Lemma 7

  P = lcm{p[1]..p[n]};
  D = max{d[1]..d[n]};
  M = P + D;

  T = (c==1) ? M : min{M, c/1-c * max{p[i] - d[i]}};
  H = 0; // h_R(t)

  for(t in 1..T) {
    for(i in 1..n )
      if(t >= d[i] && t % p[i] = d[i])
        H += e[i];
    // H is now h_R(t)
    if (H > t)
      return false;
  }
  return true;
}

Theorem 2

  1. ๋งŒ์•ฝ โˆ‘i=1neipi>1\sum^n_{i=1}\frac{e_i}{p_i}>1 ์ด๋ผ๋ฉด ์œ„ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์„ ํ˜• ์‹œ๊ฐ„์— ๋™์ž‘ํ•œ๋‹ค.
  2. ๋งŒ์•ฝ โ‹€i=1ndiโ‰ฅpi\bigwedge^n_{i=1}d_i \ge p_i๋ผ๋ฉด ์œ„ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์„ ํ˜• ์‹œ๊ฐ„์— ๋™์ž‘ํ•œ๋‹ค.
  3. c<1c<1๋ผ๋ฉด ์œ„ ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ O(nโ‹…maxโก1โ‰คiโ‰คn{piโˆ’di})O(n\cdot \max_{1\le i \le n}\{p_i-d_i\}) ์— ๋™์ž‘ํ•œ๋‹ค.
  4. ์œ„ ์ƒํ™ฉ๋“ค์— ๋ชจ๋‘ ํ•ด๋‹นํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ ์ง€์ˆ˜ ์‹œ๊ฐ„ O(nโ‹…(P+maxโก1โ‰คiโ‰คn{piโˆ’di}))O(n\cdot \left(P+\max_{1\le i \le n}\{p_i-d_i\}\right)) ์— ๋™์ž‘ํ•œ๋‹ค. โ– \blacksquare

0๊ฐœ์˜ ๋Œ“๊ธ€

๊ด€๋ จ ์ฑ„์šฉ ์ •๋ณด