1
spoony 2015-03-10 18:53:12 +08:00
挽尊,Chrome开起来去优酷播一段720P就行。
|
3
tabris17 2015-03-10 18:56:23 +08:00
下个super pi啊
|
4
20150517 2015-03-10 19:02:11 +08:00
开flash.......
|
5
20150517 2015-03-10 19:02:47 +08:00
哦对了,是在被窝里看1080P的flash,那个飙的叫爽啊,冬天直接可以当电热毯用了
|
6
ChanneW 2015-03-10 19:08:34 +08:00
Python 要开对应核数的进程才能跑到 100%
|
7
zhjits 2015-03-10 20:41:02 +08:00
smcFanControl 装好往 5000 转拉就行
|
9
binux 2015-03-10 21:01:15 +08:00 1
cat /dev/urandom > /dev/null
|
10
pinkman OP 估计我这风扇是没有装好,现在用chrome开了4个超清视频爱奇艺、搜狐、youku、土豆,smcfancontrol显示温度71度,activity monitor中光是chrome helper的cpu占用率就是147%(这数怎么来的?会超过100%?),但风扇还是没有转...
|
11
uniquecolesmith 2015-03-10 21:03:55 +08:00
是用于给妹纸取暖?哈哈
|
14
bellchu 2015-03-10 21:13:16 +08:00 via iPhone
Popen.wait()
Wait for child process to terminate. Set and return returncode attribute. Warning This will deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a pipe such that it blocks waiting for the OS pipe buffer to accept more data. Use communicate() to avoid that. |
16
gaocegege 2015-03-10 22:38:52 +08:00
#include <stdio.h>
#include <time.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #define NUM_OF_CORES 8 #define MAX_PRIME 100000 void do_primes() { unsigned long i, num, primes = 0; for (num = 1; num <= MAX_PRIME; ++num) { for (i = 2; (i <= num) && (num % i != 0); ++i); if (i == num) ++primes; } printf("Calculated %d primes.\n", primes); } int main(int argc, char ** argv) { time_t start, end; time_t run_time; unsigned long i; pid_t pids[NUM_OF_CORES]; /* start of test */ start = time(NULL); for (i = 0; i < NUM_OF_CORES; ++i) { if (!(pids[i] = fork())) { do_primes(); exit(0); } if (pids[i] < 0) { perror("Fork"); exit(1); } } for (i = 0; i < NUM_OF_CORES; ++i) { waitpid(pids[i], NULL, 0); } end = time(NULL); run_time = (end - start); printf("This machine calculated all prime numbers under %d %d times " "in %d seconds\n", MAX_PRIME, NUM_OF_CORES, run_time); return 0; } From http://stackoverflow.com/a/9244508/4358533 |
17
GeekGao 2015-03-11 12:43:15 +08:00
import multiprocessing
def fuck_cpus(): while True: print 'Fucking...' CPU_CORE = 4 for i in xrange(CPU_CORE): multiprocessing.Process(target=fuck_cpus, args=()).start() |
18
GeekGao 2015-03-11 12:43:47 +08:00
shit ,缩进呢。。。
|