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

合集下载

浙大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、学生对开放教育学习形式已经适应。

04大学计算机基础课程试卷

04大学计算机基础课程试卷

浙江大学2004-2005学年第一学期期末考试<<大学计算机基础>>课程试卷A一.单选题(每一小题1分,共20分)1.从功能上看,计算机数据处理的结果除了取决于输入的数据,还取决于: B A.处理器B.程序 C.存储器 D.外设2.计算机的特点可以简单地归纳为精确高速的运算、准确的逻辑判断、强大的存储、自动处理以及:AA.网络与通信的能力B.多媒体的能力C.应用设计的能力D.辅助学习的能力3.计算机知识是指:DA.能够认识计算机带来的积极和消极影响B.理解计算机基本知识的能力C.能够将它作为工具完成适当的任务D.以上都是4.哪种发明使研制者成功地设计出现代广泛使用的微型计算机:BA.电子管B.集成电路(IC)C.半导体晶体管 D.磁带和磁盘5.硬件和软件是组成计算机的两个部分,而指令系统是连接这两个部分的。

指令由CPU执行。

下列叙述哪一个是不正确的:AA.指令是用户通过键盘(或者其他输入设备)输入后并被CPU直接执行的。

B.指令是计算机能够直接识别的二进制代码,任何一种高级语言编写的程序都需要翻译为指令代码才能够被CPU执行。

C.所有指令的集合就是指令系统。

D.汇编语言的语句和指令系统具有一一对应的关系。

6.在计算机中使用的数制是 DA.十进制 B.八进制C.十六进制D.二进制7.??为了适应不同的运算需要....,在计算机中使用不同的编码方式,主要是: A A.原码、反码和补码B.原码、补码和ASCII码C.原码、反码和Uincode码D.二进制、ASCII和Unicode码8.现代计算机中的CPU为中央处理器,它包含了: BA.存储器和控制器B.运算器和控制器C.存储器和运算器D.存储器、运算器和控制器9.计算机中使用半导体存储器作为主存储器,它的特点是: DA.速度快,体积小,在计算机中和CPU一起被安装在主板上B.程序在主存中运行,它和外部存储器交换数据C.相对于外部磁盘或者光盘存储器,其容量小,价格贵D.以上都是10.计算机有很多类型的外部设备,它们以哪种方式和主机实现连接:CA.插件方式和固定方式B.并行方式和固定方式C.并行方式和串行方式D.无线方式和固定方式11.??计算机软件有一个重要的特点,也是软件知识产权保护的核心:CA.可以被授权复制B.可以被有条件复制C.可以无限制地复制 D.不能复制12.计算机系统软件包括以下几个部分: CA.操作系统、语言处理系统和数据库软件B.操作系统、网络软件和数据库系统C.操作系统、语言处理系统、系统服务程序D.语言处理系统、系统服务程序、网络软件13.一般情况下,特定格式的数据被计算机处理:AA.需要专门的处理程序B.需要使用Windows程序C.大多数系统软件都可以处理D.只要符合标准,不需要专门程序14.计算机用户在使用计算机文件时: D (P160最后一行)A.按照文件的所有权使用文件B.按文件性质寻找存放的位置并使用C.按照存放文件的存储器类型使用D.一般是按照文件名进行存取的15.在计算机科学中,算法这个术语是指: DA.求解问题的数学方法B.求解问题并选择编程工具C.选择求解问题的计算机系统D.求解计算机问题的一系列步骤16.软件文档(Document)也可以叫做“文件”,它和下列哪一个共同构成计算机软件:C A.计算机数据B.计算机编程语言C.计算机程序D.计算机系统17.在计算机通信系统中,数据同时进行发送和接受的传输模式叫做: CA.异步通信B.同步通信(易错项)C.全双工D.半双工18.为了在联网的计算机之间进行数据通信,需要制订有关同步方式、数据格式、编码以及内容的约定,这些被称为:DA.OSI参考模型B.网络操作系统C.网络通信软件D.网络通信协议19.URL(统一资源定位器)的作用是: BA.定位在网络中的计算机的地址B.定位网络中的网页的地址C.定位IP地址并实现域名的转换D.定位收发电子邮件的地址20.计算机病毒是一种特殊的计算机程序,它除了具有破坏性外,还具有:D A.传染性B.潜伏性C.自我复制D.以上都是二.多选题(在每小题后的数字表示应选择的项数,例如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 学年第一学期期末考试

浙江大学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

大学化学实验(G)理论考试试题及答案

大学化学实验(G)理论考试试题及答案

浙江大学2006–2007学年第一学期期末考试《大学化学基础实验(G)》理论课程试卷开课学院:理学院化学系任课教师:姓名:专业:学号:考试时间: 60 分钟一、选择题(共50分)(1—20题为单选题,每题2分)1.若要使吸光度降低为原来的一半,最方便的做法是()A。

将待测液稀释一倍 B. 选用新的测定波长C. 选用原厚度1/2的比色皿D. 更换显色剂2.用基准物质Na2C2O4标定KMnO4时,下列哪种操作时错误的?( )A.锥形瓶用Na2C2O4 溶液润洗;B。

滴定管用KMnO4标液润洗C。

KMnO4标液盛放在棕色瓶中;D. KMnO4标准溶液放置一周后标定3.实验室中常用的干燥剂变色硅胶失效后呈何种颜色?()A. 蓝色B. 黄色C。

红色D。

绿色4.可用哪种方法减少分析测试中的偶然误差?( )A。

对照试验 B. 空白试验C。

增加平行测试次数D。

仪器矫正5.用基准硼砂标定HCl时,操作步骤要求加水50mL,但实际上多加了20mL,这将对HCl浓度的标定产生什么影响?()A。

偏高B。

偏低 C. 无影响 D. 无法确定6.(1+ 1)HCl溶液的物质的量浓度为多少?( )A。

2mol/L B. 4mol/L C. 6mol/L D。

8mol/L7.常量滴定管可估计到±0.01mL,若要求滴定的相对误差小于0。

1%,在滴定时,耗用体积一般控制在: ()A。

10~20mL B。

20~30mL C。

30~40mL D。

40~50mL 8.定量分析中,基准物质是()A。

纯物质B。

标准参考物质C。

组成恒定的物质D。

组成一定、纯度高、性质稳定且摩尔质量较大的物质9.测定复方氢氧化铝药片中Al3+、Mg2+混合液时,EDTA滴定Al3+含量时,为了消除Mg2+干扰,最简便的方法是:( )A. 沉淀分离法B。

控制酸度法 C. 配位掩蔽法D。

溶剂萃取法10.滴定操作中,对实验结果无影响的是: ( )A。

滴定管用纯净水洗净后装入标准液滴定; B. 滴定中活塞漏水;C。

2005-05B系统分析师真题试卷

2005-05B系统分析师真题试卷

全国计算机技术与软件专业技术资格(水平)考试 2005年上半年 系统分析师 下午试卷I(考试时间 13:30~15:00 共90分钟)请按下表选答试题试题号 一 二~五选择方法 必答题 选答2题请按下述要求正确填写答题纸1. 本试卷满分75分,每题25分。

2. 在答题纸的指定位置填写你所在的省、自治区、直辖市、计划单列市的名称。

3. 在答题纸的指定位置填写准考证号、出生年月日和姓名。

4. 在试题号栏内注明你选答的试题号。

5. 答题纸上除填写上述内容外只能写解答。

6. 解答时字迹务必清楚,字迹不清时,将不评分。

试题一(25分)阅读以下关于系统结构的叙述,回答问题1、问题2、问题3和问题4。

A企业目前使用的是基于C/S结构的OA(办公自动化)系统,某软件开发公司为该企业设计了一个基于B/S结构的新OA系统。

1.系统目前的运行情况(1)公司大约有500名雇员,每名雇员配备有一套PC机,每个部门有独立子网;(2)员工所用PC机的IP地址由其所在部门指派,由公司信息部负责IP地址的管理工作;(3)目前的OA系统大约由16个子系统组成,包括公文管理子系统、公共信息管理子系统、个人信息管理子系统、邮件管理子系统、任务管理子系统、差旅审批子系统、采购子系统等;(4)应用软件存储在服务器和客户机上。

数据库的检索和更新功能主要在服务器上,而数据的输入和结果的显示功能则主要在客户机上。

软件的配置、维护和升级由信息部负责处理。

2.计划实现的新系统(1)新OA系统的体系结构如图1-1所示,包括安装了浏览器的客户机(PC)、Web服务器、以及一个数据库服务器;(2)用CGI连接数据库服务器和Web服务器;(3)用户使用新的OA系统时,首先通过登录窗口输入一个职工号码和口令;(4)cookie是Web服务器指示客户浏览器存储指定变量名和值的方法。

在启动多个CGI程序的情况下,应用cookie可以避免通过登录窗口重复输入职工号码和口令。

浙大操作系统试题-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;

河海大学2005-2006学年第一学期操作系统期末试卷

河海大学2005-2006学年第一学期操作系统期末试卷

2005-2006学年第一学期操作系统期末试卷(计算机科学与技术专业2003级)班级学号姓名成绩I. 填空.(30分,每空1分)1. 在系统中,没有程序运行时,CPU做什么?忙等(从中选择一个答案:暂停、忙等、等待中断、休眠)。

2. 引入多道程序技术带来的主要好处是提高了CPU利用率;但如果多道程序数目太多,则会造成一种称为抖动现象的问题。

3. 导致进程状态从运行→就绪转换的原因是超时,进程的时间片到期。

4. 进程调度算法(FCFS,SPN,SRT,RR, FB)中对各种类型的进程(如CPU 密集型或I/O密集型进程)都能平等对待的是RR时间片轮转和FB 多级反馈队列。

5. (用十进制表示)考虑以下段表:段号段基址段长0 330 1241 876 2112 111 993 498 302请给出以下逻辑地址对应的物理地址,如果地址变换产生了缺段,请指明:a. 0, 99 429 330+99b. 2, 78 189 111+78c. 1, 265 缺段211<2656. 在一个物理空间为232字节的纯分页系统中,如果虚拟地址空间大小为212页,页的大小为512字节,那么:a. 一个虚拟地址有多少位?21b. 一个页框有多少字节?512c. 在一个物理地址中用多少位来指明对应的页框?23d. 页表的长度为多少(即页表中表项数目为多少)?212 (4096)7. 目前常用的文件目录结构是树型(多级)目录结构。

8. 适合磁盘的外存分配模式是:连续、链接、索引。

9. 进程迁移是指将一个进程的状态,从一台机器转移到另一台机器上,从而使该进程能在目标机上执行.10. 分布式系统中的关键机制是进程间通信。

中间件提供了标准的编程接口和协议,掩藏了不同网络协议和操作系统之间的复杂细节和差异,其实现基于消息传递和远程过程调用两种机制。

11. 操作系统安全里说的身份鉴别机制的作用是识别请求存取的用户,并判断它的合法性。

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。

2005级操作系统期末试卷B卷及答案

2005级操作系统期末试卷B卷及答案

2005级操作系统期末试卷B卷及答案漳州师范学院_计算机科学与工程_系_计算机科学与技术_专业_05_级《计算机操作系统》课程期末考试卷(B )(2007—2008学年度第一学期)班级_________学号____________姓名__________考试时间:一、单项选择题(每小题1分,共 20分)1.( B )不是设计实时操作系统主要的追求目标。

A. 安全可靠B.资源利用率C.及时响应D.快速处理2.三种主要类型的操作系统(批处理,分时,实时)中都必须配置的调度有( C )A.作业调度B.中级调度C.低级调度D.高级调度 3.操作系统中引入进程概念后并不能够( B )。

A.允许一个程序被多个用户调用 B.提高用户的编程能力C.使处理器与外设之间有效地并行工作D. 提高资源利用率4.下列情况下,在( A )时,进程从阻塞状态转换到就绪状态。

A.等待的某事件已经发生 B.时间片用完了C.分配到必要的资源并获得了处理机D.等待某事件5.资源的按序分配策略是以破坏( D )条件来预防死锁的。

A.互斥 B.请求和保持 C. 不可剥夺 D.环路等待 6.某系统中有11台打印机,N 个进程共享打印机资源,每个进程要求3台。

当N的取值不超过( B )时,系统不会发生死锁。

A.4B.5C.6D.7 7.用户在程序中试图读某文件的第100个逻辑块,使用操作系统提供的( A )接口。

A.系统调用B.图形用户接口C.键盘命令D.原语8.动态重定位是在作业的( D )中进行的。

A. 编译过程B.装入过程C.连接过程D.执行过程9.多进程能在主存中彼此互不干扰的环境下运行,操作系统是通过( A )来实现的。

A. 内存保护B.内存分配C.内存扩充D.地址映射10.在请求分页存储管理系统中,凡未装入过的页都应从( B )调入主存。

A. 系统区B.文件区C. 对换区D.页面缓冲区11.文件系统采用多级目录结构的目的是( C )A.减少系统开销B.节省存储空间C.解决命名冲突D.减短传送时间12.UNIX系统对空闲磁盘空间的管理,采用的是( C )。

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、下列说法正确的有()。

操作系统期末试卷及答案

操作系统期末试卷及答案

南昌大学2006~2007学年第二学期期末考试试卷2006~2007学年第二学期期末考试A卷参考答案及评分标准一、填空题(每空1 分,共20 分)1、处理机管理、存储器管理、设备管理、文件管理2、相关的数据段、PCB(或进程控制块)3、实时系统、分时系统4、竞争资源、进程间推进次序非法5、 46、输入井、输出井7、多次性、对换性8、用户文件、库文件9、连续分配、链接分配、索引分配二、单项选择题(每题1 分,共20 分)(1)4 (2)3 (3)2 (4)1 (5)1(6)1 (7)2 (8)3 (9)2 (10)3(11)3 (12)2 (13)1 (14)3 (15)2(16)3 (17)3 (18)4 (19)3 (20)3三、简答题(每题10 分,共30 分)1、状态转换图如下:(2分)I/O请求就绪到执行:处于就绪状态的进程,在调度程序为之分配了处理器之后,该进程就进入执行状态。

(2分)执行到就绪:正在执行的进程,如果分配给它的时间片用完,则暂停执行,该进程就由执行状态转变为就绪状态。

(2分)执行到阻塞:如果正在执行的进程因为发生某事件(例如:请求I/O,申请缓冲空间等)而使进程的执行受阻,则该进程将停止执行,由执行状态转变为阻塞状态。

(2分)阻塞到就绪:处于阻塞状态的进程,如果引起其阻塞的事件发生了,则该进程将解除阻塞状态而进入就绪状态。

(2分)2、Vara,b,c,d,e,f:semaphore:=0,0,0,0,0,0;BeginParbeginBegin wait(a);S2;signal(d);end; 2分Begin wait(c);S3;signal(e);end; 2分Begin wait(d);S4;signal(f);end; 2分Begin wait(b);wait(e);wait(f);S5;end; 2分parendend四、应用题(每题15 分,共30 分)1、(1)T0时刻为安全状态。

2006年系统分析师考试上午试卷

2006年系统分析师考试上午试卷

全国计算机技术与软件专业技术资格全国计算机技术与软件专业技术资格((水平水平))考试2006年下半年 系统分析师 上午试卷(考试时间 9 : 00~11 : 30 共150分钟)请按下述要求正确填写答题卡1. 在答题卡的指定位置上正确写入你的姓名和准考证号,并用正规 2B 铅笔在你写入的准考证号下填涂准考证号。

2. 本试卷的试题中共有75个空格,需要全部解答,每个空格 1分,满分75分。

3. 每个空格对应一个序号,有A 、B 、C 、D 四个选项,请选择一个最恰当的选项作为解答,在答题卡相应序号下填涂该选项。

4. 解答前务必阅读例题和答题卡上的例题填涂样式及填涂注意事项。

解答时用正规 2B 铅笔正确填涂选项,如需修改,请用橡皮擦干净,否则会导致不能正确评分。

例题● 2006年下半年全国计算机技术与软件专业技术资格(水平)考试日期是(88) 月 (89) 日。

(88)A. 9 B. 10 C. 11 D. 12 (89)A. 4B. 5C. 6D. 7因为考试日期是“11月4日”,故(88)选C ,(89)选A ,应在答题卡序号 88 下对 C 填涂,在序号 89 下对 A 填涂(参看答题卡)。

● 根据如下所示的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. 构件● 回调(Callback)函数是面向过程的程序设计语言中常用的一种机制,而设计模式中的 (4) 模式就是回调机制的一个面向对象的替代品。

浙大远程操作系统原理模拟卷及答案

浙大远程操作系统原理模拟卷及答案

《操作系统原理》模拟卷一、单项选择题1.操作系统是一种系统软件,它 A 。

A. 控制程序的执行B. 管理计算机系统的资源C. 方便用户使用计算机D. 管理CPU2.分时系统中,当用户数目为100时,为保证响应不超过2秒;此时的时间片最大应为 A 。

A. 10毫秒B. 20毫秒C. 50毫秒D. 200毫秒3.下列选择中, A 不是操作系统关心的主要问题,A. 管理计算机裸机B. 设计、提供用户程序与计算机硬件系统的界面C. 管理计算机系统资源D. 高级程序设计语言的编译器4.在设计实时操作系统时,首先要考虑的是 A 。

A. 灵活性和可适应性B. 交互性和响应时间C. 周转时间和系统吞吐量D. 实时性和可靠性5.如果分时操作系统的时间片一定,那么 B ,则响应时间越长。

A.用户数越少 B.用户数越多 C.内存越少 D.内存越多6. A 不是一个操作系统环境。

A.Intel B.Windows vista C.LINUX D.Solaris7.对于记录型信号量,在执行一次P操作(或wait操作)时,信号量的值应当为减1;当其值为 A 时,进程应阻塞。

A. 大于0B. 小于0C. 大于等于0D. 小于等于08.一个进程释放一种资源将有可能导致一个或几个进程 D 。

A. 由就绪变运行B. 由运行变就绪C. 由阻塞变运行D. 由阻塞变就绪9.在一单个处理机系统中,若有5个用户进程,假设当前时刻处于用户态(user mode),处于就绪态的用户进程最多有 D 个。

A. 1B. 2C. 3D. 410.下列几种关于进程的叙述, A 最不符合操作系统对进程的理解。

A. 进程是在多程序环境中的完整的程序B. 进程可以由程序、数据和进程控制块描述C. 线程(Thread)是一种特殊的进程D. 进程是程序在一个数据集合上的运行过程,它是系统进行资源分配和调度的一个独立单元11.通常用户进程被建立后, B 。

A.便一直存在于系统中,直到被操作人员撤消 B.随着进程运行的正常或不正常结束而撤消C.随着时间片轮转而撤消与建立 D.随着进程的阻塞或唤醒而撤消与建立12.在所学的调度算法中,能对紧急作业进行及时处理的调度算法是 A 。

  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 filessimultaneously?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 the current 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 andfoobar are processed.D.)The command foo is processed. If it results without error, then bar willbe processed. If bar results without error, foobar will be processed.9.How could you watch the contents of a logfile, even if the logfile is growingwhile you're watching?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 endingwith fooD.)This isn't a valid command12.Which command is to enable owner read and write rights, group users read writes,other users no 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 the same 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 not empty?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 ofthe 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 thecommand bar redirects its output to the command foobarB.)The command foo writes its output to the file tee; the command bar writesits output to the file foobarC.)The command foo redirects its output to the command tee which writes it intothe file bar and sends the same further to the command foobarD.)The command foobar gets its input from the command bar which gets its inputfrom the command foo20.After new Linux kernel image is built, which file need to modified in order touse the new kernel?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 onthe second IDE-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 ofevery 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 followingis NOT a correct way to configure?A.)make configB.)make xconfigC.)make menuconfigD.)make mconfig32.After typing make bzImage, the compilation will complete server minutes laterand you'll find the 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 hexadecimalform?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 thebackground to allow 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 >> symbolsin the context of the bash shell?A.)> appends standard output to an existing file, and >> writes standard outputto a new file.B.)> writes standard output to a new file, and >> appends standard output toan existing file.C.)> writes standard error to a new file, and >> appends standard error to anexisting file.D.)> pipes standard output to a new file, and >> pipes standard output to anexisting file.39.What is the first step in compiling software obtained in a compressed tar archivemyapp.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 A deletes 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 ina UNIX program?A.)file descriptorB.)file pointerC.)file labelD.)file number53.Which of the following is not a file stream opened automatically in a UNIXprogram?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 systemcall during a running 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 valuerepresenting the capacity 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 schedulingpriority?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 hardwarecontext?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 tableinformation?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 differentnames for one same 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 differentprocesses using one 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 Linuxkernel?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 meansthat __________.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 somethingin the machine 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 handlingsystem call?A.)Every process has its own kernel space stack different from its user-spacestack.B.)Every process has its own kernel space stack which is the same as itsuser-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 ismost appropriate?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 thefollowing is most appropriate?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 runningkernel?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 filecontent (not metadata)?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.。

相关文档
最新文档