18
OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周周周 , 499410055 周周周

OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Embed Size (px)

Citation preview

Page 1: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

OPERATING SYSTEM: DESIGN AND IMPLEMENTFINAL PROPOSALSCHEDULER

499410007 周長毅 , 499410055 周榆豐

Page 2: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Outline

Motivation Purpose Theory

O(1) Scheduler CFS, Complete Fair Scheduler BFS, Brain Fuck Scheduler

Testing - Linux Result

Page 3: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Motivation

Wish to enhance smartphone’s performance by modifying operating system’s kernel.

But we encountered some problem when patching kernel.

So testing platform move to Linux on PC from Android on HTC Evo 3D.

Still use regular benchmark to test performance.

Page 4: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Purpose

More familiar with Operating System’s Scheduler we use in common.

Compare the special feature, pros and cons in actual use.

Page 5: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Theory

O(1) Scheduler CFS, Complete Fair Scheduler BFS, Brain Fuck Scheduler

Page 6: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

O(1) Scheduler

Active

Expired

Task1

Task2

Task3

Task4

Task5

Task6

Go to Blank Page

Page 7: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

CFS

Go to Blank Page

Page 8: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

BFS

Key Point : jiffies + (prio_ratio * rr_interval)

Go to Blank Page

Page 9: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – Machine

Testing Machine: CPU = Intel Xeon E3-1230 v2 (3.3GHz, 4C8T) RAM = 8GB DDR3-1600 x4 MB = Gigabyte GA-PH67-UD3-B3 HDD = Hitachi HDS723020BLA642 (2TB

7200rpm) Virtual Machine software = Vmware Player 6.0.2 Testing Software = Phoronix Test Suite v5.2.0

8 threads and 12GB RAM are allocated for guest system

Page 10: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – How to play with BFS?

You need to prepare Kernel Source Code

from kernel.org BFS patch that

support your kernel’s version from BFS’s author.

Other component you need to compile Linux kernel.

Time, of course.

Page 11: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – How to play with BFS?

Use “Patch” command to patch BFS into kernel.

You will see option about BFS in “make menuconfig” if no error is encountered.

Page 12: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – How to play with BFS?

If you encountered errors you may see like this.

That’s why we can’t test on HTC Evo 3D.

But some foreign programmer DID this on other Android devices.

And the most exaggerated is you can’t patch the kernel version 3.0.101 on kernel.org.

Page 13: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – Testing software

Becouse we are not familiar with Linux and don’t know how to benchmark in Linux, so we use “Phoronix Test Suite” to benchmark.

“Phoronix Test Suite” has tons of options we can choose, but we don’t know

So we use ”Run Complex System Test” in main menuto benchmark

Page 14: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Testing – Testing option

In ”Run Complex System Test”, it will benchmark 4 item, they are: PostMark: Simulate a small E-mail server

and test about it. RAMspeed SMP: Benchmark the memory

bandwidch. C-Ray: Bench the performance of CPU’s

flouting point calculation. Apache Benchmark: Simulate some

environments and test the response performance about Apache.

Page 15: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Result

Completely Fair Scheduler

Brain Fuck Scheduler

Page 16: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

Result

CFS

BFS

3000 3500 4000

PostMark Score

PostMark Score

CFS

050

00

1000

0

1500

0

Apache BenchmarkApache Benchmark

But CFS’s performance is 32% highter than BFS in “Apache Benchmark”

BFS’s performance is 11% highter than CFS in “PostMark”.

Page 17: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

END

That’s all.

Page 18: OPERATING SYSTEM: DESIGN AND IMPLEMENT FINAL PROPOSAL SCHEDULER 499410007 周長毅, 499410055 周榆豐

O(1) CFS BFS