OSLAB6
OSLAB6
1. Setup:
a. Write three Python scripts: cpu_intensive.py, memory_intensive.py, and
long_running.py.
PID = 9209
b. Lower its priority using renice.
Priority range: -20 ( highest prio) : 19 ( lowest prio )
nice -n 10 python3 cpu_intensive_1.py &
nice -n -1 python3 cpu_intensive_2.py &
renice -n -10 -p PID of cpu_intensive_1.py &
renice -n 5 -p PID cpu_intensive_2.py &
Task 3: Process Termination
4. Termination:
a. Use kill to terminate long_running.py with SIGTERM and SIGKILL.
Using SIGTERM
SIGKILL