CS 3113 Fall 18

Logo

This is the web page for Operation Systems at the University of Oklahoma.

View the Project on GitHub oudalab/cs3113fa18

Introduction to Operating Systems

CS 3113, Fall 2018

Project 0

The goal of project 0 is to make sure that you are successfully working with your virtual machine instance to create, compile and test simple C programs. Your program will take as input a set of ASCII characters, count the number of each character value and then produce a printed report that indicates how many of each character has been observed.

Proper Academic Conduct

The code solution to this project must be done individually. Do not copy solutions to this problem from the network and do not look at or copy solutions from others. However, you may use the net for inspiration and you may discuss your general approach with others.

Specification

Program invocation

The command-line interface to your program is as follows:

./project0 [<UPPER> [<LOWER>]]

Example invocation

Assume that the following characters are input to your program (these characters happen to form a c program):

#include <stdio.h>

int main(int argc, char** argv)
{
  printf("Hello, World!\n");
}

And assume that the program is invoked in the following way (piping the C file to STDIN):

./project0 a z < hello.c

Then the output must match the following:

Range: a-z
a:    4 ####
b:    0 
c:    3 ###
d:    3 ###
e:    2 ##
f:    1 #
g:    2 ##
h:    2 ##
i:    6 ######
j:    0 
k:    0 
l:    4 ####
m:    1 #
n:    6 ######
o:    3 ###
p:    1 #
q:    0 
r:    5 #####
s:    1 #
t:    4 ####
u:    1 #
v:    1 #
w:    0 
x:    0 
y:    0 
z:    0 

Input

The input to the program is received through STDIN. Counting of characters ends when the end-of-file is reached.

Output

The output of the program is routed to STDOUT.

The first line of the report is of the form:

Range: A-B

where:

The remaining lines of the output report the character counts from the UPPER character to the LOWER character (following ASCII order). Each line contains:

Testing

What to Hand In

Your files are to be submitted to the Canvas Project 0 dropbox. Submit a single project0.tar.gz file that contains:

In addition, place these files in the /projects/0/ directory on your virtual machine instance. Make sure that this directory and its contents are readable by all users (don’t worry, this is all users on your own instance, not the class and not the world).

To create this folder you can use the following commands:

sudo mkdir -p /projects/0/
sudo chgrp -R google-sudoers /projects
sudo chown -R <username> /projects
sudo chmod --recursive 777 /projects

This code creates the projects and 0 directory. Then it changes group ownership to ‘google-sudoers’. Next, it changes to own to ‘username’ and you should include your google user name. The last lines changes the permissions so it is readable and viewable by all. The last two steps are necessary to be able to edit the files in the /projects directory.

Deadline

Your submission is due on Tuesday, September 11th at 11:45pm. Submissions arriving between 11:45:01pm and 11:45pm on the following day will receive a 10% penalty. Any other submissions will receive a zero.

Grading

Grades will be assessed according to the following distribution:

Notes


Back to Project List