-
Notifications
You must be signed in to change notification settings - Fork 1
stephenphillips42/cs111_lab1
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
README Authors: Andy Huang - UCLA ID: 503885009 Stephen Phillips - UCLA ID: 503888079 From Part 1A: We don't have anything for special characters (e.g. \t, \n, etc.). We also consider apostrophes, quotations, grave accents as errors too. We do implement everything needed for test-p-ok.sh and gives appropriate errors and error messages including line numbers. There is some dummy code to allow the makefile compilation to work (gets rid of "argument not used" errors). The code does not change anything in the read-command.c file. For Part 1B: We have added the code to execute commands in the shell. Now it only does it sequentially, and the parallelization will be added in later. It passes all the test cases we give it, and returns the output as bash does. It waits for all the child processes spawned in it to close before returning. Note that there is one race condition in our shell. If you have pipe with one side being a subshell that uses a file that the other side uses directly for its output, there will be a race condition, that will sometimes work and sometimes not. For Part 1C: We added the parallelization. We scheduled it by "ranking" each task based on the dependencies before it. The dependencies are discovered by using an indexed version of all the files in the commands. We sort the tasks accordingly to their rank. The we execute the commands of the same rank at the same time, spawning off child processes to execute each command. We wait for all in one rank to finish, then go to the next rank until we are finished. We also added parallelization to the subshells. We take all the sequence commands and check their parallelizability just like in the normal shell.
About
CS111 Project 1
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published