Add HDDACCESS and WRITEBACK metric

- Cache average access time for write-back policy
- HDD average access time using RPM and head-seek time
This commit is contained in:
dheatovwil 2020-06-23 02:40:06 +08:00
parent d7e05b9efe
commit 92fd83a4aa
2 changed files with 17 additions and 0 deletions

7
hddaccess Executable file
View File

@ -0,0 +1,7 @@
#!/bin/python
rpm = int(input("RPM? "))
headseek = int(input("AVG head seek? (ms) ")) # ms
rotlat = 60/rpm/2 * 1000 # ms
print(headseek+rotlat)

10
writeback Executable file
View File

@ -0,0 +1,10 @@
#!/bin/python
perchit = float(input("PERCENT HIT? "))
percw = float(input("PERCENT WRITE? "))
cacher = int(input("CACHE READ TIME? "))
cachew = int(input("CACHE WRITE TIME? "))
memr = int(input("MEM READ TIME? "))
memw = int(input("MEM WRITE TIME? "))
print(perchit*percw*cachew + perchit*(1-percw)*cacher + (1-perchit)*percw*memw + (1-perchit)*(1-percw)*memr)