Synchron - ITS An Interactive Tutoring System to Teach Process Synchronization and Shared Memory Concepts in an Operating Systems Course Manoj Kumar Putchala Graduate Research Assistant Wright State University Dayton, Ohio - USA
Synchron - ITSAn Interactive Tutoring System to Teach Process Synchronization
and Shared Memory Concepts in an Operating Systems Course
Manoj Kumar Putchala
Graduate Research Assistant
Wright State University
Dayton, Ohio - USA
Overview
What : OS Course Work
Core Course in Computer Science Curricula across worldwide institutions Complicated coursework, and the internal processes and mechanisms are often difficult for students to grasp, particularly those that still struggle with programmingHigh level abstractions of structures and algorithms are taught in class followed by homework or project assignments What many students need is a way to connect the low-level details of an operating system’s implementation with the high-level abstractions provided in the class, all while being accessible to people who are still improving newly-acquired programming skills.
What : Synchronization Concepts
Process synchronization: when two or more processes share memory, they should access it in an orderly fashion to avoid race conditions and deadlocks.
Producer-Consumer Problem
Process Synchronization using Mutex
Critical Section Problem
Monitor solution for Producer-Consumer Problem
Dining Philosopher Problem
What : Tool Introduction Three step process :
1) Demonstrate the concepts and algorithms at high level
2) Self-Validate the understanding levels of concepts through an inquiry based system
3) Integrate the high-level models with low-level information collected from a running operating system
Engages Critical Thinking
Multi-purpose – Simulator and Tutor
Monitoring and Control
Visual and Interactive Graphics
Why : Past Systems Operating systems run in supervisor mode which makes it more difficult to use the standard debugging methods students are used to.
Instructional Operating Systems : Geek OS – “bare-hardware” approach but contains a substantial amount of source code (4,202 lines for Geek OS and 14,886 lines of MINIX) Nachos-OS, ICS-OS, Pintos and RCOS and Simple-OS – have poor visualization graphics Dex-OS – Written in FASM assembly code and C, covers only memory management concepts
Tutoring Systems: Proc_OS and Alg_OS – Provide only visualization of theoretical concepts but lack practical task training
Why : Mission Need Must be easy to use, easy to understand, and accessible for students who have limited knowledge of systems-level programming in C or assembly language,
Must present theoretical concepts, data structures, and algorithms involved with synchronization and shared memory, similar to the box-and-line diagrams found in Operating Systems textbooks,
Must allow a student to interact with the tool to explore those concepts, data structures, and algorithms work,
Must present realistic source code examples that can help students connect theory to implementation details, and
Must collect, integrate, and visualize data from a running operating system so students can see the implementation details in motion.
How: Approach UC1. Select log in type (guest user or registered user).
UC2. Create user account (if registered user).
UC3. Select a concept from concept list.
UC4. Choose a mode (Simulator, Manual, or Self-check).
UC5. Estimate and validate self-check results.
UC6. Logout.
How: Implementation UI-1
Implemented using JAVA – JSwing.
The home page lists the concepts to be taught
A user account is required to access the system, so the first time a user access it, he or she creates a new user account and logs into the application with valid credentials.
An administrator account is used for teachers to evaluate students’ performance.
How: Implementation UI-2
Producer-Consumer Problem: Two CPU
threads, the one that produces data and the other
that consumes it
Both share a data variable (in this case a
counter), which may cause inconsistency or errors
due to improper signaling or synchronization.
Synchron-ITS implements multithreading
techniques using POSIX threads in Java to
demonstrate this problem.
How: Implementation UI-3
Critical Section – program code that
contains crucial operations
No two processes are allowed to be in
their critical sections at the same time
Synchron- ITS shows five
different solutions for this problem, each
with its own disadvantage, followed by
an improved solution.
How: Implementation UI-4 Mutex – Binary Semaphores with values 0 and 1
Context Switch Mechanism
Initial value of Mutex is 1
Process gets blocked when the mutex value is less than 0
Process gets unblocked when values turns to 1
Busy Waiting Problem is an issue here
How: Implementation UI-5 Monitor: An Abstract Data Type wheremultiple process defined in the monitor are executed at one time Monitors resolve timing errors caused by Semaphores Use of wait () and signal () operations on conditional variables ‘x’ and ‘y’
How: Implementation UI-6 Dining Philosophers Problem: N-Philosophers with N-Chopsticks at a circular table
Each philosopher requires two chop sticks to have rice from the bowl (processes requiring resources)
Possible States – Thinking, Eating
Synchronization is achieved by using shared semaphores along with primitive operations wait () and signal ()
How: Modes of Operation - AutonomousThree Modes of Operation :
a) Autonomous
b) Real-Time
c) Self-Validation
Autonomous: Algorithms execute with no interruption until it has completed Default Parameters are either taken from the database or hard-coded
How: Modes of Operation – Real Time The system will draw data from a running Linux system so users inspect the behavior of the operating system.
Synchron-ITS is written in the Java programming language, and modules for accessing data from the operating system are written as callable C programs in Linux.
Synchron-ITS accesses them using inter-process communication (IPC) through method calls to the Java Native Interface (JNI).
How: Modes of Operation – Self Validation Program steps into a crucial step in the algorithm and prompts the user to guess the values that will result upon completion of that step.
If the student’s estimated output is incorrect, the system presents a message containing the actual correct values and an explanation as to possible misunderstandings that might have caused the error.
Errors are captured and corrective actions are recommended
How: Programming Assignments The tool provides a set of small and focused programming assignments to implement concurrency in C and Java. The list of concurrency assignments are:
Implement a synchronization primitive to block multiple process that are depending on an event to get triggered;
Implement a mutex mechanism for multiple processes by a user-space daemon;
Implement a monitor solution for the dining philosophers problem; and
Select and implement an appropriate concurrency primitive which is efficient and correct for a various synchronization problems.
How: Test Cases Black Box Testing
UI Testing
Start Pause Resume Terminate buttons
Integration Testing
Regression Testing
Stress Testing
How: Technology Acceptance Model Selection of participants,
Testing procedure
Questionnaire
Perceived usefulness
Intention
Attitude toward its use
Subjective norm
Perceived ease of use
Where : Present & FuturePresent: Version 1 is developed
User Experiments are yet to be done on Spring Students
5 programming assignments
Kernel Programming Approach
Future: Version 2 3D visualizations – using Java 3D and Unity 3D
Integration to Mobile Platform
Experimenting with users (students and researchers)
Where : Summary Anticipated Benefits
Education Resource for Academic Community
Reduce the difficulties for both the transmission of the concepts and for better understanding
Reverse Engineering Tool
OS Simulator
Helps the students or researchers to develop a Operating System from scratch
Programming Benefits
Questions & Collaborations? Manoj Kumar Putchala, (937) 782-8653 [email protected]
Primary Research Work : Internet of Things (IoT) Security using Machine Learning
- Thank you