Internet protocol is a set of rules for the transfer of data/communication on the internet.IPv4 is the 4th version of the Internet Protocol.
The IPv4 uses 32-bit addresses and has 4.3 billion addresses. It uses the dotted-decimal representation, for e.g: 192.168.0.2.
The IPv4 address format is: 8bit.8bit.8bit.8bit (adds up to 32bit)
Now, there are two types of IPv4 addresses — Classful and Classless.
We will see the classful addressing method here.
Basically, there are 5 classes of addresses — A, B, C, D, E.
Let us now have a look at each of them one by one:
Like humans, the operating system needs to plan its activities. These activities are the various processes that need to be executed by the OS. The OS needs to schedule all its processes properly to ensure that they get executed without any problems and in minimal time.
For this purpose, there are many scheduling algorithms like the First Come First Serve (FCFS) algorithm, Shortest Job First (SJF) algorithm, etc. We will be discussing these algorithms in detail but before that, we need to understand some terms.
What is DFA?
Does DFA stand for Dog Food Association?
😂Nope, not at all. DFA has nothing to do with any dog or association. In fact, it is a very sophisticated machine.
DFA in fact is the acronym for — Deterministic Finite Automata.
Firstly, automata is a mathematical model or abstract model which is used to determine if a string is accepted by a language or not.
The DFA is an automata that has finite states and accepts or rejects a given string by running through several states.
Oof! That’s too much of bookish language.
To make things simpler, let's…
The dining philosophers problem is a very famous and interesting problem used to demonstrate the concept of deadlock.
To understand what the dining philosophers problem actually is, you can refer this blog:
Here, I am going to explain the solution to this problem using the concept of semaphores in C. Here’s the program:
void * philosopher(void *);
void * philosopher(void * num)
int phil=*(int *)num;
printf("\nPhilosopher %d has entered room",phil);
Technology enthusiast, coder, designer