40 lines
923 B
Typst

#import "utils.typ": task, display-processes, RUNNING
#import "algorithms.typ": FCFS, Pr, SRTF, RR
#set document(title: "Process scheduling algorithms")
#set page(height: auto)
#set text(font: "Source Sans 3")
#let tasks = {
task(1, 0, 10, 3)
task(2, 20, 40, 2)
task(3, 30, 20, 2)
task(4, 60, 10, 3)
task(5, 80, 30, 1)
task(6, 90, 20, 1)
task(7, 100, 50, 3)
task(8, 130, 30, 2)
task(9, 180, 10, 3)
task(10, 200, 60, 1)
}
#text(size: 1.2em)[*Process scheduling algorithms*]
#figure(
display-processes(..FCFS(tasks)),
caption: [Process scheduling: FCFS]
)
#pagebreak()
#figure(
display-processes(..Pr(tasks), display-priorities: true),
caption: [Process scheduling: Pr]
)
#pagebreak()
#figure(
display-processes(..SRTF(tasks), display-durations: (RUNNING,)),
caption: [Process scheduling: SRTF]
)
#pagebreak()
#figure(
display-processes(..RR(tasks)),
caption: [Process scheduling: RR]
)