session1
【Objective and Requirement】
Objective: Be familiar with the creation of process and thread on Windows.
Requirement:
Sub Task 1: Create a console application, "child", which keeps printing out "The child is talking at [system time]" (in a loop, one per 1s).
Sub Task 2: Create another console application, "parent". It create a child process to execute “child”. The "parent" process keeps printing out "The parent is talking at [system time]". (one per 1s)
Execute "parent" and explain the output you see.
Sub Task 3: Create a "winPS" program which can output information about all the running processes. Try to output details about each process, such as PID, executable file name and path, etc.
Sub Task 4: In the "mainThread" program, use "CreateThread" to create a child thread. Both the main thread and the child thread keep printing out "[ThreadID] + [System time]".
session2
Objective: Create "ps" and "kill" commands on Windows.
Requirement:
Sub Task 1: On Linux/Unix there are a "ps" command and a "kill" command. The "ps" command can list information about all the running processes. The "kill" command can terminate processes. Based on the tasks finished in Session 1, create "ps" and "kill" commands on Windows. Tips: using "TerminateProcess" to "kill" a process.
session3
Objective: Learn how to use semaphore to solve IPC problems.
Requirement:
Task 3.1. Sleeping barber
Use semaphores to solve the problem of sleeping barber.
Task 3.2. Reader & Writer
Use semaphores to solve the reader and writer problem, with the readers (and writers) have higher priority.
session4
Title: Upgrade Linux/Unix commands
Problem:
Write a program "supershell" that takes another command as an argument and executes that command. For instance, executing: “./supershell cat /usr/greg/readme" would invoke the cat command on the file /usr/greg/readme. After execution of the specified command has completed, "supershell" should display statistics that show some of the system resources the co
1