Skip to content

saba8814/SweBosShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

SweBosShell

Project in CEN232 Operating Systems @ International Burch University.
https://github.com/saba8814/SweBosShell.git
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Resources
  5. Project files that are submitted
  6. Contact

About The Project

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.

(back to top)

Built With

Project was made using C programming language in Linux Operating System that runs VS code.

(back to top)

Getting Started

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.

Prerequisites

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.

Installation

  1. Clone the repo
    git clone https://github.com/saba8814/SweBosShell.git
  2. Compile shell.c using gcc compiler
    gcc shell.c -o shell
    
  3. Compile task3.c using gcc compiler
    gcc task3.c -o task3
    
  4. Run using ./shell for shell or ./task3 for task3

(back to top)

Usage

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:

(back to top)

Resources

Below are the resources we used during project implementation:
C file input and output
Exec family functions
Fork system call

(back to top)

Project files that are submitted:

  1. 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
  2. README.md
  3. answers.pdf ---> contains answers to the questions of task 1.5
  4. shell.c
  5. task3.c file

(back to top)

Contact

Ejub Šabić - @ejub.sabic - [email protected]
Saliha Mustafić - @iamsaliha - [email protected]

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages