package
module
Version:
v0.0.0-...-742eee0
Opens a new window with list of versions in this module.
Published: Feb 6, 2024
License: BSD-2-Clause
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
banker
An implementation of Dijkstra's banker's algorithm in Go
Documentation
¶
func Bankers(i int, request, available []int, allocation, need [][]int) (ok bool)
Check whether request can be granted to i by computing a safe
schedule.
func Safe(available []int, allocation, need [][]int) (ok bool, schedule []int)
If the state is safe, a schedule that grants maximum resources
to all processes is returned. Otherwise, the result is false and
a partial schedule.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.