Project in CEN232 Operating Systems @ International Burch University.
https://github.com/saba8814/SweBosShell.git
Explore the docs »
Table of Contents
SweBosShell is a project submission in course CEN232 Operating Systems at International Burch University. SweBosShell is a project done by Ejub Šabić(currently living in Sweden) & Saliha Mustafić(currently living in Bosnia & Herzegovina), thus the name Swe(den)Bos(nia)Shell. Project is consisted out of three parts: shell.c is a solution to 1.1, 1.2. and 1.4 tasks, task3.c is a solution to task 1.3 and also imploments 1.4, while answers.pdf has answers to questions given in 1.5.
shell.c has implementations for the following commands:
- uptime
- mkdir
- help
- sl
- ls
task3.c has implementations for the following system calls:
- fork()
- vfork()
- exec() - executes shell script from tasks 1.1 and 1.2
- execl() - executing ls -lh /home
- forkbomb - crashing PC using fork()
answers.pdf has answers for the following questions: *The following actions, do they require the OS to use kernel mode or user mode is sufficient? Explain. Starting a new process. Multiplying two floating numbers stored in an application’s memory.Writing the results of the multiplication to a temporary log file on disk. *Explain the purpose of a system call. Describe how control passes to the kernel when executing a system call.
Project was made using C programming language in Linux Operating System that runs VS code.
This is an explanation of how to download and run this your project locally. To get a local copy and run them follow these simple example steps.
Prerequisite to run this projects is to be running Linux Operating System as it follows and uses UNIX sys calls, but running on other UNIX based OS' might have some errors.
- Clone the repo
git clone https://github.com/saba8814/SweBosShell.git
- Compile shell.c using gcc compiler
gcc shell.c -o shell
- Compile task3.c using gcc compiler
gcc task3.c -o task3
- Run using ./shell for shell or ./task3 for task3
Shell part provides you with help command:
help - gives list of all available commands
help [command] - gives explanation how given command is used
Task3 part provides you with interactive menu that is navigated through using standard keyboard input:
Below are the resources we used during project implementation:
C file input and output
Exec family functions
Fork system call
- Folder - headers ---> contain following files:
colors.h; command_handler.h; command_handler_task3.h; execexample.h; forkbomb.h; forkexample.h; help.h; ls.h; mkdir.h; sl.h; timer.h; uptime.h; vforkexample.h; waitexample.h - README.md
- answers.pdf ---> contains answers to the questions of task 1.5
- shell.c
- task3.c file
Ejub Šabić - @ejub.sabic - [email protected]
Saliha Mustafić - @iamsaliha - [email protected]