Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. id 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started