

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A final project for the cmsc 321 - operating systems course, where students are required to implement a system call in the ipodlinux kernel and provide user-level test program(s) for testing the system call. The project must be done individually and the minimum requirement is to mimic the ps (process status) command. The system call should list the process id, user id, group id, process start time, and process name for all processes currently executing in the system. The output must be returned to the user-level program through a single char* parameter. The project offers possibilities for enhancement and provides resources to use.
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!
CMSC 321 — Operating Systems iPod Project iPodLinux System Call(s)
Due: 18:45 Friday 04 May 2007
Overview: For this final project you will implement one or more system calls in the iPodLinux kernel and provide user-level test program(s) for testing your system calls.
This project must be done individually, without assistance from anyone else but me. You are free to use any textbooks or online resources that you may find, but you are not allowed to copy code, and you must cite any resources that you used.
Minimum Requirements: To meet the minimum requirements for this project, you must implement a system call that mimics the ps (process status) command — man ps for more information.
More specifically, for all processes currently executing in the system, for each process you must list the process id, user id, group id, process start time, and process name. Refer back to the notes from earlier in the semester on the process image struct task struct located in include/linux/sched.h. Much of the information to be reported can be found therein, including cycling through the list of active processes. You may choose, but are not required, to sort the output by process id.
Your output must be returned to the user-level program through a single char* parameter. For successful completion of the system call, it is the user’s responsibility to have allocated sufficient space for the buffer into which your system call will place its output. However, you are required in your system call to check if sufficient space exists at the user level before you attempt to write to the user level (i.e., use verify area).
You system call must include an appropriate return value. Definition of this return value is at your discretion, but generally 0 indicates success and -1 indicates failure.
Upon successful completion of the system call, the user level program should be able to print the contents of the string parameter directly and show well-formatted output. In other words, it is up to your kernel-level system call to handle formatting in the string returned to the user-level. The user-level program must be able to invoke your system call similar to the following:
int returnValue = syscall(SYSCALL_NUM, psString); if (!returnValue) printf("%s", psString);
with resulting well-formatted output that looks something like the following:
pid uid gid Time Name 0 0 0 0 swapper 1 0 0 25 init 2 0 0 26 keventd
...
41 0 0 13553 userTest
(Note that, for iPodLinux, all processes will be run as root, so the user id and group id will always correspond to root — i.e., zero.)
Items You Need To Know:
http://lxr.linux.no/source/?v=2.4.28;a=arm
This resource may not match exactly, but it works much better than grep.
Possible Dazzle:
http://yolinux.com/TUTORIALS/LinuxTutorialManagingGroups.html
http://linuxgazette.net/112/krishnakumar.html
Write-Up: For this project, submit a brief README that describes your system call(s), its(their) parameters and usage, your user-level test programs, and citations of any references you use. Drop this README in the topmost linux-2.4.32-ipod2/ directory before gzipping for submission.
Submission: Create a gzipped tarball of your iPodLinux kernel:
tar -czvf iPodLinux-submit.tgz linux-2.4.32-ipod2/
and submit the tarball using the turnin command from the mathcs* network:
turnin -v -c cs321 -p iPod iPodLinux-submit.tgz
Your work on this and all projects in this course is subject to the conditions of the Honor Code as described in the course syllabus.