We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b32ba71 commit b3b8719Copy full SHA for b3b8719
1 file changed
main.py
@@ -0,0 +1,34 @@
1
+from kernel.kernel import *
2
+
3
+proc_code1 = '''
4
+print(f"USER: Started with PID {pid}")
5
6
+request = {
7
+ "cmd": "write",
8
+ "path": "/home/log.txt",
9
+ "data": "в 14:35 напомни!!!",
10
+ "client_pid": pid,
11
+ "reply_pipe": 1
12
+}
13
+request2 = {
14
+ "cmd": "cat",
15
16
17
18
19
20
+print(f"USER: Writing and reading /home/log.txt via pipe 0...")
21
22
+await send(0, request, pid)
23
+await recv(1, pid)
24
25
+await send(0, request2, pid)
26
+data = await recv(1, pid)
27
28
+print(f"USER: Result from FS: {data}")
29
+'''
30
31
+if __name__ == "__main__":
32
+ create_proc(proc_code1, 1)
33
+ boot()
34
+ asyncio.run(scheduler())
0 commit comments