f*****m 发帖数: 75 | 1 刚刚注册的账户不能立即发文后来就忘记了现在补上 从evernote翻出来的
- differences between thread and process
- if process A has 1 thread; process B has 4 threads. they all have the same
priority. which process has more CPU time?
- what's context switch? how to do context switch? what state information
need to be saved before context switch?
- how to implement a mutex? what OS concept are you using to block the
current thread if acquiring a mutex failed?
- code sample:
for(i=0;i<10;i++) for(j=0;j<1000;j++) ;
for(i=0;i<1000;i++) for(j=0;j<10;j++) ;
which one runs faster? no compiler optimization.
- calculate a binary tree max width. |
s******n 发帖数: 3946 | 2 - if process A has 1 thread; process B has 4 threads. they all have the same
priority. which process has more CPU time?
- what's context switch? how to do context switch? what state information
need to be saved before context switch?
为啥bing要面这些很OS/kernel的问题?
- code sample:
for(i=0;i<10;i++) for(j=0;j<1000;j++) ;
for(i=0;i<1000;i++) for(j=0;j<10;j++) ;
which one runs faster? no compiler optimization.
for(i=0;i<10;i++) for(j=0;j<1000;j++); 快?1000*10+10次 |
w****x 发帖数: 2483 | 3
same
information
流水线技术是第一个快, 是指令预取吧
【在 s******n 的大作中提到】 : - if process A has 1 thread; process B has 4 threads. they all have the same : priority. which process has more CPU time? : - what's context switch? how to do context switch? what state information : need to be saved before context switch? : 为啥bing要面这些很OS/kernel的问题? : - code sample: : for(i=0;i<10;i++) for(j=0;j<1000;j++) ; : for(i=0;i<1000;i++) for(j=0;j<10;j++) ; : which one runs faster? no compiler optimization. : for(i=0;i<10;i++) for(j=0;j<1000;j++); 快?1000*10+10次
|
f*****m 发帖数: 75 | 4 因为那个组是indexing 相关的,performance非常看重,快1%就省1%的机器。。。
same
【在 s******n 的大作中提到】 : - if process A has 1 thread; process B has 4 threads. they all have the same : priority. which process has more CPU time? : - what's context switch? how to do context switch? what state information : need to be saved before context switch? : 为啥bing要面这些很OS/kernel的问题? : - code sample: : for(i=0;i<10;i++) for(j=0;j<1000;j++) ; : for(i=0;i<1000;i++) for(j=0;j<10;j++) ; : which one runs faster? no compiler optimization. : for(i=0;i<10;i++) for(j=0;j<1000;j++); 快?1000*10+10次
|
f*****m 发帖数: 75 | 5 主要是'=0'的次数差别比较大 ++的次数基本是一样的
【在 w****x 的大作中提到】 : : same : information : 流水线技术是第一个快, 是指令预取吧
|
s******n 发帖数: 3946 | 6 linux是按照thread还是process分配的CPU?这里说是按照process,但总觉得不太妥
http://oreilly.com/catalog/linuxkernel/chapter/ch10.html
【在 f*****m 的大作中提到】 : 因为那个组是indexing 相关的,performance非常看重,快1%就省1%的机器。。。 : : same
|
w****x 发帖数: 2483 | 7
哦, 原来如此啊. Bing有什么组考算法考得比较多的??
Bing infrastructure怎么样?
一般说的Bing core search具体指哪几个组????
【在 f*****m 的大作中提到】 : 主要是'=0'的次数差别比较大 ++的次数基本是一样的
|
f*****m 发帖数: 75 | 8 windows 是按照thread来的 scheduling 的时候跟process没关系
【在 s******n 的大作中提到】 : linux是按照thread还是process分配的CPU?这里说是按照process,但总觉得不太妥 : http://oreilly.com/catalog/linuxkernel/chapter/ch10.html
|
|