-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
102 lines (85 loc) · 2.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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