unix管理与开发期末考试试卷(英文版)_第1页
unix管理与开发期末考试试卷(英文版)_第2页
unix管理与开发期末考试试卷(英文版)_第3页
unix管理与开发期末考试试卷(英文版)_第4页
unix管理与开发期末考试试卷(英文版)_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、南开大学20132014年度第二学期unix管理与开发期末考试试卷(考试时间:100分钟 总分100分)院(系) 软件工程 学号 姓名 分数 一选择正确的答案 (每题2分,共20分)1. the signs of files can be read, write, execute are followed in turn( a )。a. rwx b. xrw c. rdx d. srwanswer: a2. exit interactive shell,should input( c )。a. ; b. q c. exit d. quitanswer: c3.if superuser root

2、 was under the directory:/usr/local,after input cd,the user is under which directory now( b )。a. /home b. /root c. /home/root d. /usr/localanswer: b4.there is a file named file under the directory:/home/stud1/wang,using( c )can make it run in the background,the command output the content of file to

3、file.copya. cat file ;file.copy b. cat ;file.copy c. cat file file.copy & d. cat file file.copy &answer: c5.in unix system,the source file changes to executable file through compiling ,the executable file belongs to ( b ) a. ascii file b. ordinary file c. directory file d. special fileanswer: b6.the

4、 following narrative on unix, which is not correct ( c) a. unix file system is a tree structure, easy to manage and retrieve b. unix provides a wealth of software tools, such as utilities, text, and development tools c. unix manages ordinary files, directories, files, and device files in different w

5、ays d. unix is a multi-user, multi-tasking operating systemanswer: c7.if you want to know the detail usage of find which is a command of unix, you should input(c) ahelp find bfind help cman find dfind mananswer: c8.about the command cp, which is incorrect( c )acp file1 file2bcp file1 file2 /tmpccp r

6、 file1 file2dcp r /tmp /mytmp answer: c9.when we create a new file, it has properties as followed( a )areadable and writable propertybreadable executable propertyc writable executable propertyd . read-write executable propertyanswer: a10.if we want to change the time of a file,use the command( c )at

7、imeb. date c. touch d. calanswer: c11.about the command cd , which is incorrect( d )acd back to directory when registering bcd /tmp into directory /tmpccd ./ into the upper directorydcd ./ into the root directoryanswer: d12.when you create a new directory using the mkdir command, the option when its

8、 parent directories do not exist to create a parent directory is ( d)。a.-mb.-dc.-f d.panswer: d13. the following statements, which is not belong to the scope of the role of the ifconfig command ( d ) 。a. configure the local loopback addressb. configure the ip address of the network cardc. activate t

9、he network adapter d. load the card into the kernel answer: d14. there are four methods to assignment of variables in the shell,the name of name=12 is ( a )。a. direct assignment b. use read command c. using the command line parameters d. use the command output 15. answer: a15.change the owner of a f

10、ile ,use command ( c )。a. chmod b. touch c. chown d. catanswer: c16. how many“-”will output in the following procedures?( d)#include #include #include int main() for(int i=0;i2;i+) fork(); printf(-); return 0;a.2 b.4 c.6 d.8answer: d17. the following description of the error that respect to the i-no

11、de is ( a ).a. i node and file is one to oneb. i node can describe the number of blocks that occupied by the filec. i-node describes the size of the file and a pointer pointing to the data blocksd. achieve transformation of the logic and physical structure of the document by the i-nodeanswer: a18. p

12、ermissions of the outside members of group of a file is read-only; the owner has full permissions; permissions within the group to read and write, then the file permissions is( d )a.467 b.674c.476 d.764answer: d19. how to display the current directory ( a).a. pwd b. cd b. c. who d. isanswer: a20. wh

13、ich is the return value of the exit command in script, said the script successfully ( d )a、1b、-1c、2 d、0answer: d21.which command is used of changing password( b )a、whob、passwdc、passwordd、pwdanswer: b22. process synchronization refers to the relationship between the process of mutual( b )in logica、co

14、nnectionb、restraintc、continued、callinganswer: b24.how set the shell script exam.sh as all users can execute( a )a、chomd a+x exam.shb、chomd a+w exam.shc、chomd a+r exam.shd、chomd u+w exam.shanswer: a25. management and control processes by( b )a、instruction b、primitivec、semaphored、mail communicationans

15、wer: b26.thecommandusedtochangethenameoffileofdirectoryis(c)a、rmb、cpc、mvd、cdanswer: c27. to compile a c program, enter ( d ) in command prompt.a、c prgnameb、cc o c prgnamec、cccc prgnamed、ccc prgname二判断题(每题2分,共10分)1. ()like the shell, the output that is generated by print and printf can be directed to

16、 a file or pipe.answer: true2. ()it is not necessary that the scheduler allocates cpu to the process.answer: true3. ()when encrypted, the command can specify multiple files as files, and the command encrypted all the files.answer: false4. ()udp protocol is a connectionless protocol, so that he can p

17、rovide reliable data transmission.answer: false5. ()process is a collection of instructions.answer: false三填空题(每题2分,共10分)1. the files and directories to package command is _tar_answer:tar2. the command to end the background process is _kill_answer:kill3. use _diff_ command to compare the different be

18、tween two contents of files.answer:diff4. _stdin_、_stdout_、_stderr_ willbeopenedatthebeginningofthecreationofa linux processes.answer:stdin、stdout、stderr5. list several main directory of unix /boot /etc /dev /bin /user /homeanswer: /boot /etc /dev /bin /user /home6. the test command can test _file_,

19、 _integer_, _string_.answer:file、integer、string四简答题(每题8分,共40分)1. in theunixoperating systemareclassifiedinthe types ofoperating systems?what are the mainfeatures ofunixsystems?answer: 1 unixis amulti-taskingmulti-usertime-sharing system, the requesttimeas the unit torespond to multipleusers. feature

20、s: thesimple designand methodsto accomplishmore complex,more comprehensive functionality. support multi-usermulti-tasking operating environmentfile systemscan easilyhandlingopenness andgoodportability powerful command-featuredsecuritymechanism ofnetwork characteristics.2.whats the interprocess commu

21、nication? list 3 tools provided by unix for interprocess communication.answer: (1) the interprocess communication is transferring data between different unix commands. (2)three tools: pipeline, command pipeline and socket.3.describe several operational levels and their corresponding meanings of linu

22、x.answer: 0- shutdown mode, 1- single-user mode, only the system administrator can log on single-user mode. 2- multi-user mode, but does not support file sharing, for example, does not support nfs services. this model is not commonly used. 3- complete multi-user mode, support for nfs service. the mo

23、st common user mode, log on to the character-based interface of the system defaultly . 4- retained mode. 5- fully multi-user mode, log on to the x-window system defaultly, which is logged on to the linux graphical interface.6- restart mode, which is executed to close all running processes, then rest

24、art the system. 4. what is the link? what is the difference between symbolic link and hard link ?answer: link refers to an i-node corresponds to multiple file names. a hard link is letting the i-node number of the file point to the i-node,and the counter value of the link is incremented 1. when you

25、delete a link of a file, counter value decreased 1.when its value is 0, i node is released.a symbolic link is only a link file,which only has a name,does not point to a real node i. when you delete a symbolic link of a file you can find out that is different from a hard link files.5. the difference

26、between fork and vfork.answer: 1) fork need copy the data segment of the parent process; while the vfork doesnt need to copy the data segment of parent process completely, the son process and the parent process shared data segment before the son process doesnt call exec and exit.2) fork doesnt make

27、any restrictions to the execution order of the son process and parent process; and in the vford call, the son process first to run, the parent process hang, after the son process calls exec or exit , the execution order of the parent and son process has no longer limit.6. description the characteris

28、tics of the shell.answer: shell is an interactive command interpreter, and is also a kind of programming language. each statement of it is executable command. shell to satisfy the interactive command and programming operation command two ways of using requirements, is a kind of special language. its

29、 application range is wide, and has high operation efficiency.7.what technology does unix use to read and write pieces of equipment operation?answer: unix block device is realized by using buffer technology to read and write operations. driver allocate a buffer for write operation, first the informa

30、tion from the user space is copied to the buffer, and output from buffer to the device; to read operation, to receive information from the device to the buffer, then the information is copied to the specified user space. using buffer technology to reduce number of visits to the piece of equipment ca

31、n improve the throughput of the system.8. if you open a file for read-write with the append flag, can you still read from anywhere in the file using lseek? can you use lseek to replace existing data in the file?answer: you can still lseek and read anywhere in the file, but a write automatically rese

32、ts the file offset to the end of file before the data is written. this makes it impossible to write anywhere other than at the end of file.五程序设计题(每题10分,共20分)1. describes the unix network programming steps and describes how unix communications. answer: web applications and ordinary program has one of

33、 the biggest difference is that the network application is composed of two parts - the client and server.network program is the first server startup, waiting for the client program running and establishing the connection. usually the program in general listening on a port, until there is a client program sent a request.unix system is provided by the socket for network progra

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论