Skip to content

kabragaurav/Conflict-Serializability-Code-Python

Repository files navigation

A program which shall read a concurrent schedule involving n transactions with read and write instructions on data items from an input file and find whether the schedule is Conflict Serializable or not (using the graph-based method).
In case of conflict serializable schedule, the program also gives the serializability order and for non-serializable schedule, give the cycle(s) present in the graph.
The program should be able to handle any finite number of transactions and data items.

Author : Gaurav Kabra

Input:

Input file name is asked. Here three sample files have already been provided.
Input1 is about cycle.
Input2 is CS.
Input3 is again about cycle but only a part is cyclic unlike case#1 where whole graph was cyclic.
Input4 is of only one transaction.
Input5 is when input format is violated.

Run

Type python driver.py
and that's it!

Version

I am using Python 3.7. However, any version of Python 3 should work fine.

Bug-reporting

However tested on many random schedules, bugs may be there. Kindly report that to gauravkabra.official@gmail.com or create a Pull request.

About

Find if CS or not. And if not then print ALL cycles in the graph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages