计网与操作系统习题(2)

计网

1.

18 signals, each requiring 1000 Hz, are multiplexed on to a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel? Assume that the guard bands are 100 Hz wide.

ans:N个信号要使用N-1个保护带,所以共需要100018+10017=19700HZ

2.

CDMA 的算法是选中后加和取负
逆运算的方法是用结果返回去计算点积除以长度

3.

url:http://10.214.0.253/network/exercise/assessment/showtest.php?action=shownext&score=4
在这里插入图片描述
完全不会

4.

在这里插入图片描述

ans: 7*24 = 168, (193-168)/193 = 13% ,1位overhead,但还有一个extra bit
2/32 = 6.25% 32中的2位overhead用于各种用途

5.

A simple telephone system consists of two end offices and a single toll office to which each end office is connected by a 1-MHz full-duplex trunk. The average telephone is used to make four calls per 8-hour workday. The mean call duration is 6 min. Ten percent of the calls are long-distance (i.e., pass through the toll office). What is the maximum number of telephones an end office can support? (Assume 4 kHz per circuit.)
完全不懂

ans:在这里插入图片描述

需要仔细研究

6.

在这里插入图片描述

ans : trunks

7.

T1:1.544Mbps E1:2.048Mbp

OS

Using the program shown in following , explain what will be the output at Line A.

int value=8;

int main()

{

pid_t pid;

/* fork a child process */

pid = fork();

if (pid == 0) { /* child process */

	value +=15;

}

else { /* parent process */

	/* parent will wait for the child to complete */

	wait(NULL);

	printf(" Parent :value= %d\n",value);/* LINE A */

	exit(0);

}

}

简答题 (10 分)
附件 上传 最多可上传6张图片
2.
Describe the differences among short-term, medium-term, and longterm-scheduling.

简答题 (10 分)
附件 上传 最多可上传6张图片
3.
Describe the actions taken by a kernel to context-switch between processes.

简答题 (10 分)
附件 上传 最多可上传6张图片
4.
Which of the following components of program state are shared across threads in a multithreaded process?

多选题 (10 分)
A.
Register values

B.
Heap memory

C.
Global variables

D.
Stack memory

The program shown in Figure 4.11 uses the Pthreads API. What would be output from the program at LINE C and LINE P?

#include <pthread.h>

#include <stdio.h>

int value=0;

void *runner(void param); / the thread */

int main(int argc, char *argv[])

{

int pid;

pthread_t tid;

pthread_attr_t attr;



pid = fork();



if (pid == 0)  {/* child process */

   pthread_attr_init(&attr);

   pthread_create(&tid, &attr, runner, NULL);

   pthread_join(tid, NULL);

   printf(“CHILD: value = %d”, value); /* LINE C*/

}

else if (pid > 0) {/* parent process */

   wait(NULL);

   printf(“PARENT: value = %d”, value); /* LINE P */

}

}

void *runner(void *param) {

 value=10;

 pthread_exit(0);

}

简答题 (10 分)
附件 上传 最多可上传6张图片
6.
Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single-processor system?

简答题 (10 分)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值