操作系統作業輔導

CSCI212 assignment3 solution: shell interpreter implementation

 

CSCI212/MCS9212

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Assignment 3 (7.5 marks)

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Due 11:59pm Sunday May 17, 2015.

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写The aim of this assignment is to write a simple shell interpreter demonstrating you knowledge of process

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写control. In addition to this you will get some experience with file system API’s.

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Task One (4.5 marks)

You first task is to write a simple shell interpreter, which executes commands. You shell interpreter should

display a $ prompt and wait for user input.

You shell interpreter is to be a little simplistic, all you can do is execute commands. If a command cannot be

found you should display a suitable error message. When executing a command the shell interpreter should

wait until the command terminates. To implement command execution simply use the function call fork()

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写and exec(). Note that there are many variations on the exec() function call. To block the shell, you

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写should use the wait() (or similar) function call.

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写At the end of this step you should be able to do this:

$ ./foobar

./foobar does not exist.

$ ls

QEMU: Adding a System Call

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Assignment 3 CMPT-300

QEMU: Adding a System Call

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Disclaimer: This assignment is adapted from a project developed by Dr. Jason Nieh at

Columbia University.

Part A:

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Setup Your Linux Kernel Building Environment and add dummy

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写syscall(25%):

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写The first step is to learn how to create a virtual machine using QEMU and install a

custom kernel.

Please follow this tutorial:

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写http://www.sfu.ca/~rws1/cmpt-300/assignments/a3-qemu-tut.pdf

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写All files can be downloaded from:

http://www.sfu.ca/~rws1/cmpt-300/assignments/cmpt300-a3.zip

Part B:

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Adding an advanced system call(75%):

Write a new system call in Linux. The system call you write should take one argument

(pointer to a data structure) and return various information for the process identified by

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写the pid in the data structure. All return information will be put into the data structure. For

the following discussion all relative paths refer to the top of your kernel source

directory linux-2.6.26.5

全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写The prototype for your system call will be:

int prinfo(struc