周测5
1.Which system call creates a new thread?¶
编号 | 选项 |
---|---|
A | open |
B | clone |
C | creat |
D | execve |
2.Suppose that a thread is executing "counter=counter+1" while another thread is executing concurrently and independently "counter=counter-1", where the counter is a variable shared between the two threads. Given that the value of counter is 10 before execution, the possible value(s) after both threads finish their statement are __.¶
编号 | 选项 |
---|---|
A | 9 |
B | 10 |
C | 11 |
D | All of above |
最后更新: 2020-07-01