-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add code files for homework assignments
This commit adds code files for the homework assignments. It includes the following changes: - Added `makefile` for homework 3 - Added `Example.c` for homework 2 - Added `fork_example_2.c` for homework 1 - Added `makefile` for homework 3 in the `to-prod` directory - Added `error1.c` for homework 2 in the `Compilation_Error_gets_10` directory - Added `error1.c` for homework 2 in the `grade/moodle/students/Compilation_Error_gets_10` directory - Added `error1.c` for homework 2 in the `to-prod/moodle/students/Compilation_Error_gets_10` directory - Added `Example.c` for homework 2 in the `Wrong_output_gets_50` directory - Added `execv_example.c` for homework 1 in the `ex-files/0/1` directory - Added `error1.c` for homework 2 in the `grade/messing/up/students/Compilation_Error_gets_10` directory - Added `execl_example.c` for homework 1 in the `ex-files/0/1` directory - Added `Example.c` for homework 2 in the `grade/moodle/students/Wrong_output_gets_50` directory - Added `error1.c` for homework 2 in the `to-prod/mess/messing/up/students/Compilation_Error_gets_10` directory - Added `Example.c` for homework 2 in the `to-prod/moodle/students/Wrong_output_gets_50` directory - Added `4.c` for homework 1 in the `ex-files/0` directory - Added `cccgcc.c` for homework 2 in the `grade/students/biu_student_terrible` directory - Added `fork_example_1.c` for homework 1 in the `ex-files/0/1/4` directory - Added `wait_example_1.c` for homework 1 in the `ex-files/0` directory - Added `Example.c` for homework 2 in the `files/student/Similar_output_gets_75` directory - Added `Example.c` for homework 2 in the `files/students/Similar_output_gets_75` directory - Added `cccgcc.c` for homework 2 in the `to-prod/tough/students/biu_student_terrible` directory These changes are necessary to include the code files for the homework assignments in the repository.
- Loading branch information
Showing
96 changed files
with
5,290 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,31 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
* | ||
!/**/ | ||
!*.* | ||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
*.la | ||
*.lo | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
**/*.out | ||
*/outDebug | ||
|
||
# | ||
*/build/Debug/outDebug | ||
*/output.txt | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
*.Identifier | ||
gcc_errors.txt | ||
*tests* | ||
*old | ||
*.txt* | ||
*.csv | ||
|
||
# Kernel Module Compile Results | ||
*.mod* | ||
*.cmd | ||
.tmp_versions/ | ||
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
!makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "linux-gcc-x64", | ||
"includePath": [ | ||
"${workspaceFolder}/**" | ||
], | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "${default}", | ||
"cppStandard": "${default}", | ||
"intelliSenseMode": "linux-gcc-x64", | ||
"compilerArgs": [ | ||
"-lpthread" | ||
] | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "bashdb", | ||
"request": "launch", | ||
"name": "pick", | ||
"cwd": "${workspaceFolder}", | ||
"program": "${command:SelectScriptName}", | ||
"args": [] | ||
}, | ||
{ | ||
"type": "bashdb", | ||
"request": "launch", | ||
"name": "gccfind", | ||
"cwd": "${workspaceFolder}", | ||
"terminalKind": "integrated", | ||
"showDebugOutput": true, | ||
"trace": true, | ||
"program": "/home/bar/projects/OpSys/OpSystems/hw1/gccfind.sh", | ||
"args": [ | ||
"hw1/ex-files", | ||
"execvp", | ||
"-r" | ||
] | ||
}, | ||
{ | ||
"type": "bashdb", | ||
"request": "launch", | ||
"name": "Bash-Debug (simplest configuration)", | ||
"program": "${file}" | ||
}, | ||
{ | ||
"name": "prodcast", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"args": [ | ||
"config.txt" | ||
], | ||
"stopAtEntry": false, | ||
"externalConsole": false, | ||
"cwd": "/home/bar/projects/OpSys/OpSystems/hw3", | ||
"program": "/home/bar/projects/OpSys/OpSystems/hw3/build/Debug/outDebug", | ||
"MIMode": "gdb", | ||
"miDebuggerPath": "/usr/bin/gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "C/C++ Runner: Debug Session", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"externalConsole": false, | ||
"cwd": "/home/bar/projects/OpSys/OpSystems/hw3", | ||
"program": "/home/bar/projects/OpSys/OpSystems/hw3/build/Debug/outDebug", | ||
"MIMode": "gdb", | ||
"miDebuggerPath": "/usr/bin/gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"C_Cpp_Runner.cCompilerPath": "/usr/bin/gcc", | ||
"C_Cpp_Runner.cppCompilerPath": "/usr/bin/g++", | ||
"C_Cpp_Runner.debuggerPath": "/usr/bin/gdb", | ||
"C_Cpp_Runner.cStandard": "", | ||
"C_Cpp_Runner.cppStandard": "", | ||
"C_Cpp_Runner.msvcBatchPath": "", | ||
"C_Cpp_Runner.warnings": [ | ||
"-Wall", | ||
"-Wextra", | ||
"-Wpedantic" | ||
], | ||
"C_Cpp_Runner.enableWarnings": true, | ||
"C_Cpp_Runner.warningsAsError": false, | ||
"C_Cpp_Runner.compilerArgs": [ | ||
"-lpthread" | ||
], | ||
"C_Cpp_Runner.linkerArgs": [ | ||
"-lpthread" | ||
], | ||
"C_Cpp_Runner.includePaths": [], | ||
"C_Cpp_Runner.includeSearch": [ | ||
"*", | ||
"**/*" | ||
], | ||
"C_Cpp_Runner.excludeSearch": [ | ||
"**/build", | ||
"**/build/**", | ||
"**/.*", | ||
"**/.*/**", | ||
"**/.vscode", | ||
"**/.vscode/**" | ||
], | ||
"files.associations": { | ||
"cmath": "c", | ||
"*.tcc": "c", | ||
"condition_variable": "cpp", | ||
"mutex": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"cctype": "cpp", | ||
"chrono": "cpp", | ||
"clocale": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"deque": "cpp", | ||
"unordered_map": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"algorithm": "cpp", | ||
"functional": "cpp", | ||
"iterator": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"numeric": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"ratio": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"fstream": "cpp", | ||
"initializer_list": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"thread": "cpp", | ||
"typeinfo": "cpp" | ||
}, | ||
"cSpell.words": [ | ||
"qutex" | ||
], | ||
"C_Cpp_Runner.useMsvc": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# OpSystems | ||
|
||
1. <details open><summary><h3> Ex1: ⚒️ Gcc Find; 🎾 Tennis ; 💲Shell </h3></summary> | ||
<p> | ||
_____________________________________ | ||
> <details><summary> <h3>⚒️ Gcc Find:</h3><br> </summary> | ||
> a nice little script for compiling all the c files in the folder that contains a specific word. You can turn on th -r flag for recessiveness | ||
><br> <br> <b>⚙️How To⚙️</b><br> <br> | ||
> <ul> <li> Clone the script to a folder of your choice<br> | ||
> <li> Run the gcc.sh file with the following params:<br> | ||
> 1. folder name to be compiled <br> | ||
> 2. a word. only files that contains the given word will be complied <b>::must!</b><br> | ||
> 3. optional: -r flag, if you want to compile the inner files as well. <br> </ul> | ||
> | ||
>⚡<code> > ./gccfind.sh myFolder main -r </code> | ||
</details> | ||
_____________________________________ | ||
|
||
> <details open><summary> <h3>🎾 Tennis (paper game):</h3><br> </summary> | ||
> a funny little [tennis paper game](https://en.wikipedia.org/wiki/Tennis_(paper_game)), terminal styled. | ||
> #### <b>⚙️How To⚙️</b> | ||
> There are two options for the game: in place game, and logged history game | ||
> You can choose what to use by simply run the game with flags: | ||
> * __for in place game:__ --in-place | -p | ||
> * __for logged game :__ --l | -log | ||
> * The default version is logged <br> | ||
> | ||
> ⚡<code> > ./tennis.sh -p </code> | ||
_____________________________________ | ||
> <details><summary> <h3>💲 Shell:</h3><br> </summary> | ||
> a shell program that can be loaded with your custom commands | ||
> <br> <br> <b>⚙️How To⚙️</b><br> <br> | ||
> <ul> <li>compile myshell.c <code>gcc -o shell myshell.c </code> <br> | ||
> <li><strong> There are two options: </strong><br> | ||
> you can run the runnable script without any other params. <br> | ||
> The program will act as you expect from a normal shell <br> | ||
> <i>Or</i> you can send path to a folder, which contains custom scrits. The folder be then added temporarily to your env variables, <br> | ||
> so you can can any script that is defined there by simply typing it's name. <br> <br> </ul> | ||
> <b> for example:</b> | ||
> if inside a folder named 'myCommands' you have a script named 'do-somthing.sh' <br> | ||
> you can run the shell with the path to 'myCommads', then you can just type | ||
> <code>do-something.sh </code>,<br> no matter what pwd you are in. <br> | ||
> <br> | ||
> ⚡<code> > ./myshell ~/myCommands </code> </details> | ||
_____________________________________ | ||
</p> | ||
</summary> | ||
</details> | ||
_______________________________________________________ | ||
|
||
2. <details open><summary><h3> Ex2: 📂 File Comperator & Grader </h3></summary> | ||
<p> | ||
_____________________________________ | ||
> <details open><summary> <h3> 2.1: Files Comperator </h3><br> </summary> | ||
> a program that get two arguments of file pathes and determines the similarity:<br> | ||
> 🔖 1: The files are identical <br> | ||
> 🔖 2: The files are different <br> | ||
> 🔖 3: The files are similar <br> | ||
> <br> | ||
> ⚡<code> > ./comp.out /home/os20 12 /code/1.txt /home/os20 12 /code/2.txt </code> | ||
> </summary> | ||
> </details> | ||
_____________________________________ | ||
> <details><summary> <h3> 2.2: Grader </h3><br> </summary> | ||
> A program that gets config path and grades the folders by that <br> | ||
> The config file contains 3 rows: <br> | ||
> ✏️ 1: Path to parent folder which contains sub-folders for grade. Each folder is a user folder. <br> | ||
> ✏️ 2: Path to an input file for will-be executed program <br> | ||
> ✏️ 3: Path to correct output file <br> | ||
> The program iterates through the users' folders, compiles(if exists) the c file in that folder. | ||
> Then runs the compiled program with the input file and comperes the results to the correct output from the config file. | ||
> If anything in the way is getting wrong, the grade will be affected as listing here: <br> | ||
> > > > > > ✨ NO_C_FILE : 0 <br> | ||
> > > > > > ✨ COMPILATION_ERROR: 10 <br> | ||
> > > > > > ✨ TIMEOUT: 20 <br> | ||
> > > > > > ✨ WRONG: 50 <br> | ||
> > > > > > ✨ SIMILAR: 75 <br> | ||
> The grade will be written into an excel file, named results.csv, which will be created inside the running folder.<br> | ||
> <br> | ||
> ⚡<code> > ./a.out /home/os20 12 /conf.txt </code> | ||
> </summary> | ||
> </details> | ||
_____________________________________ | ||
</p> | ||
</summary> | ||
</details> | ||
_______________________________________________________ | ||
|
||
3. <details open><summary><h3> Ex3: 🗞️ Publisher: content producer-distributer-coeditor Threads Synchronization</h3></summary> | ||
<p> | ||
_____________________________________ | ||
> A program that gets a config file for products per procuder, and coediting abilities. | ||
> The program syncronizing the work of everyone by threads | ||
> <br> To create executable you can use the makefile | ||
> ⚡<code> > ./ex3.out config.txt </code> | ||
_____________________________________ | ||
</p> | ||
</summary> | ||
</details> | ||
_______________________________________________________ |
Oops, something went wrong.