Parity Checking Using Turing Machine (Python and Online Simulator)

Turing Machine:

A Turing machine is a computational model, like Finite Automata (FA), Pushdown automata (PDA), which works on unrestricted grammar. The Turing machine is the most powerful computation model when compared with FA and PDA.​

The Turing Machine (TM) is the machine level equivalent to a digital computer.​

A single tape Turing machine has a single infinite tape, which is divided into cells.​ The tape symbols are present in these cells.​

A finite control is present, which controls the working of Turing machines based on the given input.​

The Finite control has a Read/write head, which points to a cell in tape.​

A Turing machine can move both left and right from one cell to another.

A general introduction to Turing Machine

Turing machine can be defined using 7-tuple:

Parity Checking:

Parity checking, which was created to eliminate data communication errors, is a simple method of network data verification and has an easy and understandable working mechanism.​

A parity check is a process that ensures accurate data transmission between nodes during communication. ​

A parity bit is appended to the original data bits to create an even or odd bit number; the number of bits with value one. ​

The source then transmits this data via a link, and bits are checked and verified at the destination. ​

Data is considered accurate if the number of bits (even or odd) matches the number transmitted from the source.​

Turing Machine:

Online Simulator:

Site: https://turingmachine.io/

Code:

input: '1011001'
blank: ' '
start state: q0
table:
  q0:
    1    : {write: 1, R: q1}
    0    : {write: 0, R: q0}
  q1:
    1      : {write: 1, R: q2}
    ' '    : {write: 1, R: q3}
    0      : {write: 0,R: q1}
  q2:
    1      : {write: 1,R: q1}
    0      : {write: 0,R: q2}
    ' '    : {write: 0,R: q3}
  q3:

State Diagram:

Python Implementation:

Turing Machine Code:

source: https://python-course.eu/applications-python/turing-machine.php

class Tape(object):
    
    blank_symbol = " "
    
    def __init__(self,
                 tape_string = ""):
        self.__tape = dict((enumerate(tape_string)))
        # last line is equivalent to the following three lines:
        #self.__tape = {}
        #for i in range(len(tape_string)):
        #    self.__tape[i] = input[i]
        
    def __str__(self):
        s = ""
        min_used_index = min(self.__tape.keys()) 
        max_used_index = max(self.__tape.keys())
        for i in range(min_used_index, max_used_index):
            s += self.__tape[i]
        return s    
   
    def __getitem__(self,index):
        if index in self.__tape:
            return self.__tape[index]
        else:
            return Tape.blank_symbol

    def __setitem__(self, pos, char):
        self.__tape[pos] = char 

        
class TuringMachine(object):
    
    def __init__(self, 
                 tape = "", 
                 blank_symbol = " ",
                 initial_state = "",
                 final_states = None,
                 transition_function = None):
        self.__tape = Tape(tape)
        self.__head_position = 0
        self.__blank_symbol = blank_symbol
        self.__current_state = initial_state
        if transition_function == None:
            self.__transition_function = {}
        else:
            self.__transition_function = transition_function
        if final_states == None:
            self.__final_states = set()
        else:
            self.__final_states = set(final_states)
        
    def get_tape(self): 
        return str(self.__tape)
    
    def step(self):
        char_under_head = self.__tape[self.__head_position]
        x = (self.__current_state, char_under_head)
        if x in self.__transition_function:
            y = self.__transition_function[x]
            #print(self.__tape,self.__head_position)
            self.__tape[self.__head_position] = y[1]
            if y[2] == "R":
                self.__head_position += 1
            elif y[2] == "L":
                self.__head_position -= 1
            self.__current_state = y[0]

    def final(self):
        if self.__current_state in self.__final_states:
            return True
        else:
            return False

Parity Checking Using Turing Machine:

initial_state = "q0",
accepting_states = ["q1","q2","q3"],
transition_function = {("q0","0"):("q0", "0", "R"),
                       ("q0","1"):("q1", "1", "R"),
                       ("q1","0"):("q1", "0", "R"),
                       ("q1","1"):("q2", "1", "R"),
                       ("q1","_"):("q3", "1", "R"),
                       ("q2","0"):("q2", "0", "R"),
                       ("q2","1"):("q1", "1", "R"),
                       ("q2","_"):("q3", "0", "R")
                       }
final_states = {"q3"}

string = "1011001__"
t = TuringMachine(string, 
                  initial_state = "q0",
                  blank_symbol="_",
                  final_states = final_states,
                  transition_function=transition_function)

print("Input on Tape:\n" + t.get_tape())

while not t.final():
    t.step()

print("Result of the Turing machine calculation:")    
print(t.get_tape())

Output:

Hope this blog is helpful and Feel free to send feedbacks and also to comment on my blogs for my further improvements.

Get contents delivered to your mail ID by entering your mail ID on the HOME page.

1D array Convolution Function in Java

Function:

public double[] conv1D(double[] a,double[] b) {
    if (a.length<b.length) {double[] temp = a;a=b;b=temp;}

    double[] retArr = new double[a.length+b.length-1];
    for(int i=0;i<retArr.length;i++) {

        double temp = 0;
        int rem = (int) Math.floor(i/b.length);
        int jt = 0;
        int jtfin=0;
        int r = 0;
        if(i>=a.length) {jtfin=a.length-1;}
        else {jtfin = i;}
        if(i>=b.length) {jt=(i%b.length)+rem+((b.length-1)*(rem-1));}
        if (i>=a.length) {r = i-a.length+1;}

        for(int j=jt;j<=jtfin;j++) {
            temp=temp+a[j]*b[jtfin-j+r];
        }
        retArr[i] = temp;

    }
    return retArr;
}

Example:

Example 1:

For inputs with different length

Example 2:

For inputs with the same length

How To Analyze .tflite Models w.r.t size?

We will straightly dive into the analysis part. To know about post-training quantization (theory) click here

STM32CubeMX

This software is used to analyze our tflite models w.r.t to size. It is a graphical tool for STM32 microcontrollers. To know more about this software click here

How to use it?

Install STM32CubeMX software. Open and click ‘Access to Board Selector’. You can use any board, I have used NUCLEO-H745ZI-Q. Double click on the board in the board list. Give Yes to ‘Initialize all peripherals with their default mode’ unless you want to change something.

Software Packs > Select Components

Under STMicroelectronics X-CUBE-AI, Under Artificial Intelligence X-CUBE-AI check the core, and Under Device Applications select SystemPerformance (You select as per your choice). Finally, click ok.

Under Software Packs, click on STMicroelectronics X-CUBE-AI

Click on ‘add network’. Give model name and under dropdown list select tflite and in the second dropdown list select STM32Cube.AI runtime (You can change if you want)

Browse and Load the model. Click on analyze. Once the analysis is finished you will get the model report in the specified location mentioned in it. After analyzing click on show graph to know about each layer.

NOTE: You will see there will be no conversion layer for no quantization and dynamic quantization tflite model.

Analysis w.r.t Size

No quantization

Code:

Model Summary:

Dynamic Quantization:

Code:

Model Summary:

Integer Only Quantization

Code:

Model Summary:

Float-Fallback Quantization

Code:

Model Summary:

From the above summaries, we can see how the different quantization methods works on optimizing different parameter. Model with dynamic quantization have more weights and model with integer only quantization has lesser ram usage. Furthermore, can be interpreted from the above images.

Creating A Cluster And Launching A Spark-Shell (Apache Spark)

In this blog we will see how to make a local spark with a master and three workers followed by launching a spark-shell on it.

Creating the Master Class:

I have already installed the spark (spark-3.1.1) and now we will start the master class using the following command(Should be executed inside the bin folder):

spark-class org.apache.spark.deploy.master.Master

Red Box – Master URL, Green Box – MasterWebUI URL

Note: Do not Close These Terminal. Closing it will end the master.

You can see the master web UI by copying and pasting the URL in a web-browser.

Master Web UI:

Creating the Workers:

Copy paste the following command in different terminals to create multiple workers

spark-class org.apache.spark.deploy.worker.Worker (Master URL)

After executing this command, you will be able to see ‘successfully registered’ text in the end

After creating the workers, you will be able to see this in your command prompt where the master class is running.

Refresh the webUI page to view about the workers. Since the workers do not communicate with each other, each worker thinks they are running on a seperate machine but in actual they are running on the same machine. So each will show the machine’s full resource.

Launching the Spark-shell:

To launch the spark-shell, use the following command.

spark-shell --master (Master URL)

After executing this command, you will be able to use the spark-shell that is connected to the master.

Yellow Box – Job UI URL

We can view the Job UI using the URL.

After executing it and by refreshing the master web UI, we can see there will be a new application running in the name of spark shell. By clicking it we can see more information about the application.

Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future. You can also comment you queries which will be helped out ASAP.

One-Way ANOVA and F-Test (MATLAB Simulation)

This blog will expose you to the MATLAB Simulation of One-Way ANOVA which uses F-test to statistically test the equality of means

One-Way ANOVA

The one-way analysis of variance (ANOVA) is used to determine whether there are any statistically significant differences between the means of three or more independent (unrelated) groups. Specifically, it tests the null hypothesis.

Null Hypothesis: All means are equal

Alternate Hypothesis: All means are not equal

F-Test

An F-test is any statistical test in which the test statistic has an F-distribution under the null hypothesis. F-statistics are based on the ratio of mean squares where the term ‘mean squares’ refers to the estimate of population variance that accounts for the DOF (degree of freedom) used to calculate that estimate.

Learn more about One-Way ANOVA and F-test at here

MATLAB Code

clear all;close all;clc;
clf;
rng(12345);
sigma=2; % standard deviation
mu=100; % mean
m=10; % number of data in each column
n=5; % number columns (no of population)
% Repeat the experiment for 100,000 times
for i=1:100000
A=normrnd(mu,sigma,m,n);%means at all levels are equal
%so null hypothesis is true
[m,n]=size(A);
ytbars=sum(A)/m;
ybar=sum(ytbars)/n;
ytbarsmatrix=repmat(ytbars,m,1);
ybarmatrix=ybarones(m,n); SSTotal=sum(sum((A-ybarmatrix).^2)); SSbetween=sum(sum((ytbarsmatrix-ybarmatrix).^2)); SSError=sum(sum((A-ytbarsmatrix).^2)); dfbetween=n-1; dfError=mn-n;
MSbetween=SSbetween/dfbetween;
MSError=SSError/dfError;
Fcomputed(i)=MSbetween/MSError;
end
endpoint=floor(max(Fcomputed)+1);
[f,xi] = ksdensity(Fcomputed,0:0.1:endpoint);
subplot(1,2,1);
plot(xi,f,'r-','LineWidth',2);
title('Computed F-density Function');
f=0:0.001:8;
y = fpdf(f,n-1,m*n-n);
subplot(1,2,2);
plot(f,y,'B-','LineWidth',2);
title('Theoretical F-density Function');
% Expected value of the F distribution (through simulation)
Fmean=mean(Fcomputed);
disp('Theoretical Expected value of F distriution=1');
disp('Computed Expected value of F distriution=');
disp(Fmean);
if round(Fmean)==1
disp("Accept Null Hypothesis")
else
disp("Reject Null Hypothesis")
end

Output

Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future.

Multiclass Classification on iris dataset using LSTM(Keras)

In this blog, we will straightly dive into the python code instead of briefing the concepts.

Importing Required Libraries

Loading the Dataset

Preprocessing the Data

Train-Test Split

Creating the Model

Evaluating the Model

Hope this blog is helpful and Feel free to send feedbacks and also to comment on my blogs for my further improvements in the future.

Get contents delivered to your mail ID by entering your mail ID on the HOME page.

Dot Plot using Python and JavaScript

In this blog we will be creating a dot plot using python and JavaScript for visualizing and getting the common subsequences.

Dot plot are 2D graphs showing a comparison of two sequences where the top X axis and left Y axis are used to represent the two sequences. A dot is plotted at every coordinate where there is similarity between the bases.

Dot Plot Interpretation

For example consider both the sequences (S1 and S2) are same.

S1=ATGATAT S2=ATGATAT

Dot Plot:

Dot Plot for S1 and S2

Subsequence which are common in both sequence are present diagonally including the principal diagonal, forward and backward diagonals

Interpretation:

  1. Region of Similarity appears as diagonals with dot
  2. Multiple diagonals indicate repetitions
  3. Formation of box indicates the low complexity region
  4. Reverse diagonal indicates inversion
  5. Reverse diagonal crossing the principal diagonal indicates palindromes

Principal Diagonal: If a principal diagonal is present, then those sequences are identical.

Principal Diagonal

Backward Diagonals: Sequence of nucleotides that are followed downstream by its reverse complement.

Backward Diagonals

Forward Diagonals: Forward diagonals represents the similar subsequences.

Short diagonals are known as noise as it hinders the capability to recognize the other diagonals and it must be removed. The length of the short diagonals can be obtained by observing the Dot matrix

Forward Diagonals

Python Code: Code output for two random sequence is give below.

The code is available at https://github.com/Prasanth-s-n/Bioinformatics/

Output:

Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future.

Thank you.

Inverse Kinematics of KUKA KR3 R540

Inverse Kinematics

It is done for determining the joint variables in terms of the end-effector position and orientation. To control the configuration of the end-effector to reach an object, the inverse kinematics solution must be solved. Hence we need to know what are the required values of joint variables to reach a desired point in a desired orientation

DH Parameters

Denavit-Hartenberg (1955) method that uses four parameters is the most common method for describing the robot kinematics. Denavit & Hartenberg showed that a general transformation between two joints requires four parameters. These parameters known as the Denavit-Hartenberg (DH) parameters have become the standard for describing robot kinematics.

First, we start by defining the z axis along the axis of rotation for revolute joints or the axis of translation for prismatic joints. For the first joint the x axis is a free choice. For later joints each x axis will point away from the previous joint. If we add another joint, we can determine the transformation between them as before the z axis points along the axis of rotation. The DH parameters will be derived from the common normal between these z axes. The common normal is orthogonal to both vectors as also the shortest line between them. The new x axis points along the common normal and has its origin at the intersection of the new z. Using this protocol for laying out the reference frames only for parameters are needed the first of these. d is the depth along the previous joint z axis from the origin to the common normal. Theta rotates about the previous z-axis to line the x-axis. r is the length of the common normal itself. This is also the radius of revolution for the new origin about the previous Z. alpha rotates about the new x-axis to bring Z into alignment with the axis of joint motion.

DH Parameters for KUKA KR3 R540 is given below

Decoupling Technique

It is possible to decouple the inverse kinematics problem into two sub-problems known as inverse position and inverse orientation kinematics. the practical consequence of such a decoupling is the allowance to break the problem into two independent problems each with only three unknown parameters.

Solution of the inverse kinematics problem starts with the wrist position followed by the orientation of the wrist. Wrist position depends only on the θ1, θ2 and θ3 angles, which can be determined geometrically and the orientation of the wrist depends only on the θ4, θ5 and θ6 which can be determined using the algebraic method.

Inverse Position

Geometric Analysis

Finding θ1 : For finding the θ1 we need to first find P04 which can be obtained by a translation d6 under the z6 axis from the joint 6, P06.

Finding θ2 : Before finding the θ2 as we can see from the geometric analysis figure shown above, we need to P14 ,  γ and ω. ω can be obtained using the cosine law of SSS triangle.

where n = [-1,1] because of the z-axis

Finding θ3 : You can either start finding θ2 first or θ3 . Since we obtained P14, we need to find the β and α. β can also be obtained by using the cosine law for SSS triangle. Considering that the sum of the internal angles of any triangle equal to π and then the adjacent angles equal to π-β.

Inverse Orientation

Through the rotation matrix (4R6) we can obtain the other three joint variables namely θ4, θ5,and θ6.

Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future.

Thank you.

FM Broadcasting using ADALM PLUTO and MATLAB (Simulink) and Receiving in Phone

FM Broadcasting

It is a method of radio broadcasting using frequency modulation which was invented in 1933 by an American engineer Edwin Armstrong. Wide band FM is used world-wide to provide high fidelity sound over radio broadcast. FM broadcasting can reproduce the original program sound more accurate that other broadcasting technologies such as AM broadcasting. Therefore, FM broadcasting is used for most broadcasts of music or general audio. FM radio stations use very high frequency range to transmit over longer range. The FM broadcast band falls within the very high frequency (VHF) part of the radio spectrum. The range that is being used is minimum of 87.5MHz and maximum of 108.0MHz. This band is referred to as the International Radio Consultative Committee (CCIR) band. In some former Easter Bloc countries and also in the former Soviet republics uses the 65.8MHz to 74MHz band with assigned frequencies at the intervals of 30KHz. This band is also sometime referred to as the OIRT (International Radio and Television Organization) band. The band of 76MHz to 95MHz is used in Japan.

SDR

SDR is a radio communication system where components that have been traditionally implemented in hardware are implemented by means of software on a personal computer or embedded system. A basic SDR system may consist of a personal computer equipped with a sound card or other analog-to digital converter with some form of RF front end. Significant amount of signal processing is done via general-purpose processor rather than being done in a special purpose hardware such as electronic circuits. Such a design produces a radio which can receive and transmit widely in different radio protocols based solely on the software that is being used. Software radios have significant utility for the military and cell phone services, both of which must provide a wide variety of changing radio protocols in real time. A SDR can be flexible enough to avoid the limited spectrum assumptions of designers of previous kind of radios in one or more ways including Spread spectrum and ultrawideband, Software defined antennas, Cognitive radio and Wireless mesh network.

Requirements

  • Communications Toolbox (MATLAB)
  • DSP System Toolbox (MATLAB)
  • Signal Processing Toolbox (MATLAB)
  • Communications Toolbox Support Package for Analog Devices ADALM-PLUTO Radio (MATLAB)
  • ADALM-PLUTO (HARDWARE)

ADALM PLUTO

ADALM-PLUTO is a easy to use learning tool for students, hobbyists and educators who wants to explore SDR or Radio Frequency or Communications in a self-learning environment or under an instructor. This allows the user to get better understanding on the real-world radio frequency around them. A variety of software packages such as MATLAB or Simulink provides an innovative graphical user interface allowing intuitive usage and minimizing the learning curve, enabling the user to learn faster, work smarter and learn more. It offers one receive channel and one transmit channel which can be operated in a full duplex and capable of generating or measuring Radio Frequency analog signals from 325 to 3800MHz (Configuration – AD9363) at up to 61.44 MSPS (Mega Samples Per Second) with a 20MHz bandwidth.

Hardware Setup

  • Connect the USB communication cable from the host computer to the radio.
  • Connect the antennas to the transmit (Tx) and receive (Rx) antenna ports.
  • Wait Until the Ready indicator LED lit steady and LED1 is Flashing
  • Using MATLAB, Configure the ADALM-PLUTO to the AD9364 which gives extended frequency range which also includes the full FM radio band. 

Simulink Implementation

Block Description

  • Using the Multimedia block, we load an audio file which need to be transmitted and received in the mobile phone.
  • After loading the audio file, the data is passed to FM Broadcast Modulator Baseband where the signal gets frequency modulated based the specified parameter.
  • Then the modulated signal is passed to the ADALM-PLUTO radio transmitter block where the modulated signal gets transmitted by specifying parameter such as center frequency, gain, baseband sample rate, etc. The execution runs for specific amount of time i.e. stop time.

Parameters

Mobile Setup

Load the audio file and execute the Simulink model with specific execution time (For say, 10sec) and then open FM radio app in your mobile and set it to the center frequency specified (For say, here I have given the center frequency = 98.0MHz).

Tips: From my experience, the execution gets bit faster while the laptop is being charged. If say the normal execution goes like 0.668, while charging it might go to 0.932.

Note: The parameters will not give the same quality for all types of audio files. So try tuning it to match your audio file.

You can check my video recording of the output using the link given below

Source file and output: https://drive.google.com/file/d/1yBQiu87D7H33JQ2GO_G_QDr_O1GzzKbC/view?usp=sharing/

Hope this blog is helpful and Feel free to send feedbacks and also to comment on my blogs for my further improvements in the future.

Get contents delivered to your mail ID by entering you mail ID in the HOME page.

Thank you

Round Robin Scheduling Using Fork

Disclaimer: This implementation is not full-fledged code that uses round robin scheduling. Instead it takes the burst time of the parent process and executes the round robin algorithm by taking the burst time array (includes parent’s and child’s burst time) and quantum as inputs.

Concepts Used:

  1. System Calls – Fork()
  2. Inter Process Communication

CPU Scheduling

CPU Scheduling is a process which allows one process to use the CPU while execution of another process is on hold due to unavailability of resource like I/O etc. The aim of the CPU scheduling is to make the system efficient, fair and fast.

What are we trying to Optimize?

  1. CPU Utilization
  2. Throughput
  3. Turnaround Time
  4. Waiting Time
  5. Response Time

Types of Scheduling

PreemptiveNon-preemptive
Used when a process switches from running state to ready state or from waiting state to ready stateUsed when a process terminates or a process switches from running to waiting state
The CPU is allocated to the processes for the limited timeThe CPU is allocated to the process till it terminates or switches to waiting state
The executing process is interrupted in the middle of executionThe executing process is not interrupted in the middle of execution.
Example: Round Robin, Shortest Time to Completion FirstExample: First Come First Serve, Shortest Job First

Types of Schedulers

  1. Long-Term Scheduler
  2. Short-Term Scheduler
  3. Medium-Term Scheduler

Comparison among Schedulers

S. No.Long-Term SchedulerShort-Term SchedulerMedium-Term Scheduler
1Job SchedulerCPU SchedulerProcesses Swapping Scheduler
2Speed is lesser that Short-Term SchedulerFaster than other two SchedulersFaster than Long-Term Scheduler
3Controls the degree of MultiprogrammingLesser Control over the degree of MultiprogrammingReduces the degree of Multiprogramming
4Almost Absent in time sharing systemMinimal in time sharing systemPart of time sharing system
5Selects processes from poolSelects processes which are readyRe-introduce the process

Round Robin Scheduling

The round-robin (RR) scheduling algorithm is similar to FCFS scheduling, but preemption is added to enable the system to switch between processes. A small unit of time, called a time quantum or time slice, is defined. A time quantum is generally from 10 to 100 milliseconds in length. The ready queue is treated as a circular queue. The CPU scheduler goes around the ready queue, allocating the CPU to each process for a time interval of up to 1 time quantum.

The CPU scheduler picks the first process from the ready queue, sets a timer to interrupt after 1 time quantum, and dispatches the process.

One of two things will then happen. The process may have a CPU burst of less than 1 time quantum. In this case, the process itself will release the CPU voluntarily. The scheduler will then proceed to the next process in the ready queue. If the CPU burst of the currently running process is longer than 1 time quantum, the timer will go off and will cause an interrupt to the operating system. A context switch will be executed, and the process will be put at the tail of the ready queue. The CPU scheduler will then select the next process in the ready queue.

Although the time quantum should be large compared with the contexts witch time, it should not be too large. As we pointed out earlier, if the time quantum is too large, RR scheduling degenerates to an FCFS policy. A rule of thumb is that 80 percent of the CPU bursts should be shorter than the time quantum.

System Calls

A system call is the programmatic way in which a computer program requests a service from the kernel of the operating system on which it is being executed. We have used fork system call.

The purpose of fork() is to create a new process, which becomes the child process of the caller. fork() returns a positive value, the process ID of the child process, to the parent. 

Inter Process Communication

IPC or inter-process communication allows processes to communicate with each other and synchronize their actions. Pipe is used for this.

There are two types of pipes namely,

  1. Ordinary Pipe
  2. Named Pipe

Ordinary pipe is special type of file in UNIX and it can be accessed using read() and write() system calls. It allows communication in standard producer-consumer style where producer writes to one end and consumer reads from the other end. Ordinary pipes are unidirectional and requires parent-child relationship between communicating processes. For a two way communication, create two pipes. Windows call these pipes as anonymous pipes.

Named pipes are more powerful than ordinary pipes and communication is bidirectional. No parent-child relationship is necessary between the communicating processes. Several processes can use the named pipe for communication which is provided on both UNIX and windows systems. It is also referred to as FIFO (First In First Out) in UNIX.

We Have Used Ordinary Pipes Instead Of Named Pipes

Implementation

The implementation is done in python in Linux operating system. We can’t use fork() in a Windows environment because it is is only present in the standard libraries on Unix or Linux based operating systems.

Code

Round Robin Scheduling Algorithm Function

 

Execution Using Fork

Summary on How It Works: The parent process write the pipe with the burst time which was manually delayed by sleep and in the child process we read the pipe and append the burst time of parent into burst array. Similarly we calculate the child process burst time and append the same into burst time array. Then the burst time array and quantum time (which was taken from user using input() function) are given as inputs to the round_robin function which returns the waiting time and turnaround time.

Output

I will try to upload an another blog on implementation of scheduling algorithms using named pipes as soon as possible.

Hope this blog is helpful and Feel free to send feedbacks or comment on my blogs for my further improvements in the future.

Get contents delivered to your mail ID by entering you mail ID in the HOME page.

Thank you