浙江大学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春计算机(本科)《计算机操作系统》试卷及成绩分析《计算机操作系统》是开放教育本科计算机专业的必修课程,通过学习使学员掌握计算机操作系统的设计基本原理及组成;计算机操作系统的基本概念和相关的新概念、名词及术语;了解计算机操作系统的发展特点和设计技巧和方法;对常用计算机操作系统(Dos、Windows和Unix或Linux)会进行基本的操作使用。
考试是对平时教与学各环节的集中检测,并对教学活动起着一定的推动、导向的作用。
下面对试题和学生答卷情况做简要分析。
一、试卷情况1、试题类型分为选择题、是非题、填空题和应用题。
●单选题或多选题:给出一些有关计算机操作系统特点,要求学员从题后给出的供选择的答案中选择合适的答案,补足这些叙述。
这类题目主要考察学员对各种计算机操作系统和算法设计方法相关知识的掌握程度。
●是非题:这类题目主要考察学员对计算机操作系统概念、名词术语的正确理解情况。
●填空题:这类题目主要考察学员对计算机操作系统五大功能算法的理解能力。
●应用题:这类题目包含计算题,主要考察学员理解计算机操作系统解决问题的设计思路能力。
2、考核形式采用平时成绩与期末考试相结合的方式。
平时考核:视平时作业和课程实验的完成情况给分,占考核总成绩的20%,未完成者不能参加期末考试;期末考试:采用闭卷笔试,它占总成绩的80%,答题时限90分钟。
以上两部分成绩累计60分及以上则考核通过。
2、试卷内容的特点:试题基本上是按照中央电大下发的《考试说明》来出题的,重点突出,覆盖面广。
试题基本上分散在课程大作业及最近四个学期的考试试卷中。
偏题不多,较之去年试题难度有所降低。
通过本次考试,是可以对本学期学生的学习情况作出一个客观、公正的评价的。
二、学生考试成绩情况及分析参加考试26人,通过26人,合格率100%,这说明:1、学生对知识掌握的较好。
只有清楚地把握住基本概念,才能考出较好的分数。
2、学生对开放教育学习形式已经适应。
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学年秋季学期《操作系统原理》课程试卷及答案

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)理论考试试题及答案

浙江大学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年上半年 系统分析师 下午试卷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 学年第一学期期终考试《操作系统》课程试卷考试时间: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、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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.。