亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 5359 | 回復(fù): 6
打印 上一主題 下一主題

[Tru64 UNIX] Tru64下到底能不能更改cpu時(shí)間片大小呢,給點(diǎn)思路也行各位大俠 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2007-04-21 11:33 |只看該作者 |倒序?yàn)g覽
如提,困擾幾天了,幫幫忙吧,我沒有查到這方面的資料啊

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2007-04-29 16:32 |只看該作者
不是很清楚你修改CPU Tick的目的是什么,

如果你想改變tru64分配給process/thread的時(shí)間片, 或減少context switches的話, 可以試試修改round_robin_switch_rate

#sysconfig -q proc | grep round_robin_switch_rate

#man sys_attrs_proc

  round_robin_switch_rate
      A value that determines (per second of CPU time) the number of context
      switches that can occur between processes with the same priority and
      the timeslice allotted to each process.

      Default value: 0 (100 context switches per second)

      Minimum value: 0

      Maximum value: hz

      The system uses the following formula to compute timeslice:

      timeslice = hz / number_context_switches

      The hz value is the timer interrupt frequency (hertz) for one second of
      CPU time.  This value is dependent on hardware and is typically 1024 or
      1200. (To determine the hz value on a particular system, programmers
      can use the getsysinfo() call with GSI_CLK_TCK as the op parameter.)

      If round_robin_switch_rate is either 0 (zero) or greater than hz, the
      system uses 100 for number_context_switches. For example, if hz is
      1024, the resulting timeslice is 10 milliseconds, and if hz is 1200,
      the resulting timeslice is 12 milliseconds:

      timeslice = 1024 / 100 = 10

      timeslice = 1200 / 100 = 12

      If round_robin_switch_rate is greater than zero and less than or equal
      to hz, then number_context_switches is set to round_robin_switch_rate.
      For example, changing round_robin_switch_rate from 0 to 20 decreases
      the number of context switches and increases timeslice by a factor of
      five:

      timeslice = 1024 / 20 = 51

      timeslice = 1200 / 20 = 60

      Context switching carries a certain amount of CPU overhead. If a CPU
      consistently handles many large jobs that do not complete quickly, a
      larger timeslice (and fewer context switches) may improve throughput.
      However, the tradeoff is reduced response time for any interactive
      processes that the CPU handles.

Decrements the current thread’s quantum.  If this exhausts the thread’s quantum,
a new thread may get scheduled.  Can invoke the update_priority() routine to update the thread’s priority.

The quantum defaults to 1/100 of a second.  Its actual calculation is done in src/kernel/kern/sched_prim.c:

if ((round_robin_switch_rate > 0) && (round_robin_switch_rate <= hz))
                  min_quantum = hz / round_robin_switch_rate;
else
                  min_quantum = hz / 100;

            where hz (hertz) is a global value representing the number of CPU ticks per second and round_robin_switch_rate is configurable via /etc/sysconfigtab.

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2007-04-29 16:36 |只看該作者
Source code:
src/kernel/bsd/kern_clock.c
src/kernel/kern/sched_prim.c:

if ((round_robin_switch_rate > 0) && (round_robin_switch_rate <= hz))
                  min_quantum = hz / round_robin_switch_rate;
else
                  min_quantum = hz / 100;

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2007-04-29 20:51 |只看該作者
你級別是新手,可是為什么這么強(qiáng)。。。

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2007-04-29 22:38 |只看該作者
確實(shí)強(qiáng)。。。。。!
哪來的源代碼???

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2007-05-31 11:27 |只看該作者
好長時(shí)間沒來了,感謝fish_man!!

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2007-05-31 16:22 |只看該作者
前面的明白,下面這一段不太明白,再請教,謝謝!!
Decrements the current thread’s quantum.  If this exhausts the thread’s quantum,
a new thread may get scheduled.  Can invoke the update_priority() routine to update the thread’s priority.

The quantum defaults to 1/100 of a second.  Its actual calculation is done in src/kernel/kern/sched_prim.c:

[ 本帖最后由 wenzhang005 于 2007-5-31 16:26 編輯 ]
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP