Sunteți pe pagina 1din 9

London Metropolitan University School of Computing Coursework Assignment Header

STUDENT ID NUMBER_____________________________________________ FAMILY NAME AND INITIALS (Please print):____________________________ GRADE ALLOCATED :_______ N.B. All grades are provisional until Confirmed by the Board of Examiners. ASSESSOR'S INITIALS:____________________________________________ ASSESSORS COMMENTS

Module Code: Module Name:

CS5001 Networks and Operating Systems

Module Organiser: Dr. Peiyuan Pan Assignment: Coursework 2 Weighting: 30% Date set: 7 Mar. 2013 (% of module assessment total, incl. exam)

Time and date due: your coursework must be submitted online onto the WebLearn in Week 25 no later than 16:00 pm Friday, 19th Apr. 2013. (Presentation on Fridays 26th Apr and 3rd May 2013, Week 26 & 27)

Coursework 2 consists of two tasks: Task A and Task B. It should be submitted on-line onto the WebLearn. Deadline of submission: 16:00pm Friday, week 25, 19 April 2013. Presentation: Fridays in week 26 and week 27 if no presentation, 50 marks of will be deducted.

Task A: - Before you start working through the assignment tasks, do not forget to type in
the script command (the Record Session Command), which enables you to record the terminal session(s) for submission. The name of the script file must start with your student ID, followed by cw2part1, e.g. if your student ID is 05123456, your script file must be '05123456cw2part1'. The full command you type in is therefore: script 05123456cw2part1. After you complete all assignment tasks, use either Control-d or exit command to stop recording. If you work through those tasks in several short sub-sessions (i.e. sequence of sub-sessions), use option a of the script command or concatenation of files (cat command). After you complete all assignment tasks (and record your terminal session(s) too), transfer (FTP) your script file from UNIX server to your PC Windows Operating System and check/edit it using any text editor from your Windows system. You will lose marks without editing. You should submit one script file only onto the WebLearn site for Task A

Task B: Carry out your own research to produce a technical report on the Management
of I/O Request in Operating System. Further requirement details about the report are mentioned in Task B section. Filename: report05123456.doc You are required to submit two files: 1. 2. The script file for Task A: 05123456cw2part1 The report file for Task B: report05123456.doc

Please Note: The filename must follow the convention described above, and use your ID to replace 05123456; All 2 files must be submitted online by uploading onto the WebLearn by the deadline: 16:00pm Friday, Week 25, 19 April 2013.

Task A - UNIX Shell Operations and Shell Script Program


(60% of Coursework 2 in total) 1. Aim of the Coursework
To train you for organizing your work within the deadline To experience the submission of your coursework online to the WebLearn To familiarize yourself with relevant details of UNIX interface To perform file system-based operations on the UNIX shell

2. Requirement with Guidance


(a) It is a good practice to check and edit your script file before submission. Each task section should have a title with relevant comments. A special marking scheme will apply if your script file is swamped with garbage and consequently exceeds its reasonable size, you may lose all the marks in the worse situation (your file size> 70 Kb). (b) Tasks should be completed in required directories; otherwise, you could lose up to 50% of the allocated marks, or even more. (c) If a task/tasks requires: Show that your are in (some) directory, you may use shell prompt or pwd command to show your working directory. To simplify your operation, you should type in script command, immediately followed by the command: PS1=$PWD> to set the shell prompt displaying the pathname of your working directory. If your prompt does not show your working directory, you could lose up to 15 marks (15%). (d) If a task/tasks requires: Give a short explanation, you have to type in 1-3 line(s) of explanation in echo or print command. You may also use a text editor to input the explanation. If no explanation is given, you may lose up to 50% of the allocated marks, or even more.

3. Assignment Tasks
3.0 The Coursework submission file (10 marks) The file submitted to WebLearn should be well structured with very good readability, such as, filename is correct, consistent style for task titles with brief comments, and Rubbish cleaned. 3.1 Creating New Directories (3 marks) Starting from your home directory 3

Create the directory structure shown in Figure 1 and then go back to your home directory (using relative pathnames) Show the structure Stay in your home directory
Your hom e d ir e c to r y

C W 11

d -2 1

d -2 2

d -2 3

d -2 4 F ig u r e 1

d -2 5

d -2 6

3.2 Removing Existing Files and Directories (4 marks) Change to d-26 directory using a relative pathname Show that you are in this directory. Create two text files in this directory using any UNIX utility

Change to CW11 directory: Remove both text files with the Interactive Mode (-i) option and d-26 directory using corresponding command(s) Show the absence of two text files and the directory 3.3 Use of print Command (3 marks) Remember that the print command can replace the echo command to print the argument of a command. Print the following string using one print command Hello! Shell started Print the following three-line string in one print command We can print different characters in the print command, for example: a-b, A-B, , +, <, >, #, $, %, &.

3.4 Use of cd Command (4 marks) Now you are still in CW11 directory. Change to d-24 directory using a relative pathname. Show that you are in this directory Type in the following commands and give a short explanation of the results: pwd ; cd ; pwd

Change to d-24 directory again using a relative pathname. Type in the following commands: pwd ; cd .. ; pwd ; cd .. ; pwd and give a short explanation of the results

3.5 System Manual and Large Files (5 marks) Change to d-25 directory using a relative pathname. Show that you are in this directory. Display the system manual for ls command. Do not display more than two screenfuls. Do not clutter up your transcript!. Copy the system manual for ls command to the file named ls-man, and use more utility to read ls-man file (just display two screenfuls) and exit from more

3.6 Use of ls Command (6 marks) Type in the following commands and then give a short explanation for the results from each command line: cd ; pwd ls ls a ls al cd ; pwd ; cd CW11 ; pwd ls R

3.7 Use of cat Command (14 marks) Change to d-24 directory and use cat utility to create the following 3 files with the contents as listed in the table: - (4 marks)
File Name

Contents:

testa AAAAA BBBBB CCCCC DDDDD

testb aaabb bbbcc cccdd dddaa

testc Aaaaa Bbbbb Ccccc Ddddd

Copy these files to d-23 directory using a relative pathname - - (2 marks) Concatenate the files, using the following commands. - (8 marks) o cat testa testb testc o cat testa testb testc > testd o cat testa testb >> testd For the third command above, type in 2 lines of any string during the execution and give a short explanation for the results from the execution.

3.8 Use of chmod Command (10 marks) Change to d-23 directory - (5 marks) Remove all access permissions for testa. Display access permissions for testa. Read file testa using any utility. Add read and write access permissions to testa for you (the owner). Display the new access permissions for testa. Read file testa using any utility. Change to CW11 directory (5 marks) Remove all access permissions for d-23. Display the new access permissions for d-23. Try to read a file from d-23 using any utility. Add read, write, and execute access permissions to d-23 for you (the owner). Display the new access permissions for d-23. Read a file from d-23 using any utility. 3.9 Use of grep Command (8 marks) Change to d-24 directory and type in the following commands: grep grep grep grep grep grep bb testb -v bb testb -n bb testb -l bb * -i bb * -i BB *

Give a short explanation for the results from each command you typed in. You are advised to read the section A 1.8 grep in UNIX commands material. 3.10 Startup Files (10 marks) Modify your .profile and create your environmental file (do not forget to set ENV variable in your .profile file). Both files must have at least an echo or print command to show the startup files working (If you have already created these files, just display and execute them.). Change your .profile file. Display your .profile file Create your environmental file Display this file Show both files working

3.11 Shell scripts (18 marks) Develop a small UNIX shell script (shell program), which is based on the environment of a well-known UNIX shell, to complete the following two tasks: 1. accept your details (MUST be your own information): your name, your ID, your course and enrolled year. (6 marks) 2. produce a summarized report for the details you entered. (12 marks) What should be seen from your session should like (or similar to) below:

In the screen shot above, details is the name of the shell program. Your script program should be able to recognize which years student you are now: if your enrolled year is 2010, you are final year student; if enrolled year is 2011, you are second year student; if enrolled year is 2012, you are first year student. 3.12 Presentation (or viva) (5 marks) You need to present/demo your session file to your tutor, explain the tasks you did and answer questions asked by your tutor. If no presentation, you may lose 50 marks of this piece of work Part1.

End of Task A 60 Marks in total

Task B - Technical Report (40% of Coursework 2 in total) 1. Task Description


Device management is an important part of Operating System (OS) management. Despite the multitude of devices that appear and disappear in reality and quick changes in device technology, the Device Manager in OS must manage every peripheral device of the system. You are required to write a technical report about device management. You should focus on the Management of I/O Request (such as how to control the I/O traffic, how to schedule the I/O and handle the I/O device ), with example/s to illustrate your understanding. The report should be the culmination of good literature search work carried out through using a good mix of sources: book, journals, industry white papers, research outputs of organisations, web resources that have provenance, and textbooks. It should describe in depth the technical content. This technical report should be about 1000 words in length (excluding Cover page, Contents page and References). The report structure and quality will also be marked, based on the criteria of quality of communication/expression and overall structure organisation of material and quality of documentation.

2. A recommended report structure is shown below for your reference


Cover Page {clear and concise- e.g. Task B: Technical Report, Module Code, Module Title, your name and student ID number} Contents Page {shows structure of report - section numbers, heading and pages} Introduction {very brief description of aims (general) and objectives (what is done to achieve the aims to put report within context/sets the scene for the reader (e.g. where does this development fit within the field)} Body of report {main part of the report; e.g. describe the structure of the management of I/O System, more efforts on detailing the I/O traffic controller, the I/O scheduler and the I/O device handler, etc. } Conclusions {condensed version of body; briefly gives key findings} References (Bibliography) {demonstration of your referencing skills}

3. Marking Scheme

Technical content, depth, range of source materials and discussion demonstrations 32 Marks Report structure (e.g., organisation of materials) and quality (communication or expression) 8 Marks

End of Task B - 40 Marks in total

S-ar putea să vă placă și