1 / 5

Providing RR Scheduling in MicroC/OS-II

Providing RR Scheduling in MicroC/OS-II. RR Scheduling in MicroC/OS-II. Goal: providing RR scheduling for MicroC/OS-II MicroC/OS-Ⅱ 作業系統提供 priority based 的 CPU 排程方式 在某些情形下,系統會在 Ready List 中尋找 priority 值最低的 Task Task 執行 semaphore 的 OSSemPend() 動作 Task 執行 mailbox 的 OSMboxPend() 動作

abba
Download Presentation

Providing RR Scheduling in MicroC/OS-II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Providing RR Scheduling in MicroC/OS-II

  2. RR Scheduling in MicroC/OS-II • Goal: providing RR scheduling for MicroC/OS-II • MicroC/OS-Ⅱ作業系統提供priority based 的CPU排程方式 • 在某些情形下,系統會在Ready List中尋找priority值最低的Task • Task執行semaphore的OSSemPend()動作 • Task執行mailbox的OSMboxPend()動作 • Task執行flag的OSFlagPend()動作 • Task執行message queue的OSQPend()動作 • Task被其他Task suspend • Task執行OSTimeDly()函式,讓Task在使用者設定的時間內暫時不執行

  3. RR Scheduling in MicroC/OS-II (Cont.) • 所有的Task可以分為下列四類: • Priority Task: • 一般按照priority base排程的Task; • Priority值0~30是屬於這一類型的task。 • Round-Robin Task: • 只有當Task的Time Slice>0且Ready List內沒有可執行的priority base的task; • Priority值 31~61屬於這一類型的Task。 • Statistic Task (priority 62): • 用來統計系統其他Task的資源使用狀態。 • Idle Task (priority 63): • 當系統沒有其他Task執行時,idle Task就被呼叫執行。

  4. RR Scheduling in MicroC/OS-II (Cont.) • 本實驗可能新增全域變數、結構 、函示如下列: • #define SLICE x • 採用Round-Robin排程Task的執行時間 • struct os_tcb • OSTimeTick() • OS_Sched() • FindNextTask()

  5. RR Scheduling in MicroC/OS-II (Cont.) • Deadline • 12/29 • Demo to the TA

More Related