Skip to content

A 64 bit preemptive multitasking operating system

License

Notifications You must be signed in to change notification settings

RobinManhas/SBUNIX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SBUNIX: A 64-bit Preemptive multi-tasking OS
Team members:
Robin Manhas(111463105 [email protected])
Harsh Gupta(111470974 [email protected])
Shweta Sahu(111481846 [email protected])

Project type: Preemptive OS with support for Pipes and signals (70 point)
Submission date: 11 December 2018

========================================================================================================================
Commands Supported:

1. ls
2. ps
3. cat
4. echo
5. kill -9
6. pwd
7. cd
8. sleep
9. exit
10. export PATH=
11. export PS1 =
12. | (pipe)
13. & (run in background)
14. clear (clear screen)

========================================================================================================================
How to test ?
- ls
- ps
- cat <path of filename>
- cd /
- cd /bin
- cd ../
- export PATH= <new path>
- export PS1 =


========================================================================================================================
Features supported:

1. Physical, Virtual Memory Managers
2. 4-Level Paging, CR3 setup
3. Auto growing stack
4. Copy on Write Fork
5. Demand Paging
6. SEGV graceful handling
7. Shell with pipe '|', background process support '&' , PATH and cd.
8. Exec with elf load
9. Executing scripts with '#!'
9. Tarfs supports: open, read, close, opendir, readdir, closedir
10. Support for read(stdin), write(stdout), write(stderr)

========================================================================================================================
Syscalls supported:

1.  SYSCALL_READ
2.  SYSCALL_WRITE
3.  SYSCALL_OPEN
4.  SYSCALL_CLOSE
5.  SYSCALL_BRK
6.  SYSCALL_PIPE
7.  SYSCALL_DUP2
8.  SYSCALL_DUP
9.  SYSCALL_GETPID
10. SYSCALL_FORK
11. SYSCALL_EXECVE
12. SYSCALL_EXIT
13. SYSCALL_WAIT4
14. SYSCALL_KILL
15. SYSCALL_GETCWD
16. SYSCALL_CHDIR
17. SYSCALL_SLEEP
18. SYSCALL_PS
19. SYSCALL_PIPE



* The provided Makefile:
  1) builds a kernel
  2) copies it into rootfs/boot/kernel/kernel
  3) creates an ISO CD image with the rootfs/ contents

* To boot the system in QEMU, run:
qemu-system-x86_64 -curses -drive id=boot,format=raw,file=$USER.img,if=none -drive id=data,format=raw,file=$USER-data.img,if=none -device ahci,id=ahci -device ide-drive,drive=boot,bus=ahci.0 -device ide-drive,drive=data,bus=ahci.1 -gdb tcp::9999

Explanation of parameters:
  -curses         use a text console (omit this to use default SDL/VNC console)
  -cdrom x.iso    connect a CD-ROM and insert CD with x.iso disk
  -hda x.img      connect a hard drive with x.img disk
  -gdb tcp::9999  listen for "remote" debugging connections on port NNNN
  -S              wait for GDB to connect at startup
  -no-reboot      prevent reboot when OS crashes

* When using the -curses mode, switch to the qemu> console with ESC-2.

* To connect a remote debugger to the running qemu VM, from a different window:
gdb ./kernel

At the (gdb) prompt, connect with:
target remote localhost:9999