欧美一级a免费放视频,欧美一级a免费放视频_丰满年轻岳欲乱中文字幕电影_欧美成人性一区二区三区_av不卡网站,99久久精品产品给合免费视频,色综合黑人无码另类字幕,特级免费黄片,看黃色录像片,色色资源站无码AV网址,暖暖 免费 日本 在线播放,欧美com

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

COMP2211 代做,、代寫shell interface程序設(shè)計(jì)
COMP2211 代做、代寫shell interface程序設(shè)計(jì)

時間:2024-11-09  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



Chapter 5
Week 4: Creating a small shell interface
You must submit your work to the appropriate submission point in Gradescope, which will
be automatically marked. You should submit a single file called my_shell.c. Any other
files you submit will not be marked. Although you do not need to include any additional
supporting documentation or report, we do expect that your code is well written, tested and
commented.
Deadline: Week 6 of teaching. Thursday. 7th of Novem ber, 2024. 14:00. Extensions of up to 7 days are available.
Weighting: 40% of the final module mark.
In this coursework you will demonstrate:
• An understanding of how processes are created by the operating system.
• An understanding of file descriptors and their relationship to pipes and redirection.
• The ability to program components of an operating system.
Exercise
In this coursework you will implement a simple shell for the xv6 operating system. This
new shell will be implemented as a user space program. Before you attempt this coursework,
make sure you have gone through most of the formative assessment exercises in the preceding
weeks and convinced yourself that you know how various parts work. Where you have doubts,
read relevant parts again and redo the coursework, which will make you spot new things and
gain a deeper understanding of the material. You should provide your implementation in a
new file called my_shell.c. You may use any helper functions provided by the xv6 kernel or
user libraries. For each of the following items implement the feature into your shell, as you
progress the features to implement become harder. This exercise should not require you to
modify any file other than my_shell.c and the Makefile.
To start with clone the repository containing the starting code and copy my_shell.c
from it into your xv6 user/ directory:
29
$ git clone https://github.com/mmikaitis/COMP221**shell-template.git
Modify the Makefile accordingly and rebuild xv6. It will not compile because my_shell.c is
not finalised yet. However, it also contains some comments that should help in finishing the
intended structure. Your task is to finish writing methods getcmd, run_command, and main,
by inserting code in the indicated locations. No other methods should be developed.
You are allowed to look at a default xv6 shell source code as well as
learn about implementing shells using external resources. However,
you are required to follow the unique structure outlined in the tem plate and are not allowed to supply any code which was not developed
solely by yourself, starting from design stage. If you depend highly
on some online tutorials then you need to declare the sources in the
comments, which includes large language models. If you discuss early
ideas with someone in the lab you should make sure that you don’t
end up with similar code structure; you should not code together.
Gradescope will run a similarity check of your submission and if the
logic of the new code is reported to be similar to someone else’s,
the submission will be carefully checked manually and reported as
academic integrity violation if required. See this website for some
detail. The similarity check is resilient to changing variables names
or adding comments and new lines.
Going through academic integrity interviews is a daunting process and
may result in severe delays to your degree progression. It is better
to submit nothing than submit the code that was partially developed
by others. If you are behind, speak to the lab demonstrators and the
module lead for guidance on best ways forward.
Part 1: Execute simple commands (5 Marks)
Implement the execution of simple commands. Your shell should be able to:
• Prompt the user for a command by printing “>>>” as a command prompt.
• Execute a command inputted to the command prompt.
• Loop indefinitely until the shell is exited.
• Handle the “cd” command—you will notice that this command will need to be treated
as a special case.
Do not forget to stress-test your simple shell before moving on to advanced features. The
automatic marking will be testing it on various cases and marks will be deducted if it does
not work when the same command is provided in a different format, such as with extra
30
spacing. For example, consider (note the amount and location of space characters which
may impact the shell if they are not detected):
$ echo hello world
$ echo hello world
Once you are comfortable that you have tested your shell with any possible command that
could reveal bugs, move on to implement the following advanced features.
Part 2: Input/Output redirection (6 Marks)
Implement Input/Output redirection. Your shell should be able to handle two element
redirections. For example,
$ echo "Hello world" > temp
$ cat < temp
Part 3: Pipes (6 Marks)
Implement pipes. Your shell should be able to handle two element pipelines. For example,
$ cat README | grep github
Part 4: Additional features (8 Marks)
Implement the following advanced features:
1. Implement multi-element pipelines. For example,
$ ls | grep test | cat
2. Implement non-trivial combinations of pipes and redirection. For example,
$ ls | grep test | cat > myoutput
3. Implement the “;” operator that allows a list of shell commands to be given and
executed sequentially.
$ ls | grep test | cat > myoutput; cat myoutput
Marking
Gradescope will run 26 test commands and award a mark out of 25. The commands that will
be run are not disclosed and you are required to use creativity to think of various scenarios
which may break your shell and test it thoroughly before submitting. 3 out of 25 marks
31
will be awarded to those who spot three especially tricky cases of specifying commands and
implement their shells to get around them.
There are many ways to type commands, some straightforward as shown above, and
some not, such as when people type commands without using any spaces or with arbitrary
number of spaces in various places. Your shell should be resilient to this ambiguity in
specifying commands. Those students who spent more time in thinking about various test
cases and check them will get more marks than those who only try a few straightforward
commands listed above.
Here are a few example commands running in the new completed shell to get you started:
xv6 kernel is booting
hart 2 starting
hart 1 starting
init: starting sh
$ my_shell
>>> mkdir tempdir
>>> ls
. 1 1 1024
.. 1 1 1024
README 2 2 2292
cat 2 3 35080
echo 2 4 33960
forktest 2 5 16080
grep 2 6 38512
init 2 **4424
kill 2 8 33888
ln 2 9 33712
ls 2 10 37016
mkdir 2 11 33952
rm 2 12 33936
sh 2 13 56504
stressfs 2 14 34816
usertests 2 15 179160
grind 2 16 49**6
wc 2 1**6024
zombie 2 18 3**88
my_shell 2 19 400**
console 3 20 0
tempdir 1 21 **
>>> cd tempdir
>>> ../ls
. 1 21 **
**
.. 1 1 1024
>>> cd ..
>>> ls
. 1 1 1024
.. 1 1 1024
README 2 2 2292
cat 2 3 35080
echo 2 4 33960
forktest 2 5 16080
grep 2 6 38512
init 2 **4424
kill 2 8 33888
ln 2 9 33712
ls 2 10 37016
mkdir 2 11 33952
rm 2 12 33936
sh 2 13 56504
stressfs 2 14 34816
usertests 2 15 179160
grind 2 16 49**6
wc 2 1**6024
zombie 2 18 3**88
my_shell 2 19 400**
console 3 20 0
tempdir 1 21 **
>>> echo hello
hello
>>> echo hello
hello
>>> cat README | grep xv6
xv6 is a re-implementation of Dennis Ritchie’s and Ken Thompson’s Unix
Version 6 (v6). xv6 loosely follows the structure and style of v6,
xv6 is inspired by John Lions’s Commentary on UNIX 6th Edition (Peer
(kaashoek,[email protected]). The main purpose of xv6 is as a teaching
>>> cat README| grep xv6
xv6 is a re-implementation of Dennis Ritchie’s and Ken Thompson’s Unix
Version 6 (v6). xv6 loosely follows the structure and style of v6,
xv6 is inspired by John Lions’s Commentary on UNIX 6th Edition (Peer
(kaashoek,[email protected]). The main purpose of xv6 is as a teaching
>>>
It is worth to note that the default xv6 does not pass all of our expected tests. For
example:
33
xv6 kernel is booting
hart 2 starting
hart 1 starting
init: starting sh
$ cd .
$ cd .
cannot cd .
$ mkdir temp
$ cd temp
$ cd ..
$ cd temp
cannot cd temp
$
Submission
You are required to submit only my_shell.c. See Minerva.


請加QQ:99515681  郵箱:[email protected]   WX:codinghelp





 

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:SCC.369代做、代寫C/C++編程設(shè)計(jì)
  • 下一篇:代寫COSC2531,、代做Python設(shè)計(jì)編程
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    出評 開團(tuán)工具
    出評 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    戴納斯帝壁掛爐全國售后服務(wù)電話24小時官網(wǎng)400(全國服務(wù)熱線)
    戴納斯帝壁掛爐全國售后服務(wù)電話24小時官網(wǎng)
    菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話24小時服務(wù)熱線
    菲斯曼壁掛爐全國統(tǒng)一400售后維修服務(wù)電話2
    美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時客服熱線
    美的熱水器售后服務(wù)技術(shù)咨詢電話全國24小時
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士3號線
    合肥機(jī)場巴士3號線
  • 短信驗(yàn)證碼 酒店vi設(shè)計(jì) 投資移民

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045