单项选择题1. 对于如下C语言程序
void * th_f(void * arg)
{
printf("Hello World");
pthread_exit(0);
}
int main(void)
{
pthread_t tid;
int st;
st=pthread_create(&tid, NULL, th_f, NULL);
if(st==0)
printf("Oops, I can not create thread\n");
exit(NULL);
}
在上述程序中,pthread_create函数表示
- A.创建线程,线程名为th_f
- B.创建线程,线程名为tid
- C.创建线程,线程名为st
- D.创建线程,线程名为NULL
A B C D
38. 某计算机系统中共有3个进程P
1、P
2和P
3,4类资源r
1、r
2、r
3和r
4。其中r
1和r
3每类资源只有1个,r
2资源有2个,r
4有3个。
当前的资源分配状态如下:
A B C D