From b063afbced414c7960aa416bcdb44f26afea9bbd Mon Sep 17 00:00:00 2001 From: Udit Arora Date: Tue, 13 Mar 2018 17:10:11 +0530 Subject: [PATCH] Add docstring at the beginning of all .py files --- algos/cpu_scheduling.py | 4 ++++ algos/deadlock.py | 4 ++++ algos/disk_scheduling.py | 4 ++++ algos/memory_allocation.py | 4 ++++ algos/page_replacement.py | 4 ++++ main.py | 4 ++++ screens/cpu_screens.py | 5 +++++ screens/deadlock_avoidance_screens.py | 5 +++++ screens/deadlock_detection_screens.py | 5 +++++ screens/disk_screens.py | 5 +++++ screens/memory_screens.py | 5 +++++ screens/page_screens.py | 5 +++++ 12 files changed, 54 insertions(+) diff --git a/algos/cpu_scheduling.py b/algos/cpu_scheduling.py index 7f0ad5f..7d79bc2 100644 --- a/algos/cpu_scheduling.py +++ b/algos/cpu_scheduling.py @@ -1,3 +1,7 @@ +''' +This file contains the implementation of CPU Scheduling algorithms +''' + from sys import maxsize from operator import itemgetter import Queue diff --git a/algos/deadlock.py b/algos/deadlock.py index 8ff414e..177b4b0 100644 --- a/algos/deadlock.py +++ b/algos/deadlock.py @@ -1,3 +1,7 @@ +''' +This file contains the implementation of Deadlock Detection and Avoidance algorithms +''' + import copy # Bad input case(s): diff --git a/algos/disk_scheduling.py b/algos/disk_scheduling.py index 8f89b52..99f77c2 100644 --- a/algos/disk_scheduling.py +++ b/algos/disk_scheduling.py @@ -1,3 +1,7 @@ +''' +This file contains the implementation of Disk Scheduling algorithms +''' + from sys import maxint from random import choice diff --git a/algos/memory_allocation.py b/algos/memory_allocation.py index fa83a98..bc7b612 100644 --- a/algos/memory_allocation.py +++ b/algos/memory_allocation.py @@ -1,3 +1,7 @@ +''' +This file contains the implementation of Memory Allocation strategies +''' + from operator import itemgetter from copy import deepcopy diff --git a/algos/page_replacement.py b/algos/page_replacement.py index 578a439..96b44c8 100644 --- a/algos/page_replacement.py +++ b/algos/page_replacement.py @@ -1,3 +1,7 @@ +''' +This file contains the implementation of Page Replacement algorithms +''' + from copy import deepcopy from sys import maxint from random import randint diff --git a/main.py b/main.py index 92b72c4..24d1803 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,7 @@ +''' +This file defines the Kivy app and loads the screens and their layouts +''' + # Kivy libraries from kivy.app import App from kivy.lang import Builder diff --git a/screens/cpu_screens.py b/screens/cpu_screens.py index dfed099..a260689 100644 --- a/screens/cpu_screens.py +++ b/screens/cpu_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +CPU Scheduling algorithms +''' + # Kivy libraries from kivy.core.window import Window from kivy.graphics import Color, Rectangle diff --git a/screens/deadlock_avoidance_screens.py b/screens/deadlock_avoidance_screens.py index 5b0bfdf..475e3ac 100644 --- a/screens/deadlock_avoidance_screens.py +++ b/screens/deadlock_avoidance_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +Deadlock Avoidance algorithms +''' + # Kivy libraries from kivy.properties import ObjectProperty from kivy.uix.scrollview import ScrollView diff --git a/screens/deadlock_detection_screens.py b/screens/deadlock_detection_screens.py index 6f10f60..575b029 100644 --- a/screens/deadlock_detection_screens.py +++ b/screens/deadlock_detection_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +Deadlock Detection algorithms +''' + # Kivy libraries from kivy.properties import ObjectProperty from kivy.uix.scrollview import ScrollView diff --git a/screens/disk_screens.py b/screens/disk_screens.py index 7074ad9..3836fff 100644 --- a/screens/disk_screens.py +++ b/screens/disk_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +Disk Scheduling algorithms +''' + # Kivy libraries from kivy.core.window import Window from kivy.graphics import Color, Line diff --git a/screens/memory_screens.py b/screens/memory_screens.py index 70dd750..91cbd2e 100644 --- a/screens/memory_screens.py +++ b/screens/memory_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +Contiguous Memory Allocation Strategios +''' + # Kivy libraries from kivy.core.window import Window from kivy.graphics import Color, Rectangle diff --git a/screens/page_screens.py b/screens/page_screens.py index 35f7427..92628b7 100644 --- a/screens/page_screens.py +++ b/screens/page_screens.py @@ -1,3 +1,8 @@ +''' +This file contains the classes, functions and globals used for visualizing +Page Replacement algorithms +''' + # Kivy libraries from kivy.core.window import Window from kivy.properties import ObjectProperty, NumericProperty