-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
46 lines (29 loc) · 794 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import (
"fmt"
"sysops/globals"
system "sysops/simulation"
)
func main() {
pageSize := 16 //bytes
manager := system.New(2048, 4096, globals.FIFO, pageSize)
manager.Reader.ReadFile("files/test.txt")
manager.Reader.Decode()
manager.Start()
fmt.Println(manager.TimeStep)
// p1 := types.NewProcess(4, 48, 16)
// p2 := types.NewProcess(3, 2048, 16)
// req := len(manager.Monitor.Requests)
// manager.Swap.View()
// manager.LoadProcess(p1)
// manager.LoadProcess(p2)
// fmt.Println(len(manager.Monitor.Requests))
// for i := 0; i < len(manager.Monitor.Requests); i++ {
// req := manager.Monitor.Requests[i]
// fmt.Printf("Type: " + req.Type + "\n")
// for j := 0; j < len(req.Logs); j++ {
// log := req.Logs[j]
// log.Print()
// }
// }
}