Question: 2. Write a python program which do the following: 2.1. Create two processes and one queue. 2.2. The first process must put commands into the
2. Write a python program which do the following: 2.1. Create two processes and one queue. 2.2. The first process must put commands into the queue. The commands are 2.2.1. 1d 2.2.2. whoami 2.2.3. pwd 2.2.4. Is 2.2.5.cat 2.3 The second process must get the elements from the queue and execute them using the os module. If the command is cat, then the script must ask the user for the file name to view its contents 2.4 Note: Don't forget to use a proper lock to prevent any errors in the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
