1 Project created for passing Operating Systems subject in
2 High School of Information Technology
8 Without bootstrap program
9 =========================
11 In separate terminals enter:
16 After that in terminal with process1 running enter some characters followed by
19 - Process1 displays information about data buffer and how many bytes has been
21 - Process2 displays information about received bytes, prints to stderr info
22 about number of characters in buffer, and sent this value to process3.
23 - Process3 displays information about number of entered characters.
25 With bootstrap program
26 ======================
28 In terminal, go to the ./bin directory (where compiled programs resides).
32 After that there should be shown info about spawning new processess.
33 You can now pass to the standard input of the first spawned process data, .e.g:
34 $ echo "qwertyuiop" > /proc/(process 0 pid)/fd/3
36 If process creation was completed without errors, you should see following output:
37 [process2] Fetched: 11 bytes
38 [process2] Calculated: 10 characters. Sending...
39 [process3] Fetched: 4 bytes
40 [process3] Process2 send: 10
45 After bootstrapping processes, you can send them signals.
46 Processes registers custom handlers for following ones:
47 - SIGUSR1 (User defined signal 1) - used for internal purposes. Signal must be
48 sent in pair with message queue.
49 - SIGTERM (Terminated) - additionaly to standard behaviour, this signal allows
50 releasing aquired resources and notify other processes using SIGUSR1 to do the
52 - SIGTSTP (Stopped) - additionaly to standard behaviour, this signal allows
53 holding aquired resources (closes pipes for example), and notify other
54 processes using SIGUSR1 to do the same.
55 - SIGCONT (Continued) - aditionaly to standard behaviour, this signal allows
56 resume process working by opening closed pipes, and notify other processes
57 using SIGUSR1 to do the same.