第九章 比例份额

1.

python3 ./lottery.py -s 1 -c
python3 ./lottery.py -s 2 -c
python3 ./lottery.py -s 3 -c

2.

估计压根不会运行,如此不平衡导致进程饿死

python3 ./lottery.py -l 10:1,10:100 -c

3.

python3 ./lottery.py -l 100:100,100:100 -s 1 -c
1比0早4
python3 ./lottery.py -l 100:100,100:100 -s 2 -c
1比0早10
python3 ./lottery.py -l 100:100,100:100 -s 3 -c
0比1早4

4.

加长时间片,加剧不公平性

python3 ./lottery.py -l 100:100,100:100 -s 1  -q 2 -c 
1比0早6
python3 ./lottery.py -l 100:100,100:100 -s 1  -q 10 -c 
1比0早40

python3 ./lottery.py -l 100:100,100:100 -s 2 -q 2 -c 
1比0早2
python3 ./lottery.py -l 100:100,100:100 -s 2 -q 10 -c 
0比1早10

python3 ./lottery.py -l 100:100,100:100 -s 3 -q 2 -c 
0比1早6
python3 ./lottery.py -l 100:100,100:100 -s 3 -q 10 -c 
1比0早10
posted @ 2023-03-16 14:43  穿过雾的阴霾  阅读(7)  评论(0)    收藏  举报