in the previous lectures we have been studying about different aspects of operating system and what we have mostly seen was the introduction to operating system and also operating system structures now moving on we are moving on to one of the most important parts of operating system which is process management so you must have heard this term many times processes and threats so in this lecture we will be trying to get an introductory idea and understanding of what are processes and what are threats and usually people are confused many times between the difference between processes and threats so we will try to understand what these are and what are their differences so first of all before we understand processes let us first try to understand how a program is developed so whenever you want to make a program what you do is you first write the program in some high-level languages like for example let's say that you write the program in C C++ Java or something like that and that program is written in a high level language now we know that at the basic level computers does not understand the high level language but it understands only binary codes which are zeros and ones so the program has to be converted to binary code so for that using a compiler you compile your program and it helps to convert that program into a machine code which is understandable by your machine alright so after that you have your program which is converted into a binary executable code and it is ready for execution but it is not enough to just have that binary code for a program to execute or for a program to tell the computer what it wants to do so what it has to do is it has to be loaded into the memory and for a program to execute it needs some resources of the computer system so who will give the resources who will allocate this resources what is the brain that works behind all this it is the operating system which we have been discussing so far so the operating system will help in loading that executable program into the memory and allocate its resources and then the program will begin its execution all right so we first have a program which is written in which is a ready for execution but till that time it is just a passive entity that means it is it just sits there without doing anything but the moment it begins execution at that instance we call that program as a process so a process can be thought of as a program in execution when a program starts execution at that time we call it a process so when it is not executing it is just a program sitting there doing nothing but the moment it begins execution at that time we call it as a process so in the early computers it supported only one process or one program at a time but in today's computer it supports multiple processes multiple programs are running at the same time and even one single program can have many processes associated with it so when a program begins his execution at that time it is known as a process now let's try to understand what are threads so thread is actually the basic unit of a process which is in execution so this is how we can define it a thread is the unit of execution within a process a process can have anywhere from just one thread to many threads so we already understood what is a process when a program is executing it is called a process and a thread is the unit of execution within a process so within a process there may be one or more units of its execution and those units are known as threats and again in earlier systems one process had only one trend but now a single process can have many threads or many units of execution within it so a process can have anywhere from one thread to many threads so that is a difference between the process and a thread if you look at this diagram I hope you should be able to visualize and understand what it actually means so here we call this entire thing as a process when a program begins is execution it becomes this process and within this process there are certain units off its execution and each unit is known as a thread so these are all the units or the threads which are under execution within this process now if you want to see the processes which are in execution in your system you can see it using your task manager in Windows you can open up the task manager and you can see which are the programs that are loaded and what are the processes which are executing so let me show you an example of that so here this is a screenshot of my task manager if you open up your task manager and if you look at this application tab we can see which are the programs that are running so here I have three programs running over here and here we have the process tab so if you click on the processes tab you can see what are the processes running in your system so if you click this you come to this window over here where you see that there are all this processes running in your system so for example if you look here you see that there is the chromium browser running over here and if you look at the processes tab we see that there is not only one process associated with this chromium browser but there are multiple processes for example you see there is chrome dot exe here it's there even here and there are quite a few even over here so we see that there are multiple processes associated with a single program and this is the memory that it is using which is shown over here so this is an example of how you can see the programs and the processes running in your system because if you see what is happening it becomes more interesting for you to learn and understand what is happening so here we have seen the processes but we did not see any threads over here so if you want to see the threads that are also there in your system then you can use a program known as process Explorer you can download their program and it will show you even the threads that are running for each program and for each processes so this this is how the process Explorer looks like you can download this it is a very small application you can download and install it and you can see that these are the processes as weas so before so for example here I have the chrome dot exe process running over here and if you right-click on this and go to the properties then you can see the threads so here you will get this window and if you click on this threads tab you can see that these are the threads which are the units of execution of this together process and which are running over here so these many threads are running within this process chrome dot exe so in this way you can see the processes and tears that are running in your system so I hope with this visual example it was more clear to you what are processes and what are threats and how they work so this was just a basic introduction of water processes and what are threads and how we can differentiate between a process and a thread so this process is a very important topic in operating system and we will be studying this in more details and many topics are there under this which we will be discussing in the coming lectures thank you for watching and see you in the next one [Music] [Applause] [Music]