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

  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.。

相关文档
最新文档