Module 2 Video 1 Processes and programs -Processes are active

Module 2
Video 1
Processes and programs
-Processes are active. (Dynamic)
Act of executing a program.

-Programs are passive. (Static)
Stored in file.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now

-A program can be run by many processes (separate or concurrent)
-A process can run many programs
-Example: Start process
Identity – user id.

During its lifetime it can run multiple programs.

-Linker: Uses relocation table to find lines of code to be replaced and then uses the symbol tables to find which functions have to be used.

-Loader: takes the output of linker and copies them to memory.

Video 2
4 things need memory:
1) global data
2) code
3) Stack
4) Heap
-In order to switch between process A and B, both processors have to be in ready state.

Video 3
Scheduling Metrics
-CPU Utilization: Total CPU busy time/total time = (total time – idle time)/total time
-Increase as much as possible
-Turnaround time: P1 = 18s, P2 = 16s
Average turnaround time = 18+16/2 = 17s
-Lowest turnaround time
-Waiting time: don’t count initial wait
It’s The time a process waits in the ready queue
P1: w1 = 3s
P2: w2 = 0s
-Reduce the wait time
-Response time: how quickly a process response
P1: r1 = 0s , P2: r2 = 2s
Avg = 0+2/2 = 1s
Video 4
Pre-emptive scheduling
Time quanta
Video 5