Fault Tolerant Diagram
This is fault tolerant because it allows the system to retry so it can keep retrying until it reaches the end.
Not Fault Tolerant Diagram
This is not fault tolerant because if the program fails, then the code cannot reach the end.
import time
startingtime = time.time()
for x in range(10):
print(x)
endingtime = time.time()
print("Time:", endingtime - startingtime)
0
1
2
3
4
5
6
7
8
9
Time: 0.007156848907470703
import time
import multiprocessing
startingtime = time.time()
def printNum(num):
print(num)
if __name__ == '__main__':
pool = multiprocessing.Pool(processes=5)
pool,map(printNum, range(10))
pool.close()
pool.join()
endingtime = time.time()
print("Your new time is: ", endingtime-startingtime)