# Operating systems 1 -- 2008-2009 -- info.uvt.ro/Projects

Quick links: front; laboratories agenda, 1, 2, 3, 4, 5, 6, projects, evaluation, tools, references.

## General consideration

You will have to:

• constitute into teams of 2 or 3 members; (there must be an equilibrium of competences between the members;)
• choose one project from the following list (or come up with one and discuss it with me);
• start implementing, but distribute the load equally between the team members;
• learn what the others have done;
• present it to me (no later than 16th of December 2008);

The grade will be computed as:

• each student will present the part he has implemented, and will also respond to questions from the entire project:
${\displaystyle g_{s}\in [0,12]}$;
• an average will be computed based on all the student grades:
${\displaystyle g_{S}={\frac {\sum {g_{s}}}{students}}}$;
• the project (in whole) will be graded based on the manner in which it has reached its goals, and also on the manner in which it has been implemented, and also a difficulty coefficient:
${\displaystyle g_{p}\in [0,12]}$;
${\displaystyle C\in [0,1.2]}$;
• the final grade for the project is computed as a weighted sum between the average student grades and project grade:
${\displaystyle G_{p}=g_{S}\cdot 0.6+g_{p}\cdot 0.4}$;
• the final grade for each student is computed as a weighted sum between the final project grade and the individual student grade, and then multiplied with the complexity coefficient:
${\displaystyle G_{s}=(G_{p}\cdot 0.6+g_{s}\cdot 0.4)\cdot C}$;

## Implementation considerations

• all (or almost all important) error situations should be taken into consideration, and at least give a meaningful error message;
• the code should be properly written by obeying some general code guidelines;
• the code should be split into multiple functions or scripts, as to avoid code duplication;
• you should try to delegate most common tasks to specific already existing tools; (but don't replace your entire application with a simple wrapper...)

These projects can have the maximum difficulty coefficient 1.2.

Example usage:

• telling the download manager that you would like to download a certain file (somewhere in the future) (putting it into the inbox):
$dm add debian.iso http://cdimage.debian.org/debian-cd/4.0_r5/i386/iso-cd/debian-40r5-i386-netinst.iso  • telling it to start the download (put it to the waiting queue): $ dm start debian.iso

• telling it to stop the download (remove it from the waiting queue to the inbox):
$dm stop debian.iso  • removing the download (and stop it if necessary): $ dm drop debian.iso

• listing the contents of the inbox, waiting queue, running queue and outbox:
$dm list inbox debian.iso$ dm list [waiting | running | outbox]

$dm status debian.iso running  • starting just one download from the waiting queue: $ dm run
[=========              ] 30%

$dm daemon 5  • saving the downloaded file under a specific path (this also removes the download from the outbox): $ dm save movie.avi ~/desktop


Useful tools:

Implementation hints:

• use a folder for each of the queues (inbox, waiting, running, and outbox);
• for each download use a file named like the identifier (debian.iso in our case) which contains as the first line the download URL;
• when changing the status of a download move it between the different folders;

### File versioning system

Implement a Bash script that acts like a simple file versioning system.

Example usage:

• adding a file to be revisioned:
$vs add /etc/fstab  • listing the files under version control: $ vs list
/etc/fstab
/etc/X/xorg.conf

• printing the status of a given file:
$vs status /etc/fstab unmodified  • printing the status of all files: $ vs status
/etc/fstab: clean
/etc/X/xorg.conf: modified
/etc/lvmtab: missing

• listing the revisions of a given file:
$vs revisions /etc/fstab 2008-11-25/20:43:14 2008-11-10/19:17:32 ...  • printing the differences between the last snapshot and current status: $ vs diff /etc/fstab
...

• creating a new revision (with the current content):
$vs commit /etc/fstab  • reverting to a certain revision: $ vs revert /etc/fstab 2008-11-25/20:43:14

• removing a file from versioning:
$vs delete /etc/fstab  • creating a backup of the repository: $ vs dump-backup backup.tar

• restoring a backup of the repository:
$vs load-backup backup.tar  Links: Useful tools: ### Remote execution Create a tool that eases remote command execution, and computer group management. Example usage: • create a new host definition: $ re create-host node-1 node1.info.uvt.ro user

• create a new host group:
$re create-group cluster-1  • add a computer to one (or more groups): $ re add-to-group node-1 cluster-1

• remove a computer, group, or computer from group;
• execute a command remotely to a certain computer:
$re execute node-1 date 2008-11-...  • execute a command remotely to a group of computers: $ re execute cluster-1 date
=> node-1
2008-11-...

=> node-2
...

• execute a command on a host (group of hosts) in background:
$re execute-detached tar -xzf a.tar.gz  • list all the launched background jobs: $ re list-detached
node-1: 1: daemon
node-1: 2: tar -xzf a.tar.gz
node-2: ...

• retrieve the status of all the background jobs:
node-1: 1: daemon: running
node-1: 2: tar -xzf a.tar.gz: crashed
node-2: 1: ...


Useful tools:

These projects can have the maximum difficulty coefficient 0.9.

(None so far).

These projects can have the maximum difficulty coefficient 0.7 or 0.8.

### File archiver

Write a wrapper for:

### File manager

Write a tool that helps a user manage the file system.

It should present a shell and have at least the commands (with some basic flags):

• copy;
• move;
• delete;
• folder;
• list;
• search;
• type;

Useful tools:

### aespipe wrapper

Write a wrapper for aespipe (or similar symmetric encryption tool Wikipedia:GNU Privacy Guard).

It should have at least the following commands:

• create-key;
• encrypt;
• decrypt;
• verify;
• cat-decrypt;