BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

操作系统代写|COMP 3000B: Operating Systems Final Exam

操作系统代写|COMP 3000B: Operating Systems Final Exam

本次加拿大代写是一个操作系统的限时测试

1. [2] When you interact with bash (via ssh or a graphical terminal) what file does bash read from
in order to obtain user input? Is this file a regular file? Explain briefly

2. [1] When you type the command ls > ls.log at a bash shell prompt, what process opens the
file ls.log for writing, bash, ls, or another?

3. [2] When you type ls -la at a bash prompt, what system call does bash use to receive user
input? What system call does bash use to pass the -la argument to ls?

4. [3] What system calls do the following C library functions make (on Ubuntu 18.04)? Note they may
generate none, one, or multiple system calls. (a) fgets, (b) ioctl, (c) snprintf

5. [2] Process A creates a child process B to open and write data to a file (and then terminate). What is
the standard UNIX mechanism that allows B to inform A that the write to the file failed? Explain,
indicating how the error message would be sent and received.

6. [2] If you decided you didn’t want to run any pre-installed binaries and instead just wanted to run
your own versions when you type in commands at a shell prompt, how could you do this? Would
this change prevent other users of the system from using system binaries? Explain briefly.

7. [2] If a sleeping process receives a signal, will the signal handler run immediately or will it run after
the sleep finishes? Explain briefly, giving evidence for your answer.

8. [2] SIGPIPE is sent to process to indicate a broken pipe, i.e., a write to a pipe that has no readers (but
did previously). Alice, upon learning about SIGPIPE, says this is stupid, because the write would
just return an error. Bob replies that SIGPIPE is useful just like SIGCHLD is. Is Alice right or is
Bob? Explain how the signals are similar and a situation when SIGPIPE would be useful.

9. [2] If a process has a uid=1000, euid=1000, gid=1021, and egid=1021, what files can it read on the
system? Why?

10. [2] With ssh, what is the purpose of the id rsa file? What about id rsa.pub file? What do they
contain, and how are they used?

11. [2] In a filesystem, can two files share the same inode? Explain briefly

12. [2] Can you easily recover from erasing the primary and all backup superblocks of an ext4 filesys
tem? Explain why or why not.

bestdaixie

评论已关闭。