浙江大学 2005–2006 学年秋季学期 《操作系统分析及实验》课程期末考试试卷

合集下载

2006年下半年系统分析师试卷及答案和分析(24页)

2006年下半年系统分析师试卷及答案和分析(24页)

2006年下半年系统分析师上午试卷●根据如下所示的UML类图可知,类Car和类Boat中的move()方法(1)。

(1)A.引用了类Transport的move()方法B.重置了类Transport的move()方法C.是类Transport的move()方法的聚集D.是类Transport的move()方法的泛化●在UML的通用机制中,(2)用于把元素组织成组;(3)是系统中遵从一组接口规范且付诸实现的物理的、可替换的软件模块。

(2)A.包B.类C.接口D.构件(3)A.包B.类C.接口D.构件●回调(Call back)函数是面向过程的程序设计语言中常用的一种机制,而设计模式中的(4)模式就是回调机制的一个面向对象的替代品。

该模式的意图是(5)。

(4)A.Strategy(策略)B.Adapter(适配器)C.Command(命令)D.Observer(观察者)(5)A.使原本由于接口不兼容而不能一起工作的那些类可以一起工作B.将一个请求封装为一个对象,从而可用不同的请求对客户进行参数化,将请求排队或记录请求日志,支持可撤销的操作C.定义对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都得到通知并被自动更新D.使算法可独立于使用它的客户而变化●关于网络安全,以下说法中正确的是(6)。

(6)A.使用无线传输可以防御网络监听B.木马是一种蠕虫病毒C.使用防火墙可以有效地防御病毒D.冲击波病毒利用Windows的RPC漏洞进行传播●许多黑客利用缓冲区溢出漏洞进行攻击,对于这一威胁,最可靠的解决方案是(7)。

(7)A.安装防火墙B.安装用户认证系统C.安装相关的系统补丁D.安装防病毒软件●(8)无法有效防御DDos攻击(8)A.根据IP地址对数据包进行过滤B.为系统访问提供更高级别的身份认证C.分安装防病毒软件D.使用工具软件检测不正常的高流量●IPSec VPN安全技术没有用到(9)。

浙大C++2005~2006春浙江大学考试答答案和评分标准

浙大C++2005~2006春浙江大学考试答答案和评分标准

浙⼤C++2005~2006春浙江⼤学考试答答案和评分标准浙江⼤学2005–2006学年_春_季学期《⾯向对象程序设计》课程期末考试试卷开课学院:计算机学院,考试形式:闭卷考试时间:_2006_年_4_⽉_18_⽇,所需时间: 120 分钟,任课教师_________ 考⽣姓名: _____学号:专业: ________1. Write the output of the code below(20%):每题4分1)int aa1=53,aa2=69;void f(int a1,int &a2){a2=a1;a1+=a2;cout << aa1 << aa2 << endl; //看清楚题⽬aa2 -= 7;a2++;}void main(){f(aa1,aa2);cout << aa1 << aa2 <}535353472) class A{static int m; //careint n;public:A(int m,int n){this->m=m;this->n=n;}Print(){ cout << m <<"---" << n << endl;}};int A::m; //改错时候注意A a2(5,6);a1.Print();a2.Print();}5---45---63)char a['z'];for (char i='a';i<='z';i++)a[i] = 'A'+i-'a';cout << a['e'] << endl;for (char i='a';i<='z';i++)a[i] = '1'+i-'a';cout << a['e'] << endl;E54)#includeusing namespace std;class A {int i;public:A():i(10) { cout << "A() " <virtual ~A() { cout << "~A() " << "\t"; } virtual void f() { i+=11; cout << "A::f() " < void g() { i+=12; cout << "A::g() "< };class B : public A {int i;public:B():i(20) { cout << "B() " <~B() { cout << "~B() " << "\t"; }void f() { i+=22; cout << "B::f() " <void g() { i+=12; cout << "B::g() "<{return B();}int main(){A* p = new B();p->f();cout <A a;B b = gen();a = b;a.f();cout <b.g();delete p;return 0;}A() 10 A::f() 21 B() 20 B::f() 42 B::f() 64A() 10 A::f() 21 A() 10 A::f() 21 B() 20 B::f() 42 A::f() 32 B::g() 54 ~B() ~A() ~B() ~A() ~A()此题答案不要求tab的对齐,但是如果存在换⾏错误(多余的或缺少的),所有的换⾏错误合计扣1分5)void main(){int m = 555;int n = 666;int &k = m;k++;cout << m <<”----“ << n << endl;k = n;k++;cout << m <<”----“ << n << endl;}556----666667----666D1、In C++ Language,function prototype doesn’t identify ( )A. The return type of the function.B. The number of arguments of the functionC. The type of arguments of the function.D. The functionality of the functionB 2、In C++ program, objects communicate each other by ( )A. InheritanceB. Calling member functionsC. EncapsulationD. Function overloadingB 3、For an arbitrary class,the number of destructor function can’t be bigger than ( )A. 0B. 1C. 2D. 3C 4、 Suppose a class is defined without any keywords such as public, private and protected,all members default to: ( )A. publicB. protectedC. privateD. staticC 5、About inline function, which statement is correct? ( )A. When the program is executed, inline function will insert the object code to every place where this function is called.B. When the program is compiled, inline function will insert the object code to every place where this function is called.C. Inline function must be defined inside a class.D. Inline function must be defined outside a class with keyword “inline”.B 6、During public inheritance, which statement is incorrect concerning the base class objects and the derived class objects? ( )A. Derived class objects can be assigned to base class objects.B. Derived class objects can initialize base class references.C. Derived class objects can access the members of base class.D. The addresses of derived class objects can be assigned to base class pointers.C 7、For the class definition:class A{public:};class B: public A{public:void func1( ){cout<< ″ class B func 1 ″ <virtual void func2( ){cout<< ″ class B func 2 ″ <};Which statement is correct? ( )A. Both A::func2( ) and B::func1( ) are virtual functionsB. Both A::func2( ) and B::func1( ) are not virtual functionsC. B::func1( ) is virtual function, while A::func2( ) is not virtual functionD. B::func1( ) is not virtual function, while A::func2( ) is virtual function3. Please correct the following programs(point out the errors and correct them)(15%) 1) 6分,每错2分class A{protected:static int k;int m;public:};int A::k;class B : public A{int n;public:static void F(int k){this->A::k = k;}void F2(int m){this->m = m;}};void main(){B b1,b2;b2.F2(5);}2)2分char a[3];const char *const ptr = a;const char c = 'a';ptr = &c3) 2分class base{...public:virtual void f(void)=0;virtual void g(void)=0;}class derived: public base{...public:virtual void f(void);virtual void g(void);};derived d;4) 5分,前3错各1分,最后⼀题错2分(基本正确给⼀分),class A {int *m_ip;public:A(int *ip = NULL){if(ip){m_ip = new int[5];::memcpy(m_ip,ip,sizeof(int)*5);}elsem_ip = NULL;~A(){delete m_ip; //改成 delete [] m_ip更好}A operator+(const A &a) const { // (1)(2)A temp(m_ip);for (int i=0; i<5; i++)temp.m_ip[i] += a.m_ip[i];return temp;}const A &operator=(const A &a){ // (3)if(a.m_ip){m_ip = new int[5];::memcpy(m_ip,a.m_ip,sizeof(int)*5);}elsem_ip = NULL;return *this;}friend ostream operator<<(ostream &,const A &); };ostream operator<<(ostream &out ,const A &a); // (4) {out << “(“ ;for (int i=0;i<4;i++)out << a.m_ip[i] << “,”;return out << a.m_ip[5] << “)”;}// Suppose the following code is correctvoid main(){const int k[5]={3,5,6,2,1};const A a1(k),a2(k);A a3(k);a3 = a1+a2;cout << a3 << endl;4、Fill in the blanks(30%)每格2分1)The function template MaxMin() can find out the max and min of a two dimension array,row is first dimension of length and col is second dimension of length . #includetemplate void MaxMin(T* array,int row,int col){T max = array[0],min = array[0];for(_int i=0 ;ifor( int j=0 ;j{if( maxmax = array[i*row+j];if( min > array[i*col+j] )min = array[i*row+j];}cout << "max=" << max << endl;cout << "min=" << min << endl;}void main(){int ai[2][3]={{8,10,2},{14,4,6}};MaxMin( (int*)ai, 2, 3 );}2) Please fill in the suitable code to make the program results 60。

2005春计算机(本科)《计算机操作系统》试卷及成绩分析

2005春计算机(本科)《计算机操作系统》试卷及成绩分析

2005春计算机(本科)《计算机操作系统》试卷及成绩分析《计算机操作系统》是开放教育本科计算机专业的必修课程,通过学习使学员掌握计算机操作系统的设计基本原理及组成;计算机操作系统的基本概念和相关的新概念、名词及术语;了解计算机操作系统的发展特点和设计技巧和方法;对常用计算机操作系统(Dos、Windows和Unix或Linux)会进行基本的操作使用。

考试是对平时教与学各环节的集中检测,并对教学活动起着一定的推动、导向的作用。

下面对试题和学生答卷情况做简要分析。

一、试卷情况1、试题类型分为选择题、是非题、填空题和应用题。

●单选题或多选题:给出一些有关计算机操作系统特点,要求学员从题后给出的供选择的答案中选择合适的答案,补足这些叙述。

这类题目主要考察学员对各种计算机操作系统和算法设计方法相关知识的掌握程度。

●是非题:这类题目主要考察学员对计算机操作系统概念、名词术语的正确理解情况。

●填空题:这类题目主要考察学员对计算机操作系统五大功能算法的理解能力。

●应用题:这类题目包含计算题,主要考察学员理解计算机操作系统解决问题的设计思路能力。

2、考核形式采用平时成绩与期末考试相结合的方式。

平时考核:视平时作业和课程实验的完成情况给分,占考核总成绩的20%,未完成者不能参加期末考试;期末考试:采用闭卷笔试,它占总成绩的80%,答题时限90分钟。

以上两部分成绩累计60分及以上则考核通过。

2、试卷内容的特点:试题基本上是按照中央电大下发的《考试说明》来出题的,重点突出,覆盖面广。

试题基本上分散在课程大作业及最近四个学期的考试试卷中。

偏题不多,较之去年试题难度有所降低。

通过本次考试,是可以对本学期学生的学习情况作出一个客观、公正的评价的。

二、学生考试成绩情况及分析参加考试26人,通过26人,合格率100%,这说明:1、学生对知识掌握的较好。

只有清楚地把握住基本概念,才能考出较好的分数。

2、学生对开放教育学习形式已经适应。

操作系统期末考试卷子及答案

操作系统期末考试卷子及答案

2
1
6
3
7
6
3
2
1
7
《操作系统》试卷 A(第 2 页 共 3 页)
缺页中断 被置换的页 缺页次数



是 2


是 1


是 6
是 3

7
得分 五、程序题(每小题 8 分,共 16 分) 1.学校图书馆有 500 个座位,只有 1 张登记表,每位进入图书馆的读者要在登记表上登记,退 出时要在登记表上注销。当图书馆中没有空座位时,后到的读者在图书馆外等待(阻塞) 。拟采用 信号量(Semaphores)实现上述功能。 int s = 500; //seats int m = 1; //mutex lock login() { wait(s); wait(m); register(); signal(m); } logout() { wait(m); unregister(); signal(m); signal(s); } 2. 爸爸、妈妈、儿子和女儿四个人共用一个空的水果盘,如果盘子为空,则爸爸或妈妈可以 向盘中放水果,每次只能放一个,爸爸负责放苹果,妈妈负责放桔子,儿子只吃盘中的桔子,女儿 只吃盘中的苹果。请用 PV 操作实现上面的任务。 empty = 1; apple = orange = 0; father() { wait(empty); signal(apple); } mother() { wait(empty); signal(orange); } son() { wait(orange); signal(empty); } daughter() { wait(apple); signal(empty); }
杭州师范大学国际服务工程学院(信息科学与工程学院) 2013-2014 学年第一学期期末考试

操作系统期末试题及答案

操作系统期末试题及答案

《操作系统》期末试卷姓名一、选择题(15*2分=30分)1、在操作系统中,JCB是指(A )A.作业控制块B.进程控制块C.文件控制块D.程序控制块2、并发进程之间(D)A.彼此无关B.必须同步C.必须互斥D.可能需要同步或互斥3A4?A5、(DA6A7A.8A.C.9、设有。

A.210A.11A12、()AC13A14、(BA.固定分区B.分段C.分页D.可变分区15、在进程管理中,当()时,进程从阻塞状态变为就绪状态。

A.进程被进程调度程序选中B.等待某一事件C.等待的事件发生D.时间片用完二、填空题(20*1分=20分)1、在单用户环境下,用户独占全机,此时程序的执行具有_封闭性______和_可再现性_。

2、对于信号量,在执行一次P操作时信号量-1_;当其值为__<0__时,进程应阻塞。

在执行V操作时信号量的值应当_信号量+1_;当其值为__<=0__时,应唤醒阻塞队列中的进程。

3、进程的三种基本状态分别是、进程的三种基本状态分别是__运行______,_就绪_和__阻塞(等待)__。

4、多道程序环境下的各道程序,宏观上它们是_并行__运行,微观上是_串行_运行。

5、在单CPU系统中有(n>1)个进程,在任一时刻处于就绪的进程最多是__n-1__个,最少是___0____个。

6、分区管理方案不能实现虚存的原因是_作业地址空间不能大于存储空间_。

7、段页式存储管理中,是将作业分_段__,__段_____内分___页____。

分配以__页_____为单位。

在不考虑使用联想存储器快表的情况下,每条访问内存的指令需要____3___访问内存。

其中第_2___次是查作业的页表。

三、简答题(4*5分=20分)(2)????????????进程A???????????????????????????????进程B ???????????...??????????????????????????????????... ????????P(mutex);????????????????????????????P(mutex);????????申请打印机;???????????????????????????申请打印机;????????使用打印机;???????????????????????????使用打印机;????????V(mutex);?????????????????????????????V(mutex);2、两个程序,其中A请求系统服务时间5s,B请求系统服务时间为100s,设第0到第5秒前,CPU运行C进程。

浙江大学2003级数字电路期末考试卷

浙江大学2003级数字电路期末考试卷

浙江大学2005–2006学年秋冬季学期《数字系统设计基础》课程期末考试试卷开课学院: 信息学院 ,考试形式:闭卷,允许带___________入场 考试时间:_2006_年_1_月_14_日,所需时间: 120 分钟考生姓名: _____学号: 专业: ________一、(10分)把下列逻辑表达式化简为最简形式(不考虑冒险)。

(1) ,,,1Y (A B C D)=A B CD+A(B+C )(B+D )+A+C+D(2))10,8,4,0(d )13,12,7,5,3,2(M )D ,C ,B ,A (Y 2∏•∏= 其中d 表示任意项。

二、(本题共15分,其中第1、2小题6分,其中第3小题3分)设计一个一位8421BCD码乘以5的电路,要求输出也为8421BCD码,写出设计过程,画出电路。

1.用4线-16线译码器及门电路实现此电路(只画出十位的BCD码电路即可);2.只用四位全加器实现此电路;果也可用二进制表示。

3.不用任何器件设计此电路,请写出设计过程,画出电路。

三、(7分)P(P2P1P0)、Q(Q2Q1Q0)为二个三位无符号二进制数,试用一个3线-8线译码器74138和一个8选1数据选择器74151和尽可能少的门电路设计如下组合电路:当P=Q时,电路输出Y=1;否则,Y=0。

四、(12 分)以一个计数器74161为核心器件和少量门电路,设计一个带同步清0功能的5421BCD码计数器:电路有清0输入控制端R,当R=0时,同步清0;当R=1时,按5421BCD码规则同步计数,注意不能有过渡态。

5421BCD码编码规则:0~9分别为:0000、0001、0010、0011、0100、1000、1001、1010、1011、1100。

请写出设计过程。

五、(15分)试用JK触发器及与非门设计一个具有异步清零功能的2421BCD码十进制同步计数器,不要求自启动分析。

2421BCD码如下表所示:六、分析题(本题共16分,每小题8分)1、分析由移位计数器74194组成的时序,画出电路状态图?(排列次序:Q0Q1Q2Q3,另外S1 S0=00,保持;S1 S0=01,右移;S1 S0=10,左移;S1 S0=11,置数。

浙江大学2005–2006学年秋季学期《操作系统原理》课程试卷及答案

浙江大学2005–2006学年秋季学期《操作系统原理》课程试卷及答案

For every following question, please select your best answer only!!!
OS_Theory_1
1. An operating system is a program that manages the __________. A.) computer hardware B.) computer software C.) computer resources D.) application programs 2. An operating system is designed for ease of use and/or __________. A.) speed B.) compatibility C.) resource utilization D.) flexibility 3. Which OS is the oldest? A.) UNIX B.) MULTICS C.) Windows 3.x D.) Windows XP 4. The evolution of operating systems for mainframes is roughly like from __________. A.) no software multi-programming multi-tasking B.) no software multi-tasking multi-programming C.) no software resident monitors multi-tasking multi-programming D.) no software resident monitors multi-programming multi-tasking 5. Users can create and destroy process by ________________. A.) function invocation B.) macro instruction C.) system calls D.) procedure invocation 6. __________ is to keep multiple jobs in memory simultaneously in order to keep the CPU busy. A.) batch processing B.) real-time processing C.) multiprogramming D.) parallel execution 7. What is the purpose of system calls? A.) System calls allow us to write assembly language programs. B.) System calls are the standard interface between a user process and a kernel process. C.) System calls allow user-level processes to request services of the operating

浙大操作系统试题-2003-2004_PncipleExam6

浙大操作系统试题-2003-2004_PncipleExam6

浙江大学2003 —2004 学年第一学期期终考试《操作系统》课程试卷考试时间:120 分钟开课学院: 计算机学院专业:___________姓名:____________ 学号:_____________ 任课教师:_____________题序一二三(1)三(2)三(3)三(4)三(5)总分评分评阅人PART I Operating System Principle Exam一、C hoose True(T) or False(F) for each of following statements and fill your answer infollowing blanks, (20 marks)1. ( )2. ( )3. ( )4. ( )5. ( )6. ( )7. ( )8. ( )9. ( ) 10. ( )11. ( ) 12. ( ) 13. ( ) 14. ( ) 15. ( )16. ( ) 17. ( ) 18. ( ) 19. ( ) 20. ( )1.Process is an entity that can be scheduled.2.In the producer-consumer problem, the order of wait operations cannot be reversed, while theorder of signal operations can be reversed.3.As to semaphores, we can think an execution of signal operation as applying for a resource.4.Mutual exclusion is a special synchronization relationship.5.Paging is a virtual memory-management scheme.6.If the size of disk space is large enough in the virtual memory-management system, then aprocess can have unlimited address space.7.Priority-scheduling algorithm must be preemptive.8.In the virtual memory-management system, the running program can be larger thanphysical memory.9.File directory is stored in a fixed zone in main memory.10.While searching a file, the searching must begin at the root directory.11.Thread can be a basic scheduling unit, but it is not a basic unit of resourceallocation.12. A process will be changed to waiting state when the process can not be satisfiedits applying for CPU.13.If there is a loop in the resource-allocation graph, it shows the system is ina deadlock state.14.The size of address space of a virtual memory is equal to the sum of main memoryand secondary memory.15.Virtual address is the memory address that a running program want to access.16.If a file is accessed in direct access and the file length is not fixed, thenit is suitable to use indexed file structure.17.SPOOLing system means Simultaneous Peripheral Operation Off Line.18.Shortest-seek-time-first(SSTF) algorithm select the request with the minimumhead move distance and seek time. It may cause starvation.19.The main purpose to introduce buffer technology is to improve the I/O efficiency.20.RAID level 5 stores data in N disks and parity in one disk.二、Choose the CORRECT and BEST answer for each of following questions and fill your answer in following blanks, (30 marks)1. ( )2. ( )3. ( )4. ( )5. ( )6. ( )7. ( )8. ( )9. ( ) 10. ( )11. ( ) 12. ( ) 13. ( ) 14. ( ) 15. ( )16. ( ) 17. ( ) 18. ( ) 19. ( ) 20. ( )21. ( ) 22. ( ) 23. ( ) 24. ( ) 25. ( )26. ( ) 27. ( ) 28. ( ) 29. ( ) 30. ( )1. A system call is 。

浙江大学2004-05学年第二学期期末考试题及答案

浙江大学2004-05学年第二学期期末考试题及答案
(4 分) (2 分)
(4 分) (2 分) (1 分)
(4 分)
解得特征根为 s1 2, s2 2 , s3 2 j , s4 2 j , s5,6 1 j 。 (3 分)
由此可知系统临界稳定。
五、解:K w1wc
该系统的开环传递函数为 G(s)H(s)
=
w1wc
(
1 w1
s
1)
轨迹图。
(14 分)
五、已知最小相位系统 Bode 图的渐近幅频特性如下图所示,求该系统的开环传递函数。(16 分)
六、设单位反馈系统的开环传递函数为 G(s)
K
,要求系统响应单位匀速信号的
s(0.04s 1)
稳态误差 ess 1% 及相角裕度 45 ,试确定串联迟后校正环节的传递函数。 (16 分)
ess =0.25,试确定系统参数 K、 。
(16 分)
三、设系统特征方程如下,判断系统的稳定性,如果不稳定,说出不稳定根的个数。
(1) s4 3s3 s2 3s 1 0
(7 分)
(2)s6 2s5 8s4 12s3 20s2 16s 16 0
(7 分)
四、已知单位负反馈系统的开环传递函数为 G(s) 0.25(s a) ,试绘制以 a 为参变量的参量根 s 2 (s 1)
浙江大学 2004-2005 学年第二学期期末考试题
专业班级:自 02-3-5 班
课程名称:自动控制原理(A)
第 1 页共 2 页
一 、 已 知 系 统 方 框 图 如 图 所 示 , 通 过 方 框 图 等 效 简 化 求 系 统 的 传 递 函 数 C(s) 。 F (s)
(14 分)
二、 某控制系统的方框图如图所示,欲保证阻尼比 =0.7 和响应单位斜坡函数的稳态误差为

浙江大学05-06秋冬计算机网络考试试卷

浙江大学05-06秋冬计算机网络考试试卷

浙江⼤学05-06秋冬计算机⽹络考试试卷浙江⼤学2005–2006学年秋季学期《计算机⽹络》课程期末考试试卷开课学院:软件学院,考试形式:闭卷考试时间:_____年____⽉____⽇, 所需时间:120分钟考⽣姓名: ___学号:专业:得分:答案:For every following question, please select your best answer only1.The transmission unit for the physical layer is a/an __________.A.)packetB.)frameC.)bitD.)byte2.Which best describes the structure of an encapsulated data packet?A.)Segment header, network header, data, frame trailerB.)Segment header, network header, data, segment trailerC.)Frame header, network header, data, frame trailerD.)Frame header, segment header, data, segment trailer3.The communication subnet consists of __________.A.)physical layer, data link layer, and network layerB.)physical layer, network layer, transport layerC.)physical layer, data link layer, network layer, transport layerD.)data link layer, network layer, transport layer, session layer4.Which of the following statements best describes a WAN?A.)It connects LANs that are separated by a large geographic area.B.)It connects workstations, terminals, and other devices in a metropolitan area.C.)It connects LANs within a large building.D.)It connects workstations, terminals, and other devices within a building.5.Which is the movement of data through layers?A.)WrappingB.)EncapsulationC.)TravelingD.)Transmission6.Which is the OSI model?A.) A conceptual framework that specifies how information travels through networks.B.) A model that describes how data make its way from one application program to another throughout a network.C.) A conceptual framework that specifies which network functions occur at each layerD.)All of the above7.Which of the OSI layers divides the transmitted bit stream into frames?A.)Physical layerB.)Data link layerC.)Network layerD.)Transport layer8.Which of the following is incorrect?A.)The OSI model is better the TCP/IP model.B.)The OSI model provides more efficient implementation than the TCP/IP model.C.)The OSI model has more layers than the TCP/IP model.D.)The OSI model makes the distinction between services, interfaces, protocols.9.In the TCP/IP model, which layer deals with reliability, flow control, and error correction?A.)ApplicationB.)TransportC.)InternetD.)Network access10.The TCP/IP protocol suite has specifications for which layers of the OSI model?A.) 1 through 3B.) 1 through 4 and 7C.)3,4,and 5 through 7D.)1,3,and 411. A noiseless 4-k Hz channel is sampled every 1 msec. What is the maximum data rate?A.)8000 bpsB.)4000 bpsC.)1000 bpsD.)Can be infinite12.If a binary signal is sent over a 4-k Hz channel, what is the maximum achievable data rate?A.)8000 bpsB.)4000 bpsC.)1000 bpsD.)Can be infinite13.If a binary signal is sent over a 4-k Hz channel whose signal-to-noise ratiois 127:1, what is the maximum achievable data rate?A.)28000 bpsB.)8000 bpsC.)4000 bpsD.)Can be infinite14. A modem constellation diagram has data points at the following coordinates: (1, 1), (1, -1), (-1, 1), and (-1, -1). How many bps can a modem with these parameters achieve at 1200 baud?A.)1200 bpsB.)2400 bpsC.)4800 bpsD.)None of the above15.What is WDM?A.)Multiplexing on fiber-optic cable.B.)Multiplexing using the density of the transmission media.C.) A form of flow control that monitors WAN delays.D.) A form of congestion management for WANs.16.Which technology is not a type of wireless communication?A.)CellularB.)BroadbandC.)InfraredD.)Spread spectrum17.What is one advantage of using fiber optic cable in networks?A.)It is inexpensive.B.)It is easy to install.C.)It is an industry standard and is available at any electronics storeD.)It is capable of higher data rates than either coaxial or twisted-pair cable.18. A telephone switch is a kind of __________.A.)packet-switchingB.)buffer-switchingC.)fabric-switchingD.)circuit-switching.19. A cable TV system has 100 commercial channels, all of them alternating programswith advertising. This kind of multiplexing uses ___________.A.)TDMB.)FDMC.)FDM + TDMD.)None of the above.20. A bit string, 01101111101111110, needs to be transmitted at the data link layer.What is the string actually transmitted after bit stuffing (Whenever the sender’s data link layer encounters five consective 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream)A.)01101111101111110B.)0110111110011111010C.)011011111011111010D.)None of the above21.When DCF (Distributed Coordination Function) is employed, 802.11 uses a protocolcalled __________.A.)CSMA/CAB.)CSMA/CDC.)ALOHAD.)WDMA22.Which of the following can NOT directly be used for framing?A.)Character count.B.)Flag bytes with byte stuffing.C.)Starting and ending flags, with bit stuffing.D.)Physical layer coding violations.23.Which of the following can a VLAN be considered?A.)Broadcast domainB.)Collision domainC.)Both a broadcast and a collision domainD.)Domain name24.What is the purpose of Spanning Tree Protocol? (Network Bridging)A.)To maintain single loop pathsB.)To maintain a loop-free networkC.)To maintain a multiloop networkD.)To maintain a reduced loop network25.Which uses the twisted pairs?A.)10Base5.B.)10Base2.C.)10Base-F.D.)10Base-T.26.How do switches learn the addresses of devices that are attached to their ports?A.)Switches get the tables from a router.B.)Switches read the source address of a packet that is entering through a port.C.)Switches exchange address tables with other switches.D.)Switches are not capable of building address tables.27.Repeaters can provide a simple solution for what problem?A.)Too many types of incompatible equipment on the networkB.)Too much traffic on a networkC.)Too-slow convergence ratesD.)Too much distance between nodes or not enough cable.28.Which of the following is true of a switch’s function?A.)Switches increase the size of a collision domains.B.)Switches combine the connectivity of a hub with the capability to filteror flood traffic based on the destination MAC address of the frame.C.)Switches combine the connectivity of a hub with the traffic direction ofa router.D.)Switches perform Layer 4 path selection.29.Ethernet MAC addresses are how many bits in length?A.)12B.)24C.)48D.)6430.What is the information that is “burned in ” to a network interface card?A.)NICB.)MAC addressC.)HubD.)LAN31.Which connector does UTP (Unshield Twised Pair) use?A.)STPB.)RJ-45C.)RJ-69D.)BNC/doc/a9251a5077232f60ddcca14b.html ing repeaters does which of the following to the collision domain?A.)ReducesB.)Has no effect onC.)ExtendsD.)None of the above33.Which of the following is not a feature of microsegmentation?A.)It enables dedicated access.B.)It supports multiple conversions at any given time.C.)It increases the capacity for each workstation connected to the network.D.)It increases collisions.34.Which of the following protocols would have the highest channel utilization?A.)0.5-persistent CSMAB.)1-persistent CSMAC.)Pure ALOHAD.)Slotted ALOHA35.Which of the following is true concerning a bridge and its forwarding decisions?A.)Bridges operate at OSI Layer 2 and use IP addresses to make decisions.B.)Bridges operate at OSI Layer 3 and use IP addresses to make decisions.C.)Bridges operate at OSI Layer 2 and use MAC addresses to make decisions.D.)Bridges operate at OSI Layer 3 and use MAC addresses to make decisions.36.Fast Ethernet supports up to what transfer rate?A.) 5 MbpsB.)10 MbpsC.)100 MbpsD.)1000 Mbps37.Media Access Control refers to what?A.)The state in which a NIC has captured the networking medium and is readyto transmitB.)Rules that govern media capture and releaseC.)Rules that determine which computer on a shared-medium environment is allowed to transmit the dataD.) A formal byte sequence that has been transmitted.38.Which best describes a CSMA/CD network?A.)One node’s transmission traverses the entire network and is received and examined by every node.B.)Signals are sent directly to the destination if the source knows both theMAC and IP addressesC.)One node’s transmission goes to the nearest router, which sends it directlyto the destination.D.)Signals always are sent in broadcast mode.39.Which of the following statements about IPv4 header fields is incorrect?A.)An address has 32 bits.B.)The TTL has 4 bits.C.)The version has 4 bits.D.)The identification has 16 bits.40.The subnet mask for a class B network is 255.255.255.192. How many subnetworks are available? (Disregard special addresses)A.) 2B.) 4C.)1024D.)19241.Which of the following can be used to connect a keyboard with a computer?A.)802.3B.)802.11C.)802.15D.)802.1642.Which of the following can be used as the wireless local loop for public switched telephone systems?A.)802.3B.)802.11C.)802.15D.)802.1643.What is the IP address of the internal loopback?A.)10.10.10.1B.)255.255.255.0C.)127.0.0.1D.)192.0.0.144.How does the network layer forward packets from the source to the destination?A.)By using an IP routing tableB.)By using ARP responsesC.)By referring to a name serverD.)By referring to the bridge45.What is one advantage of dynamic routing?A.)Takes little network overhead and reduces network trafficB.)Reduces unauthorized break-ins because security is tightC.)Adjusts automatically to topology or traffic changesD.)Requires little bandwidth to operate efficiently46.Which best describes a default route?A.)Urgent-data route manually entered by a network administratorB.)Route used when part of the network failsC.)Route used when the destination network is not listed explicitly in therouting tableD.)Preset shortest path47.What does ICMP stand for?A.)Internal Control Message PortalB.)Internal Control Message ProtocolC.)Internet Control Message PortalD.)Internet Control Message ProtocolE.)48.What does TTL stand for? (For IP Header fields)A.)Time-To-ListB.)Time-To-LiveC.)Terminal-To-ListD.)Terminal-To-Live49.What is one advantage of distance vector algorithms?A.)They are not likely to count to infinity.B.)You can implement them easily on very large networks.C.)They are not prone to routing loops.D.)They are computationally simple50.Which of the following best describes a link-state algorithm?A.)It recreates the topology of the entire internetwork.B.)It requires numerous computations.C.)It determines distance and direction to any link on the internetwork.D.)It uses litter network overhead and reduces overall traffic.51.What is the minimum number of bits that can be borrowed to form a subnet?A.) 1B.) 2C.) 4D.)None of the above52.In order to find out its IP address, a machine can use __________.A.)ARPB.)RARPC.)ICMPD.)UDP53.Which portion of the Class B address 154.19.2.7 is the network address?A.)154B.)154.19C.)154.19.2D.)154.19.2.754.How many host addresses can be used in a Class C network?A.)253B.)254C.)255D.)25655.Which of the following can NOT be used to traffic shaping?A.)OverprovisioningB.)Leaky bucket algorithmC.)Token bucket algorithmD.)Packet scheduling56.When the congestion is very seriously, which kind of control should be used?A.)Warning bitsB.)Load sheddingC.)Chocke packetsD.)Hop-by-hop chope packets57.Which of the following is most appropriate in order to make the full use of IP addresses?A.)SubnetingB.)CIDRC.)NATD.)All of the above58.How many bits does an IPv6 address have?A.)32B.)64C.)128D.)25659.Which of the following is true for distance vector routing?A.)Useful for nothing.B.)Used in OSPFC.)Used in BGPD.)None of the aboveGiven the subnet shown in (a) and the incomplete routing table shown in (b), please use distance vector routing to answer the next 4 questions.60.What is the new distance and next hop for going to C?A.)28,IB.)28,AC.)12,ID.)12,G61.What is the new distance and next hop for going to F?A.)30,HB.)30,IC.)18,AD.)18,K62.What is the new distance and next hop for going to H?A.)0,AB.)3,IC.)12,HD.)18,K63.What is the new distance and next hop for going to L?A.)6,AB.)13,IC.)14,HD.)15,K64.What does the window field in a TCP segment indicate?A.)Number of 32-bit words in the headerB.)Number of the called portC.)Number used to ensure correct sequencing of the arriving dataD.)Number of octets that the device is willing to accept65.What do TCP and UDP use to keep track of different conversations crossing a network at the same time?A.)Port numbersB.)IP addressesC.)MAC addressesD.)Route numbers66.Which range of port numbers is unregulated?A.)Below 255B.)Between 256 and 512C.)Between 256 and 1023D.)Above 102367.Which of the following is incorrect for the TCP header fields?A.)The source port has 16 bits.B.)The URG has just 1 bit.C.)The Window size has 32 bits.D.)The acknowledgement number has 32 bits.68.How does TCP synchronize a connection between the source and the destination before data transmission?A.)Two-way handshakeB.)Three-way handshakeC.)Four-way handshakeD.)None of the above69.What is true for TCP’s retransmission timer?A.)Fixed value to allow 90% of segments arrive without retransmissionB.)Fixed value to allow 80% of segments arrive without retransmissionC.)Dynamic value based on the past successful transmission historyD.)Dynamic value based on the last successful transmission’s RTT70.UDP segments use what protocols to provide reliability?A.)Network layer protocolsB.)Application layer protocolsC.)Internet protocolsD.)Transmission control protocols71.Which of the following is most appropriate?A.)UDP just provides an interface to the IP protocol with the added feature of demultiplexing multiple processes using the ports.B.)UDP can be used to implement RPC.C.)UDP can be used to implement RTP.D.)All of the above.72.Which of the following is a basic service of the transport layer?A.)Provides reliability by using sequence numbers and acknowledgementsB.)Segments upper-layer application dataC.)Establishes end-to-end operationsD.)All of the above73.The TCP primitives depend on __________.A.)both the operating system and the TCP protocol.B.)the operating system only.C.)the TCP protocol only.D.)the operating system and the TCP protocol and the IP protocol.74.The default port for TELNET is __________.A.)21B.)22C.)23D.)2475.Which of the following is incorrect?A.)DNS stands for Domain Name System.B.)There is only one record associated with every IP.C.)Domain names can be either absolute or relative.D.)Domain names are case insensitive.76.What does MIME stand for?A.)Messages In Multi EncodingB.)Multipurpose Internet Mail ExtensionsC.)Multipurpose Internet Mail EncodingD.)None of the above77.Which of the following is not a protocol for email?A.)SMTPB.)POP3C.)IMAPD.)GOPHER78.Which of the following is incorrect?A.)HTML stands for HyperText Markup Language.B.)XML stands for eXtensible Markup Language.C.)XHTML stands for eXtended HyperText Markup Language.D.) A browser can display HTML documents as well as XML documents.79.Which of the following tags is used to define a hyperlink?A.) …B.) …C.) …D.)…80.Which of the following is not a built-in HTTP request methods?A.)GETB.)POSTC.)PUTD.)FETCH81.Which of the following is not able to generate dynamic content on the server side?A.)CGIB.)JSPC.)ASPD.)JavaScript82.Which of the following is able to generate dynamic content on the client side?A.)Java AppletB.)JavaScriptC.)ActiveXD.)All of the above83.Which of the following is true?A.)WAP 1.0 is successful while I-Mode is not.B.)I-Mode is successful while WAP 1.0 is not.C.)Both WAP 1.0 and I-Mode are successful.D.)Neither WAP 1.0 nor I-Mode is successful.84.Which of the following security policies is hopeless?A.)802.11 WEPB.)Bluetooth securityC.)WAP 2.0 securityD.)None of the above85.Which of the following is incorrect?A.)X.509 can be used to describe the certificates.B.)An organization that certifies public keys is now called a CA.C.)The Diffie-Hellman key exchange allows strangers to establish a shared secret key.D.)The Diffie-Hellman key exchange can be attacked by the bucket brigade or man-in-the-middle attack.86.In a public key encryption system, a sender has encrypted a message with the recipient's public key. What key does the recipient use to decipher the message?A.)The recipient's private key.B.)The recipient's public key.C.)The sender's private key.D.)The sender's public key.87.Which of the following statements is true of ping?A.)The ping command is used to test a device’s network connectivity.B.)The ping stands for packet Internet groperC.)The ping 127.0.0.1 command is used to verify the operation of the TCP/IP stack.D.)All of the above.88.Which of the following can be used to test application protocols?A.)pingB.)tracertC.)netstatD.)telnet89.Which of the following can be used to display TCP connections?A.)pingB.)tracertC.)netstatD.)telnet90.Which of the following system calls is used to create a server socket?A.)socketB.)openC.)requestD.)creat91.Which of the following system calls is to specify queue size for a server socket?A.)bindB.)sizeC.)listenD.)acceptFor the following cipher chaining modes, please answer the following three questions.92.Which mode is most suitable for use with interactive terminals?A.)Cipher chaining AB.)Cipher chaining BC.)Cipher chaining CD.)Cipher chaining D93.Which mode is most suitable for use with real-time streaming?A.)Cipher chaining AB.)Cipher chaining BC.)Cipher chaining CD.)Cipher chaining D94.Which mode is most suitable for use with disk files?A.)Cipher chaining AB.)Cipher chaining BC.)Cipher chaining CD.)Cipher chaining D95.Which of the following is the strongest symmetric-key encryption algorithm?A.)DESB.)AESC.)RSAD.)MD596.Which of the following is the strongest public-key encryption algorithm?A.)DESB.)SHA-1C.)RSAD.)MD5Consider the figure shown below, which takes some plaintext as input and produces signed ciphertext in some ASCII format as output. Please answer the next questions97.Which of the following should be used for blank (I)?A.)DESB.)AESC.)MD5D.)None of the above98.Which of the following should be used for blank (II)?A.)RSA with Alice’s private RSA keyB.)RSA with Alice’s public RSA keyC.)RSA with Bob’s private RSA keyD.)RSA with Bob’s public RSA key99.Which of the following should be used for blank (III)?A.)MD5B.)AESC.)SHA-1D.)Base64 encoding100.Which of the following should be used for blank (IV)?A.)MD5B.)AESC.)SHA-1D.)None of the above。

2001_PART2LabExam

2001_PART2LabExam

2
B. -R C. -r D. –i 14. Which of following commands can display the amount of disk space available on the file system A. du B. df C. mount D. ln 15. What is the process number for following command? $chmod 644 dir.txt& [3] 164 A. 1 B. 3 C. 164 D. 644 二、 Consider the following LINUX program, please show the possible output on display and in the file test.out. (10 marks) #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main() { int fd;
struct file_system_type { const char *name; int fs_flags; struct super_block *(*read_super) (struct super_block *, void *, int); struct module *owner;
3
struct file_system_type * next; struct list_head fs_supers; }; static int do_add_mount(struct nameidata *nd, char *type, int flags, int mnt_flags, char *name, void *data) { struct vfsmount *mnt = do_kern_mount(type, flags, name, data); int err = PTR_ERR(mnt); if (IS_ERR(mnt)) goto out; down(&mount_sem); /* Something was mounted here while we slept */ while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry)) ; err = -EINVAL; if (!check_mnt(nd->mnt)) goto unlock; /* Refuse the same filesystem on the same mount point */ err = -EBUSY; if (nd->mnt->mnt_sb == mnt->mnt_sb && nd->mnt->mnt_root == nd->dentry) goto unlock; mnt->mnt_flags = mnt_flags; err = graft_tree(mnt, nd); unlock: up(&mount_sem); mntput(mnt); out: return err; } /* * Flags is a 32-bit value that allows up to 31 non-fs dependent flags to * be given to the mount() call (ie: read-only, no-dev, no-suid etc). * * data is a (void *) that can point to any structure up to * PAGE_SIZE-1 bytes, which can contain arbitrary fs-dependent * information (or be NULL). * */ long do_mount (char * dev_name, char * dir_name, char *type_page, unsigned long flags, void *data_page) { struct nameidata nd; int retval = 0;

1浙江大学2004—2005学年秋学期期终考试《软件工程》课程试卷

1浙江大学2004—2005学年秋学期期终考试《软件工程》课程试卷

浙江大学2004 —2005 学年秋学期期终考试《软件工程》课程试卷考试时间:__120__分钟开课学院_ 计算机学院_ 专业__姓名______________ 学号_____________任课教师_______________题序一二三四总分评分评阅人I. Please select the correct answers and fill in the answer sheet: (20 pts.)Note: Zero point for a blank selection since there is at least one answer for each problem.1. Approximately which activity listed below will consume the least amount of time in a project?(A)analysis (B) design (C) coding (D) testing2. The first step in project planning is to(A) determine software scope (B) select project team leader(C) determine the budget (D) determine the process model3. Which factors are important when choosing a project team leader?(A) managerial identity (B) outstanding programming ability(C) problem solving ability (D) ability of communicating to other people4. The importance of software design can be summarized in a single word:(B)accuracy (B) complexity (C) efficiency (D) quality5. Which of the following interface design principles reduce the user's memory load? .(A) define intuitive shortcuts (B) disclose information in a progressive fashion(C) each application should have its own distinctive look and feel (D) establish meaningful defaults6. Cohesion is a qualitative indication of the degree to which a module(A) can be written more compactly (B) is connected to other modules and the outside world(C) is able to complete its function in a timely manner (D) focuses on just one thing7. Notations for depicting procedural detail include(A) box diagram (B) ER diagram (C) flow chart (D) decision table8. The best reason for using independent software test teams is that(A)software developers do not need to do any testing(B)testers do not get involved with the project until testing begins(C) strangers will test the software mercilessly(D) the conflicts of interest between developers and testers is reduced9. Which ones of the following are the primary benefits of object-oriented architectures?(A)improved execution performance (B) simplified interfaces(C) information hiding (D) easy component reuse10. Which diagrams are to be built in an object-behavior model?(A)use-case (B) event trace (C) data flow (D) state transitionII. Please specify “T” (true) or “F” (false) for the following statements: (10 pts.)1.Customers, end-users, practitioners, project managers and sales people are all considered as players in the software process.2.Software configuration includes all information produced as part of the software process, such as programs, documents, data, and possibly some developing tools.3.A good software is flexible, so it can easily accommodate changes brought up with the requirement change. 4.Software engineering includes three generic phases: software design, code generation, and software testing.5.We should consider the implementation view first during software requirements analysis.6.Class responsibilities are defined by both its attributes and operations.7.Every computer-based system can be modeled as an information transform using an input-processing-output template. 8.Test cases should be designed long before testing begins.9.Recovery testing is a system test that forces the software to fail in a variety of ways and verifies that software is able to continue execution without interruption.10.C lass testing for OO software is to test operations or algorithms individually for classes.III. Please give brief answers to the following questions: (20 pts.)1.As a modern software project manager, what must you do to begin a project? Please briefly describe the majoractivities of project management. (6 pts.)2.Please give explanations on why requirements elicitation is so difficult. (4 pts.)3.Given a procedure for computing the average of positive numbers:i=0;sum=0;inputa;do while a!=0 { if(a>0){ i++;sum+=a;}inputa;} if(i>0)average=sum/i; elseaverage=-999;Please:(1) draw the corresponding flow graph; (2 pts.)(2) tell the cyclomatic complexity of the procedure; (2 pts.) and(3) list all the independent paths for basis path testing. (2 pts.)4.Please describe the OO recursive/parallel process model for developing software systems. (4 pts.)IV. Given the description of the Football Player System, please analyze the system requirements and complete the requested models. (50 pts.)Football Player System description: The system is to control the motion of robots in a multi-robot football competition. The software must be able to decode the images obtained by the cameras in the robots’ eyes, analyze the information and judge the current state of the field (i.e. the positions of collaborators, rivals, and the ball). Then the system is supposed to send a signal of action (i.e. forward, backward, turn, or stop) to the engine. At the mean time, the software must be able to recognize foul plays. The system can be connected to the main server and be loaded with knowledge such as the rules and strategies of the competition.1.Please draw the data flow diagram for the system. (12 pts.)2.Please give the 4 most important data dictionary cards. (8 pts.)3.Please draw the system state transition diagram. (10 pts.)4.Please give the 4 most important CRC cards. (8 pts.)5.Please draw the relationship diagram between objects according to the above 4 CRC cards. (12 pts.)Answer SheetPart I1. 2. 3. 4. 5.6. 7.8. 9. 10.Part II1. 2. 3. 4. 5.6. 7. 8. 9. 10.Part III1.2.3.4.Part IV。

2022年浙江大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案)

2022年浙江大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案)

2022年浙江大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案)一、选择题1、下面关于文件系统的说法正确的是()。

A.文件系统负责文件存储空间的管理,但不能实现文件名到物理地址的转换B.在多级目录结构中,对文件的访问是通过路径名和用户目录名进行的C.文件可以被划分成大小相等的若干物理块,且物理块大小也可以任意指定D.逻辑记录是对文件进行存取操作的基本单位2、下列算法中,用于磁盘调度的是(),A.时间片轮转法B.LRU算法C.最短寻道时间优先算法D.高优先级算法3、进程P1和P2均包含并发执行的线程,部分伪代码描述如下所//进程P1 //进程P2int x=0; int x=0;Thread1() Thread3(){int a; {int a:a=1; a=x;x+=1; x+=3;Thread2() Thread4(){ {int a: int b, aa=2; b=x;x+=2; x1=4;} }下列选项中,需要互斥执行的操作是()。

A. a=l与a=2B. a=x与b=xC. x+=1与x+=2D. x+=1与x+=34、下面所列进程的3种基本状态之间的转换不正确的是()A.就绪状态→执行状态B.执行状态→就绪状态C.执行状态→阻塞状态D.就绪状态→阻塞状态5、下列关于银行家算法的叙述中,正确的是()A.银行家算法可以预防死锁B.当系统处于安全状态时,系统中…定无死锁进程C.当系统处于不安全状态时,系统中一定会出现死锁进程D.银行家算法破坏了产生死锁的必要条件中的“请求和保持”条件6、下面关于虚拟存储器的论述中,正确的是()。

A.在段页式系统中以段为单位管理用户的逻辑地址空间,以页为单位管理内存的物理地址空间,有了虚拟存储器才允许用户使用比内存更大的地址空间B.为了提高请求分页系统中内存的利用率,允许用户使用不同大小的页面C.为了能让更多的作业同时运行,通常只装入10%~30%的作业即启动运行D.最佳置换算法是实现虚拟存储器的常用算法7、下列说法正确的有()。

2005年10月浙大计算机考博试题-推荐下载

2005年10月浙大计算机考博试题-推荐下载

最优置换算法、先进先出算法、最近最久未使用算法、second chance
5.某系统允许 5000 个用户同事访问,怎么设置只能让 4990 个用户同时访问 Develist 文
件。
通过设置用户属性来实现、通过设置文件属性来实现、两个一起、两个都不行
6.哲学家进餐问题,怎样改进才能避免死锁发生:
do
R1,R2,LOOP ;ifR1!=R2 LOOP
使循环内竞争最少,写出优化后代码,
试题 3 遵循写时无效 cache 一致性监听协议,动作有:总线写,总线读,本地写,本地读 状态有:共享,独占,无效 1) 画出本地 cpu 请求时的状态转换图 2) 填表
-1-
对全部高中资料试卷电气设备,在安装过程中以及安装结束后进行高中资料试卷调整试验;通电检查所有设备高中资料电试力卷保相护互装作置用调与试相技互术关,系电通,力1根保过据护管生高线产中0不工资仅艺料可高试以中卷解资配决料置吊试技顶卷术层要是配求指置,机不对组规电在范气进高设行中备继资进电料行保试空护卷载高问与中题带资2负料2,荷试而下卷且高总可中体保资配障料置各试时类卷,管调需路控要习试在题验最到;大位对限。设度在备内管进来路行确敷调保设整机过使组程其高1在中正资,常料要工试加况卷强下安看与全22过,22度并22工且22作尽22下可护都能1关可地于以缩管正小路常故高工障中作高资;中料对资试于料卷继试连电卷接保破管护坏口进范处行围理整,高核或中对者资定对料值某试,些卷审异弯核常扁与高度校中固对资定图料盒纸试位,卷置编工.写况保复进护杂行层设自防备动腐与处跨装理接置,地高尤线中其弯资要曲料避半试免径卷错标调误高试高等方中,案资要,料求编试技5写、卷术重电保交要气护底设设装。备备置管4高调、动线中试电作敷资高气,设料中课并技3试资件且、术卷料中拒管试试调绝路包验卷试动敷含方技作设线案术,技槽以来术、及避管系免架统不等启必多动要项方高方案中式;资,对料为整试解套卷决启突高动然中过停语程机文中。电高因气中此课资,件料电中试力管卷高壁电中薄气资、设料接备试口进卷不行保严调护等试装问工置题作调,并试合且技理进术利行,用过要管关求线运电敷行力设高保技中护术资装。料置线试做缆卷到敷技准设术确原指灵则导活:。。在对对分于于线调差盒试动处过保,程护当中装不高置同中高电资中压料资回试料路卷试交技卷叉术调时问试,题技应,术采作是用为指金调发属试电隔人机板员一进,变行需压隔要器开在组处事在理前发;掌生同握内一图部线纸故槽资障内料时,、,强设需电备要回制进路造行须厂外同家部时出电切具源断高高习中中题资资电料料源试试,卷卷线试切缆验除敷报从设告而完与采毕相用,关高要技中进术资行资料检料试查,卷和并主检且要测了保处解护理现装。场置设。备高中资料试卷布置情况与有关高中资料试卷电气系统接线等情况,然后根据规范与规程规定,制定设备调试高中资料试卷方案。

下载(3)

下载(3)

浙江大学2004 —2005学年春夏学期期终考试《嵌入式系统》课程试卷考试时间:__120___分钟开课学院___计算机___ 任课教师____________ 姓名______________ 学号_____________班级_______________ 一.单项选择题(2 × 25):1 以下哪个不是嵌入式系统的设计的三个阶段之一:()A 分析B 设计C 实现D 测试2 以下哪个不是RISC架构的ARM微处理器的一般特点:()A 体积小、低功耗B 大量使用寄存器C采用可变长度的指令格式,灵活高效 D 寻址方式灵活简单3 Xscale中,DMA控制器具有多少个有优先级的通道,可为内部外设和外部芯片提供服务?:()A 15B 16C 17D 184 BOOTP主要是用于无磁盘的客户机从服务器得到:()A目标板的IP地址B服务器的IP地址C网关IP地址 D ABC5 通常所讲的交叉编译就是在X86架构的宿主机上生成适用于ARM架构的()格式的可执行代码。

A elfB exeC peD sh6 下面不属于Boot Loader 阶段1所完成的步骤的是:()A硬件设备初始化。

B拷贝Boot Loader的阶段2到RAM空间中。

C将kernel映像和根文件系统映像从Flash读到RAM空间中。

D设置堆栈。

7 以下哪个不是ARM的7种运行状态之一:()A快中断状态B挂起状态C中断状态D无定义状态8 在x86处理器上,Linux系统调用是通过自陷指令()实现的。

A INT 0x80B INT 0x40C INT 0x20D INT 0x109 用以下的哪个命令可以把server的/tmp mount 到client的/mnt/tmp 并且是read only()A mount -o ro server:/tmp /mnt/tmpB mount -o ro /mnt/tmp server:/tmpC mount -o ro client:/mnt/tmp server:/tmpD mount -o ro server:/tmp client:/mnt/tmp10 以下对GDB可以完成的任务描述正确的是:()A运行程序,可以给程序加上所需的调试任何条件B在给定的条件下让程序停止C检查程序停止时的运行状态D ABC中的任务都可以完成11 以下哪个不是GDB中断点的四种状态之一:()A有效B禁止C指定次数有效D有效后删除12 Linux操作系统支持多种设备,这些设备的驱动程序不包括以下的那一项特点()A设备驱动可以使用标准的内核服务如内存分配、中断和等待队列等。

浙大数据结构期末考试2005-2006

浙大数据结构期末考试2005-2006
浙江大学 2005–2006 学年秋季学期
《数据结构基础》课程期末考试试卷
开课学院: 计算机学院和软件学院
考试形式:闭卷
考试时间:2005 年 11 月 9 日 所需时间:120 分钟 任课教师________
考生姓名:
_____ 学号:
专业:
___
题序 一二三 Nhomakorabea四





十 总分
得分
评卷 人
(第三、第四、第五、第十题请做在后面的白纸上,其余做在试题上)
③ p->next->next=p->next
④ p=p->next->next
(6) If the input is a presorted integer sequence , which algorithm is the best to complete sorting.
① Mergesort ② Quicksort
if ( T == NULL ) Error(“Element not found”);
else if ( X < T->Element ) T-> Left = Delete( X, T->Left ); else if ( X > T->Element ) T->Right = Delete( X, T->Right ); else if ( T->Left && T->Right ) {
② n(n – 1)
③ n(n – 1)/2
④ 2n
(2) Given a queue that is implemented by a single linked list, which status is 1->2->3, after
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

浙江大学2005–2006学年秋季学期《操作系统分析及实验》课程期末考试试卷开课学院:计算机学院、软件学院,考试形式:有限开卷,只允许带3张A4纸入场考试时间:_____年____月____日, 所需时间:120分钟 教师姓名:_________考生姓名: ___ 学号: 专业: 得分:For every following question, please select your best answer only!!!1.UNIX is a __________ operating system.A.)time-sharingB.)batched-processingC.)uniprogrammingD.)real-time2.Which is the oldest among the following OSes?A.)AT&T UNIXB.)SolarisC.)LinuxD.)Windows NT3.Which of the following is able to write to standard output and files simultaneously?A.)teeB.)|C.)||D.)T4.How do you extract the kernel from the tarball linux-2.6.14.tar.bz2?A.)tar x linux-2.6.14.tar.bz2B.)untar linux-2.6.14.tar.bz2C.)tar tzvf linux-2.6.14.tar.bz2D.)tar xjf linux-2.6.14.tar.bz25.You want to install the RPM package file foobar.rpm. This file is located in/home/bob.Which command would you use to install this file?A.)install /home/bob/foobar.rpmB.)rpminst /home/bob/foobar.rpmC.)rpm -i /home/bob/foobar.rpmD.)instrpm /home/bob/foobar.rpm6.What does the device file /dev/hdb6 represent?A.) A logical partition on a SCSI disk driveB.)An extended partition on an IDE disk driveC.) A primary partition on an IDE disk driveD.) A logical partition on an IDE disk drive7.Which of the following commands results in mailing the content of thecurrent directory to Bob?A.)mail Bob < lsB.)ls > mail BobC.)ls || mail BobD.)ls | mail Bob8.How could you describe the following commandline? foo; bar; foobar ?A.)The commands foo, bar and foobar are processed at the same time.B.)The commands foo, bar and foobar are processed one after another.C.)The command foo is processed. If it results without error, then bar and foobar areprocessed.D.)The command foo is processed. If it results without error, then bar will be processed. Ifbar results without error, foobar will be processed.9.How could you watch the contents of a logfile, even if the logfile is growing while you'rewatching?A.)tail -f logfileB.)less -f logfileC.)more -f logfileD.)watch logfile10.Which command is able to create directory structure with cycles?A.)mkdir -pB.)md -SC.)ln -sD.)ln -c11.What is the result of the following command? cd ~fooA.)The current directory is changed to ~fooB.)The current directory is changed to the home directory of the user fooC.)The current directory is changed to the nearest directory with a name ending with fooD.)This isn't a valid command12.Which command is to enable owner read and write rights, group users read writes, other usersno rights?A.)chmod u+rwB.)chmod 640C.)chmod 460D.)chmod u+rwg+rw13.How could you get a list of all running processes?A.)psB.)ps axC.)getprocessD.)down14.Which of the following commands would create a hardlink named bar using thesame inode as foo?A.)ln foo barB.)cp -l foo barC.)cp -d foo barD.)ls -l foo bar15.How could you display all lines of text from the file foo which are notempty?A.)grep -v ^$ fooB.)grep -v ^\r\n fooC.)grep -v \r\n fooD.)grep -v "[]" foo16.How many primary partitions could you create with Linux on one single harddisk?A.)1B.)2C.)3D.)417.In the bash shell, entering the !! command has the same effect as which one of the following?A.)Ctrl-P and EnterB.)Ctrl-U and EnterC.)!-2D.)!218.How could you monitor the amount of free inodes on /dev/hda3?A.)inode --free /dev/hda3B.)ls -i /dev/hda3C.)dm -i /dev/hda3D.)df -i /dev/hda319.How can you describe the function of the following commands: foo | tee bar | foobar?A.)The command foo redirects its output to the command tee. After that the command barredirects its output to the command foobarB.)The command foo writes its output to the file tee; the command bar writes its output tothe file foobarC.)The command foo redirects its output to the command tee which writes it into the filebar and sends the same further to the command foobarD.)The command foobar gets its input from the command bar which gets its input from thecommand foo20.After new Linux kernel image is built, which file need to modified in order to use the newkernel?A.)boot.confB.)grub.confC.)linux.confD.)none of the above21.Which option of command gcc enables symbolic debugging?A.)-gB.)-dC.)-debugD.)None of the above.22.How could you change the group membership of the file foobar to group foo?A.)chown foo foobarB.)chgrp foo foobarC.)chgroup foo foobarD.)chperm --group foo --file foobar23.What statement about the du-command is true?A.)Dump User - backups all files owned by the named user.B.)Dos Utility - provides different features to handle DOS-filesystems.C.)Dir User - shows the directorys owned by the named user.D.)Disk Usage - shows the amount of diskspace used by the named directories.24. How could you start the command foo in the background?A.)bg fooB.)background fooC.)foo --backgroundD.)foo &25.UNIX treats I/O devices as special files, which are stored under the directory __________.A.)/usr/includeB.)/binC.)/usr/libD.)/dev26.Which UNIX command can view a text file page by page?A.)typeB.)catC.)dirD.)less27.You've bought a new harddisk and installed it in your Linux box as master on the secondIDE-channel. After partitioning it into two primary partitions and creating filesystems on both partitions, you want to ensure, that both new partitions will be mounted automatically on boot up. What is to do?A.)Add an entry for /dev/hdc1 and /dev/hdc2 to /etc/mtabB.)Add an entry for /dev/hdc to /etc/mtabC.)Add an entry for /dev/hdc1 and /dev/hdc2 to /etc/fstabD.)Add an entry for /dev/hdc to /etc/fstab28.Which key combination represents EOF?A.)Ctrl-ZB.)Ctrl-DC.)Ctrl-FD.)Ctrl-E29.The LINUX operating system stores some special characters at the beginning of every file.What is the purpose of these special characters?A.)The size of fileB.)To count the number of files on the systemC.)To roughly indicate the type of fileD.)File protection30.How could you describe the following commandline? foo || barA.)The command foo redirect its output to the command bar.B.)The command foo writes its output into the file bar.C.)The command bar is only processed if the command foo leaves without error.D.)The command bar is only processed if the command foo leaves with an error.31.Before you compile your kernel, you need to configure it. Which of the following is NOT acorrect way to configure?A.)make configB.)make xconfigC.)make menuconfigD.)make mconfig32.After typing make bzImage, the compilation will complete server minutes later and you'll findthe bzImage file in which directory?A.)arch/i386/imageB.)arch/i386/bootC.)arch/i386D.)arch33.How do you get the online manual for administrative (not user) commands?A.)# man 1 admin-cmdB.)# man 2 admin-cmdC.)# man 5 admin-cmdD.)# man 8 admin-cmd34.How do you get the online manual for configuration formats?A.)# man 1 some-confB.)# man 2 some-confC.)# man 5 some-confD.)# man 8 some-conf35.What command can display the contents of a binary file in a readable hexadecimal form?A.)xdB.)hdC.)odD.)Xd36.Linux dynamic link libraries end with __________.A.).aB.).soC.).dllD.).exe37.Which one of the following key sequences is used to put a process into the background toallow it to continue processing?A.)Ctrl-BB.)Ctrl-B and then enter the bg commandC.)Ctrl-ZD.)Ctrl-Z and then enter the bg command38.Which one of the following statements correctly describes the > and >> symbols in thecontext of the bash shell?A.)> appends standard output to an existing file, and >> writes standard output to a newfile.B.)> writes standard output to a new file, and >> appends standard output to an existingfile.C.)> writes standard error to a new file, and >> appends standard error to an existing file.D.)> pipes standard output to a new file, and >> pipes standard output to an existing file.39.What is the first step in compiling software obtained in a compressed tar archive myapp.tgz?A.)make install=myapp.tgzB.)make myappC.)tar xzf myapp.tgzD.)tar cvf myapp.tgz40.What does the "sticky bit" do?A.)It prevents files from being deleted by anyone.B.)It marks files for deletion.C.)It prevents files from being deleted by nonowners except root.D.)It prev ents files from being deleted by nonowners including root.41.What does the pr command do?A.)It prints files to the default printer.B.)It displays a list of active processes.C.)It modifies the execution priority of a process.D.)It paginates text files.42.The shell is simply __________.A.) a command-line interpreterB.) a privileged programC.) a GUI interfaceD.) a set of commands.43.Which one of the following commands would be best suited to mount a CD-ROMcontaining a Linux distribution, without depending on any configuration files?A.)mount -f linux /dev/hdc /mnt/cdromB.)mount -t iso9660 /dev/cdrom /mnt/cdromC.)mount -t linux /dev/cdrom /mnt/cdromD.) e. mount -t iso9660 /mnt/cdrom /dev/cdrom44.System administration tasks must generally be performed by which username?A.)amdinB.)rootC.)superuserD.)sysadmin45.How can you get a list of all loaded kernel modules?A.)lsmodB.)listmodC.)modlsD.)modinfo46.In Unix, one process is allowed to terminate another:A.)Under all conditionsB.)Only if both processes have the same parentC.)If both of the processes are running under the same useridD.)If both processes are running the same program47.What must be the first character on every command line in a Makefile?A.)spaceB.)pound (#)C.)tabD.)dollar sign ($)48.What is the default filename of an executable file produced by gcc?A.) a.outB.)programC.)run.batD.) a.exe49.The pipe is an example of what inter-process communication paradigm?A.)message passingB.)file sharingC.)shared memoryD.)smoke signalser A has a file xxx and allows user B to make a symbolic link to this file. Now user Adeletes the file from his directory. Which of the following options best describes what happens next?A.)The file gets deleted and B ends up with a invalid linkB.)The file remains in A’s disk quota as long as B doesn’t delete the linkC.)The file ownership is transferred and is moved into B’s disk quotaD.) A will not be able to delete the file.51.Which UNIX system call is used to send a signal to a process?A.)killB.)signalC.)ioctlD.)write52.What is the term for a small integer that is used to specify an open file in a UNIX program?A.)file descriptorB.)file pointerC.)file labelD.)file number53.Which of the following is not a file stream opened automatically in a UNIX program?A.)standard inputB.)standard terminalC.)standard errorD.)standard output54.Which system call can ask for more memory?A.)mallocB.)callocC.)brkD.)request55.Which of these is not a possible return value for the system call: write(fd, buffer, 256)?A.)256B.)-1C.)250D.)26056.The dup () system call in LINUX comes under __________.A.)process system callsB.)file system callsC.)communicationsD.)memory management57.Which of these process properties is not retained when you make an exec system call during arunning process?A.)process IDB.)variable valuesC.)open file descriptorsD.)parent’s process ID58.Which system call creates a new file?A.)creatB.)fileC.)linkD.)create59.Which system call creates a new process?A.)readB.)forkC.)createD.)exec60.The input parameter(s) passed INTO the pipe system call is/are:A.)The PID of the process to which to connect the pipe.B.) A integer value representing the pipe handle and another integer value representing thecapacity of the pipe.C.) A pointer to an array of two integers.D.)None of the above--pipe like fork has no parameters.61.Which system call creates a new name for a file?A.)creatB.)fileC.)linkD.)create62.What is the -c option used for in gcc?A.)compiling multiple files into a single executable fileB.)creating an object file from a source fileC.)specifying the directory where code residesD.)specifying that the language used is C63.Which of the following performs the system call open?A.)system_openB.)sys_openC.)open_sysD.)open_system64.Which of the following fields of struct task_struct contains the scheduling priority?A.)int processor;B.)int leader;C.)unsigned long personality;D.)long counter;65.Which of the following fields of struct task_struct contains the hardware context?A.)struct task_struct *pidhash_next;B.)struct task_struct **pidhash_pprev;C.)struct thread_struct thread;D.)struct namespace *namespace;66.Which of the following fields of struct task_struct contains the open-file table information?A.)struct list_head local_pages;B.)struct fs_struct *fs;C.)struct files_struct *files;D.)struct namespace *namespace;67.Which of the following structures describes a memory node (A Non-Uniform MemoryAccess (NUMA) consists of many banks of memory (nodes))?A.)struct pglist_data;B.)struct node_data;C.)struct zone;D.)struct zonelist;68.Which of the following structures describes the partition control block?A.)struct partition;B.)struct super_block;C.)struct boot_block;D.)struct inode;69.Which of the following structures can be called as the FCB (File Control Block)?A.)struct inode;B.)struct pcb;C.)struct file;D.)struct dentry;70.Which of the following structures describes one directory entry?A.)struct inode;B.)struct dentry;C.)struct file;D.)struct dir_entry;71.Which register contains the page directory point (for virtual memory)?A.)CR1B.)CR2C.)CR3D.)CR472.Which of the following fields of struct inode describes the number of different names for onesame file?A.)unsigned int i_count;B.)nlink_t i_nlink;C.)unsigned long i_no;D.)off_t i_size;73.Which of the following fields of struct inode describes the number of different processes usingone same file?A.)unsigned int i_count;B.)nlink_t i_nlink;C.)unsigned long i_no;D.)off_t i_size;74.Which kind of structure does the current macro refer to?A.)struct task_structB.)struct mm_structC.)struct inodeD.)struct file75.Which of the following scheduling policy is NOT used in the default Linux kernel?A.)SCHED_OTHERB.)SCHED_FIFOC.)SCHED_RRD.)SCHED_FEEDBACK76.Which of the following items of a hard disk partition is not cached in the Linux kernel?A.)boot blockB.)super blockC.)inodesD.)directories77.Which of the following functions can allocate virtual memory inside the kernel?A.)alloc_pageB.)kmallocC.)vmallocD.)malloc78.Which of the following is most appropriate?A.)sys_clone is implemented by sys_forkB.)sys_fork is implemented by sys_vforkC.)sys_vfork is implemented by sys_cloneD.)sys_fork is implemented by do_fork79.Which of the following should contain void (*read_inode)(struct inode*) ?A.)struct super_operationsB.)struct inode_operationsC.)struct file_operationsD.)struct dentry_operations80.When one task_struct’s state field is equal to TASK_UNINTERRUPTIBLE, it means that__________.A.)this task cannot be waken upB.)this task can be waken up by any signalC.)this task can be waken up only if an interrupt occurs and changes something in themachine state so that the task can run again.D.)this task can be waken up interrupt81.Which of the following structures should contain loff_t (*llseek)(struct file*, loff_t, int) ?A.)struct super_operationsB.)struct inode_operationsC.)struct file_operationsD.)struct dentry_operations82.Which of the following structures should contain int (*link)(struct dentry*, struct inode*,struct dentry*) ?A.)struct super_operationsB.)struct inode_operationsC.)struct file_operationsD.)struct dentry_operations83.Which of the following is the most appropriate flow for handling system call?A.)system_call → sys_fork → do_forkB.)sys_fork → system_call → do_forkC.)sys_fork → do_fork → system_callD.)do_fork →sys_fork → system_call84.Which of the following is the most appropriate for the kernel stack handling system call?A.)Every process has its own kernel space stack different from its user-space stack.B.)Every process has its own kernel space stack which is the same as its user-space stack.C.)Every process shares one common kernel space stack.D.)None of the above.85.Which of the following is correct?A.)Linux 2.4 kernel can be used for real-time applications.B.)Linux 2.4 kernel is preemptible.C.)Linux 2.6 kernel is preemptible.D.)None of the above.86.Which of the following is NOT used for describe page tables?A.)pgd_tB.)pmd_tC.)ptd_tD.)pte_t87.Which control register contains the address causing page fault?A.)CR1B.)CR2C.)CR3D.)CR488.As for kernel synchronization mechanisms,which of the following statements is mostappropriate?A.)rwlock_tB.)spinlock_tC.)semaphoreD.)All of the above89.Which is the first filesystem mounted by the kernel?A.)rootfsB.)ext2C.)ext3D.)vfat90.Which is the right flow for schedule() inside the kernel?A.)goodness → prepare_switch → switch_toB.)prepare_switch → switch_to → goodnessC.)switch_to → prepare_switch → goodnessD.)goodness → switch_to → prepare_switch91.As for the interaction between a processes and its open file, which of the following is mostappropriate?A.) A process will use the FS, beginning with struct file.B.) A process will use the FS, beginning with struct inode.C.) A process will use the FS, beginning with struct dentry.D.) A process will use the FS, beginning with struct super_block.92.Which of the following functions uses the slab allocator algorithm?A.)alloc_pageB.)kmallocC.)vmallocD.)malloc93.Which of the following file-system types contains the info about the running kernel?A.)devptfsB.)tmpfsC.)procD.)ext394.Which of the following is the system call implementation?A.)sys_creatB.)sys_requestC.)sys_createD.)sys_new95.Which of the following fields of struct ext2_inode points to the actual file content (notmetadata)?A.)__u32 i_blocks;B.)__16 i_links_count;C.)__u32 i_block[EXT2_N_BLOCKS];D.)__u32 i_faddr;96.Which of the following is correct about one module object modulename.o?A.)It has to become the executable file modulename in order to use.B.)It has to be used via insmod commandC.)It has to statically linked with a kernel in order to use.D.)None of the above.97.Which of the following is the right invocation flow?A.)alloc_pages → _alloc_pages → __ alloc_pagesB.)__alloc_pages → _alloc_pages → alloc_pagesC.)__alloc_pages → alloc_pages → _alloc_pagesD.)alloc_pages → __alloc_pages → _ alloc_pages98.Which of the following is correct for IPC (Inter-Process Communication)?A.)semaphoreB.)shared memoryC.)message passingD.)All the above99.Which of the linkages should be used with sys_open?A.) C linkageB.)C++ linkageC.)asm linkageD.)none of the above.100.Which of the following is correct?A.)Linux kernel uses the BIOS all the time.B.)Linux kernel uses the BIOS only during the booting.C.)Linux kernel uses the BIOS after the booting.D.)Linux kernel doesn’t use the BIOS at all.。

相关文档
最新文档