m个进程(Pi,0≤i≤m-1)通过k个等长的缓冲区(Bi,0≤i≤k-1)向n个进程(Qi,0≤i≤m-1)发送消息。每个进程Pi发送消息的顺序与数量不受限制,每个进程Qi接收消息的顺序与数量也不受限制,但发送进程与接收进程作为两个分别的整体,要求消息发送与接收的整体次序相同。为保证消息发送与接收的充分并行,需要设置()。
A. 3个信号量,初值分别为1,1,0
B. 4个信号量,初值分别为1,0,1,0
C. 3个信号量,初值分别为k,1,0
D. 4个信号量,初值分别为k,1,0,1
查看答案
设链式栈中结点的结构为(data,link),且top是指向栈顶的指针。若想摘除链式栈的栈顶结点,并将被摘除结点的值保存到x中,则应执行的操作是()。
A. x=top->data;top=top->link;
B. top=top->link;x=top->data;
C. x=top;top=top->link;
D. x=top->data;
(66) method is the use of a data processing system to represent selected behavioral (67) of a physical or abstract system. For example, the representation of air streams around airfoils at various velocities, temperatures, and air pressures with such a system.Emulation method is slightly different, it uses a data processing system to imitate another data processing system, so that the imitating system accepts the same data, executes the same programs, and achieves the same (68) as the imitated system. Emulation is usually achieved (69) hardware or firmware. In a network, for example, microcomputers might emulate terminals (70) communicate with mainframe. (69)处填()。
A. relying on
B. according to
C. by means of
D. dependent on
若事务T1对数据A已加排它锁,那么其它事务对数据A()。
A. 加共享锁、加排它锁都失败
B. 加排它锁成功,加共享锁失败
C. 加共享锁、加排它锁都成功
D. 加共享锁成功,加排它锁失败
设有一个递归算法如下: int fact(int n) if(n<=0)return 1; else return n*fact(n-1); 下面正确的叙述是()。
A. 计算fact(n)需要执行n次函数调用
B. 计算fact(n)需要执行n+1次函数调用
C. 计算fact(n)需要执行n+2次函数调用
D. 计算fact(n)需要执行n-1次函数调用