Program under execution is called Process. Thread is a basic unit of execution. Each program may have a number of processes associated with it. Each process may have number of threads executing in it. Threads basic unit of CPU utilization. A thread comprises of i) Thread ID ii) Program counter iii) a register set iv) a stack It shares with other threads belonging to same process its i) code section ii) data section iii) other operating system resources like open files and signals
Thread is a basic unit of CPU utilization. It consists of thread id, program counter, register set and stack. A system can have single-threaded or multi-threaded mechanism. Threads within a process share code, data and files between them. They have their own stack and register set. Benefits of multi threaded system: - Responsiveness: user can interact with programs smoothly - Data sharing: memory is shared between threads of a single process - Economy: Creating a new process is costly because the OS need to allocate resources to a process. But the new thread created can use resources of its process. - Utilization of multiprocessors architecture: in a signle threaded system, the multiprocessors mechanism is not useful.
In most of the computer applications multiprogramming and multi threading are used to improve the response time of the system while performing multiple operations or programs. Multiprogramming is a method of running multiple programs over a single processor by sharing the processor time in the time sharing environment. While multithreading is the process of running multiple threads to execute concurrently, supported by operating system.
so one single thread with multiple threads can infact perform diff task? eg if chrome tab is launched 1 process is assigned to it with N no of threads so now if url is requested then that same processes 1 thread is REASSIGNED to it?
@@ronweasley5573 there can only be max of 2 threads in a single core with the help of hype threading otherwise normally it have 1 core and 1 thread in it - remember threads are not as effective as original cores
Thanks for the register and stack info. Can we dive deep into them? How thread creation happen? How thread switching happens? Deep dive on hardware level?
sir how to solve and it please it for solving the question Design and implement a program to add two m x n matrices (n>=100 and m>=100). In order to perform the above, two versions of the program need to be implemented, one, a sequential version and the other a concurrent version. The sequential version implements a function to add the two matrices. The concurrent version of the program spawns threads, each thread to add the assigned number of rows. The main thread computes the consolidated output matrix. Perform the following using file management system calls: a. Design and implement the application using sequential approach with functions b. Design and implement the application using multi threaded approach
Note to self 0:20 "Program" here, seems to mean application--like what a user thinks of as a program: Word, Chrome. Judging by 4:20 and what I've been shown in earlier videos, I think that would make a process equivalent to a executable file within Word of Chrome. Or by "program" do you bymean each executable file can be, somehow put into working memory in many places at once--and each of those places in working memory is called a process? [I think the word "program", like many words in computer science, seems to have different meanings that I have to be careful about understanding depending on what's being discussed.]
@2:07 What do you mean each thread of same process will have to share it's code section, data section, and other os resources such as open files and signals? Do you mean that each of the thread of the same process will use the same memory address in ram? If that's the case how multithreading can be faster? If they use the same address?
@4:02 What is the code, data, and files That are being shared in a process containing many threads? Is it much like import package files When we want to code in Java? Or maybe include header files in c++? So that we can access the functions or methods written by somebody else?
@10:44 And now you says Each thread of the same process will have the same address in ram? So then how it can run faster? Meaning if one thread is using the stack in the ram completely, then another thread will have to wait until the stack has been deleted for the first thread i.e, the first thread has finish execution. Unless the address of the ram is big enough for many threads, then it can have many stacks run together
thanku sir, also i have cleared about the multi processor , that if there will be multi processor in the system then how multiple thread will work in that case.
In OS playlist there are just 55 lectures..and the remaining lectures are not visible to me if you put me in a way to find and access that remaining vedioes then it's be very helpful to me.Thank you sir
quick question: I Want to know whether the thread information is such thread ID and so on reside in a threat control block (similar to the process control block) or not.
Suppose there is a process where the output of task-1 is the input of task-2 & the output of task-2 is the input of task-3 & so on. Will multi-threading be useful for such a process?
Yes, multi-threading can be useful for such a process. By using multi-threading, each task can be executed concurrently in a separate thread, which can improve the overall performance of the process. This can be especially useful if some tasks take longer to execute than others, as it can prevent the entire process from being slowed down by a single slow task. However, careful consideration must be given to ensure that the tasks are executed in the correct order and that any dependencies between them are properly managed.
With having some general knowledge of CPU and threads I would assume that even though it's called concurrency these calculations using multithreading are being made sequentially, because I can't imagine CPU running multiple calculations simultaneously as it doesn't have multiple ALU's and so on.. if i'm wrong please correct me, and thus I believe no one cares about this it would be fun to know
Can you explain how those threads you are talking about relate to threads in CPUs? For example, when Intel promotes some CPU it says e.g. it has 4 core and 6 threads. What are those 6 threads actually? People on the internet write all kinds of confusing and misleading stuff...
That depends on your processor .. if a processor has 2 cores it can process up to 4 threads at a time.. go and search for cores and threads of CPUs for further info
the number of threads that can be created on a native operating system depends on various factors such as the hardware configuration, operating system architecture, and system resources available. The number of threads can also be limited by the operating system itself or by the application that is creating the threads. Therefore, the number of threads that can be created on a native operating system can vary widely depending on the specific system and its configuration.
Program under execution is called Process.
Thread is a basic unit of execution. Each program may have a number of processes associated with it. Each process may have number of threads executing in it.
Threads basic unit of CPU utilization.
A thread comprises of
i) Thread ID
ii) Program counter
iii) a register set
iv) a stack
It shares with other threads belonging to same process its
i) code section
ii) data section
iii) other operating system resources like open files and signals
Bless you!!
Thank u !
Thread is a basic unit of CPU utilization. It consists of thread id, program counter, register set and stack.
A system can have single-threaded or multi-threaded mechanism.
Threads within a process share code, data and files between them. They have their own stack and register set.
Benefits of multi threaded system:
- Responsiveness: user can interact with programs smoothly
- Data sharing: memory is shared between threads of a single process
- Economy: Creating a new process is costly because the OS need to allocate resources to a process. But the new thread created can use resources of its process.
- Utilization of multiprocessors architecture: in a signle threaded system, the multiprocessors mechanism is not useful.
Thanks , tumne mere 14:05 minutes bacha liye
👏
Neso Academy is the best 😭❤️
@Katelynn Nale ho
😂😂😂
Ro kahe rahi ho
@@ujjwalsharma4317 😂😂
Ha hme bhi pta h best h pr ro kyu rhe ho 😂😂😂😂😂😂😂😂😂
Man your videos are a Godsend. I have a test next week and this is perfect revision material and so clearly explained. Thank you!
how was the test ?
My whole degree courses are the blessing of NESO academy
I've been watching your channel for years. You've been helping me through a lot of subjects. Thank you very much.
From Syria With love
tomorrow is my Advance Operating System paper, it was difficult to read slides given by instructor. your video helped a lot. Thank you Sir
In most of the computer applications multiprogramming and multi threading are used to improve the response time of the system while performing multiple operations or programs. Multiprogramming is a method of running multiple programs over a single processor by sharing the processor time in the time sharing environment. While multithreading is the process of running multiple threads to execute concurrently, supported by operating system.
so one single thread with multiple threads can infact perform diff task? eg if chrome tab is launched 1 process is assigned to it with N no of threads so now if url is requested then that same processes 1 thread is REASSIGNED to it?
@@ronweasley5573 there can only be max of 2 threads in a single core with the help of hype threading otherwise normally it have 1 core and 1 thread in it
- remember threads are not as effective as original cores
Thanks!
1. Single-threading vs. Multi-threading
2. Single core vs. Multi core
3. Multi threads on multi core system increase concurrency.
I'm glad that I opened this lecture
Things my University didn't teach me😭..thanks #NesoAcademy. Am now literate on Threads
how u doin now?
Great video! Very helpful and well-organized. Thank you for the effort making such high-quality content.
I rarely comment on videos, but I'm grateful that I found this channel.
Thank you so much for your hard work and contribution :)
Seriously nailed it the level info provided in video is unmatchable
Simply Brilliant.
I watch the whole ads cause I can't donate to Neso Academy
Yeah...Me too, same here bro
This was extremely helpful, I found an idea that I can implement into my small programs to make them work faster. Thanks a lot!
Easy to understand😊
13:53 thankyou soo soo much sir. It's crystal clear ❤❤
a thread is a basic unit of execution / CPU utilization. execution = cpu utilization
you are an amazing teacher. this was so helpful, thank you.
Thanks for the video. Great presentation.
Seriously You are the best!!!!🖤🥺 Please do a video on types of hardware multi threading.
the example made it very easy to understand
thanks
Thank you for shedding light on this subject! Very well explained.
Thanks for the register and stack info. Can we dive deep into them? How thread creation happen? How thread switching happens? Deep dive on hardware level?
Me too want the same information
Very useful content. Thanks a lot!
Very well explained, thank you!
aahhhh! I was land on exact video I was looking for. Very well Explained
Hi
if you could post a video about only tasks,it would be great.
very well explained!!! thanks
This is the best way of explaining.....tq very much
Thank you for your efforts
Thank you
Thank you!! Greatly explained
very nice explanation
Following falcon book is too good❤❤
finally got it
Neso academy is the goat
Best Explanation ❤
sir how to solve and it please it for solving the question
Design and implement a program to add two m x n matrices (n>=100 and m>=100). In order to perform the above, two versions of the program need to be implemented, one, a sequential version and the other a concurrent version. The sequential version implements a function to add the two matrices. The concurrent version of the program spawns threads, each thread to add the assigned number of rows. The main thread computes the consolidated output matrix.
Perform the following using file management system calls:
a. Design and implement the application using sequential approach with functions
b. Design and implement the application using multi threaded approach
5:22
I always get confused of those topics, thank you so much for your explaination, you are my life saver !!!!
Well explanation, thanks so much
title of video: intro to threads
every two seconds in the video: we already discussed this in previous videos Hhhh
Thank you so much!
thanks
love your videos❤❤❤❤
Note to self 0:20 "Program" here, seems to mean application--like what a user thinks of as a program: Word, Chrome. Judging by 4:20 and what I've been shown in earlier videos, I think that would make a process equivalent to a executable file within Word of Chrome. Or by "program" do you bymean each executable file can be, somehow put into working memory in many places at once--and each of those places in working memory is called a process? [I think the word "program", like many words in computer science, seems to have different meanings that I have to be careful about understanding depending on what's being discussed.]
Hi. One quick question.
What is the maximum threads can able to create by single processor..?
Thanks for uploading the useful informational vedioes. It's really help us 😊
What is difference between pipelining and multi threading
@2:07
What do you mean each thread of same process will have to share it's code section, data section, and other os resources such as open files and signals?
Do you mean that each of the thread of the same process will use the same memory address in ram?
If that's the case how multithreading can be faster? If they use the same address?
@3:26
Oh so each thread will have its own stack and register,
Meaning different address in ram right?
@4:02
What is the code, data, and files
That are being shared in a process containing many threads?
Is it much like import package files
When we want to code in Java?
Or maybe include header files in c++? So that we can access the functions or methods written by somebody else?
@10:44
And now you says
Each thread of the same process will have the same address in ram?
So then how it can run faster?
Meaning if one thread is using the stack in the ram completely, then another thread will have to wait until the stack has been deleted for the first thread i.e, the first thread has finish execution. Unless the address of the ram is big enough for many threads, then it can have many stacks run together
well explanation
well explained
thanku sir, also i have cleared about the multi processor , that if there will be multi processor in the system then how multiple thread will work in that case.
good introduction video i love it, thanks
In OS playlist there are just 55 lectures..and the remaining lectures are not visible to me if you put me in a way to find and access that remaining vedioes then it's be very helpful to me.Thank you sir
rest of the videos are for premium users
Grt explaination sir ❤️
Thank You Sir😃
God bless you!❤
you are the best i hope you good and happy life
thanks for info.
thank you sir
Sir upload the video on computing environment
Thank you!
good explain
Best way of explaining ❤️ thanks a lot
quick question: I Want to know whether the thread information is such thread ID and so on reside in a threat control block (similar to the process control block) or not.
Thanks for my help...... Helped me a lot......
what
Thank you 💕
Thanku
How the fuck do you make comic sans look good and at the same time manage to be my savior on the exams?
Jokes aside, really good video
even with single threaded processes with n processor we can execute many processes at same time right ?
/* Thanks sir ,such a amazing course */
Nice
Useful! Thanks alot
Reference book: Concept of OS
Thank you I passed 5th sem 😁😅😕
Thankyou sir
Thank you.
superb
Fantastic
Suppose there is a process where the output of task-1 is the input of task-2 & the output of task-2 is the input of task-3 & so on. Will multi-threading be useful for such a process?
Yes, multi-threading can be useful for such a process. By using multi-threading, each task can be executed concurrently in a separate thread, which can improve the overall performance of the process. This can be especially useful if some tasks take longer to execute than others, as it can prevent the entire process from being slowed down by a single slow task. However, careful consideration must be given to ensure that the tasks are executed in the correct order and that any dependencies between them are properly managed.
1:55 2:30 13:36
Nice sir😇😇
Hi! when you say data section, code section you mean by that data segment and code segment?
Yes
Amazing😇tq so mch😊
Hi sir, can u please Explain about RTOS
amazing
With having some general knowledge of CPU and threads I would assume that even though it's called concurrency these calculations using multithreading are being made sequentially, because I can't imagine CPU running multiple calculations simultaneously as it doesn't have multiple ALU's and so on.. if i'm wrong please correct me, and thus I believe no one cares about this it would be fun to know
Great✨
Could you please upload some videos on CPU load average in Linux.
Operating System Concepts Essentials, 2nd Edition
Can you explain how those threads you are talking about relate to threads in CPUs? For example, when Intel promotes some CPU it says e.g. it has 4 core and 6 threads. What are those 6 threads actually? People on the internet write all kinds of confusing and misleading stuff...
2:30
Question : How many Threads we will having on native os : May be 1,but how many max we can go? untill the memory allocated to process by os filled up?
That depends on your processor .. if a processor has 2 cores it can process up to 4 threads at a time.. go and search for cores and threads of CPUs for further info
the number of threads that can be created on a native operating system depends on various factors such as the hardware configuration, operating system architecture, and system resources available. The number of threads can also be limited by the operating system itself or by the application that is creating the threads. Therefore, the number of threads that can be created on a native operating system can vary widely depending on the specific system and its configuration.
💕Thanks
0:24
A thread is a lightweight process, not a high weight.