Explain FSM and concurrent process with example.
Finite State Machine (FSM):
Finite state machine is a machine which have a transition from state to state. The system have some number of states and at a time the system can only be in one of the given states.
Finite State Machine is also known as Finite Automata. The Finite Automata is classified as finite automata with output and finite automata without output. Finite automata with output is further classified as Moore machine and Mealy machine. Finite automata without output is classified as Deterministic Finite Automata, Non-deterministic Finite Automata, and Epsilon Non-deterministic Finite Automata.
Concurrent Process Model:
Concurrent Process is a computational model. Concurrent process model describes the system functionality in two or more concurrently executing subtasks.
Suppose we want to display "Hello world" every X seconds and "How are you?" every Y seconds. So the one subroutine will print "Hello world" for X seconds and other subroutine will print "How are you?" on every Y seconds.
In sequential execution, the processor executes single task which causes poor processor utilization.