-
Notifications
You must be signed in to change notification settings - Fork 12
/
structure.dot
150 lines (135 loc) · 3.78 KB
/
structure.dot
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
digraph LensorOS {
graph [ rankdir=LR, overlap=false];
libc_fopen -> sys_open;
libc_fclose -> sys_close;
libc_fread -> sys_read;
libc_fwrite -> sys_write;
libc_fseek -> sys_seek;
libc_exit -> sys_exit;
libc_system -> sys_fork;
libc_printf -> sys_write;
libc_fputc -> sys_write;
libc_fputs -> sys_write;
libc_scanf -> sys_read;
libc_fgetc -> sys_read;
libc_fgets -> sys_read;
sys_open -> "VFS::open()";
sys_close -> "VFS::close()";
sys_read -> "VFS::read()";
sys_read -> "Scheduler::yield()"[style="dotted"];
sys_write -> "VFS::write()";
sys_write -> "Scheduler::yield()"[style="dotted"];
# sys_poke;
sys_exit -> "Scheduler::remove_process()";
sys_exit -> "Scheduler::yield()";
sys_map -> "Memory::map_pages()";
sys_map -> "Memory::request_pages()";
sys_unmap -> "Memory::unmap_pages()";
sys_unmap -> "Memory::free_pages()";
# sys_time;
sys_waitpid -> "Scheduler::yield()"[style="dotted"];
sys_fork -> "Scheduler::add_process()";
sys_fork -> "Memory::map_pages()";
sys_fork -> "Memory::request_pages()";
sys_fork -> "VFS::add_file()";
sys_exec -> "Scheduler::add_process()";
sys_exec -> "VFS::open()";
sys_exec -> "VFS::close()";
sys_exec -> "VFS::read()";
sys_exec -> "Memory::request_pages()";
sys_exec -> "Memory::map_pages()";
sys_exec -> "Scheduler::yield()";
sys_repfd -> "VFS::dup2()";
sys_pipe -> "VFS::add_file()";
# sys_seek;
# sys_pwd;
sys_dup -> "VFS::dup()";
# sys_uart;
sys_socket -> "VFS::add_file()";
# sys_bind;
# sys_listen;
# sys_connect;
sys_accept -> "VFS::add_file()";
sys_accept -> "Scheduler::yield()"[style="dotted"];
# sys_kqueue;
# sys_kevent;
sys_directory_data -> "VFS::directory_data()";
"Scheduler::remove_process()" -> "Process::destroy()";
"Process::destroy()" -> "Memory::free_pages()";
"Process::destroy()" -> "VFS::close()"[style="dotted"];
subgraph cluster_libc {
label="libc";
libc_fopen;
libc_fclose;
libc_fread;
libc_fwrite;
libc_fseek;
libc_exit;
libc_system;
libc_printf;
libc_fputc;
libc_fputs;
libc_scanf;
libc_fgetc;
libc_fgets;
}
subgraph cluster_syscalls {
label="Userspace Interface";
sys_open;
sys_close;
sys_read;
sys_write;
# sys_poke;
sys_exit;
sys_map;
sys_unmap;
# sys_time;
sys_waitpid;
sys_fork;
sys_exec;
sys_repfd;
sys_pipe;
sys_seek;
# sys_pwd;
sys_dup;
# sys_uart;
sys_socket;
# sys_bind;
# sys_listen;
# sys_connect;
sys_accept;
# sys_kqueue;
# sys_kevent;
sys_directory_data;
} subgraph cluster_vfs {
label="Virtual File System";
"VFS::open()";
"VFS::close()";
"VFS::read()";
"VFS::write()";
"VFS::directory_data()";
"VFS::add_file()";
"VFS::dup()";
"VFS::dup2()";
}
subgraph cluster_sched {
label="Scheduler";
"Scheduler::add_process()";
"Scheduler::remove_process()";
"Scheduler::yield()";
}
subgraph cluster_proc {
label="Process";
"Process::destroy()";
}
subgraph cluster_pmm {
label="Physical Memory Manager";
"Memory::request_pages()";
"Memory::free_pages()";
}
subgraph cluster_vmm {
label="Virtual Memory Manager";
"Memory::map_pages()";
"Memory::unmap_pages()";
}
}