Skip to content

Operating System: Banker's Deadlock Avoidance Algorithm (Hardcoded) Implementation in Python (Using Numpy aka Numerical Python)

License

Notifications You must be signed in to change notification settings

SyedMuhammadMuhsinKarim/Bankers-Algorithm-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Bankers-Algorithm-in-Python (Using Numpy)

Operating System: Banker's Deadlock Avoidance Algorithm (Hardcoded) Implementation in Python (Using Numpy aka Numerical Python)

Examples taken by Book: Operating System by William Stallings

Implementation

if __name__ == '__main__':
    claim = np.array([[3, 2, 2], [6, 1, 3], [3, 1, 4], [4, 2, 2]])
    allocation = np.array([[1, 0, 0], [6, 1, 2], [2, 1, 1], [0, 0, 2]])
    resources = np.array([9, 3, 6])
    
    processes = processes_order(allocation, claim, resources)
    print ("Processes: ", processes)

About

Operating System: Banker's Deadlock Avoidance Algorithm (Hardcoded) Implementation in Python (Using Numpy aka Numerical Python)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages