Introduction to Threads

Поделиться
HTML-код
  • Опубликовано: 7 июн 2024
  • Operating System: Introduction to Threads
    Topics discussed:
    1) Threads.
    2) Single-threaded process.
    3) Multi-threaded process.
    4) Benefits of multi-threaded programming.
    Follow Neso Academy on Instagram: @nesoacademy
    Contribute: www.nesoacademy.org/donate
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy.org/recommende...
    Website ► www.nesoacademy.org/
    Forum ► forum.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #OperatingSystemByNeso #os #OperatingSystem #Threads

Комментарии • 163

  • @TechByte8
    @TechByte8 3 месяца назад +14

    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

  • @hoangminhchau2187
    @hoangminhchau2187 10 месяцев назад +79

    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.

  • @princy7789
    @princy7789 3 года назад +201

    Neso Academy is the best 😭❤️

  • @MohamadModather99
    @MohamadModather99 3 месяца назад +1

    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

  • @DaGlitchMaster
    @DaGlitchMaster 2 года назад +41

    Man your videos are a Godsend. I have a test next week and this is perfect revision material and so clearly explained. Thank you!

    • @kotax
      @kotax 9 месяцев назад

      how was the test ?

  • @jalalkhankashmiri7501
    @jalalkhankashmiri7501 Год назад +6

    tomorrow is my Advance Operating System paper, it was difficult to read slides given by instructor. your video helped a lot. Thank you Sir

  • @aakashmehta9474
    @aakashmehta9474 Год назад +3

    Seriously nailed it the level info provided in video is unmatchable

  • @user-tb5xj1yt6t
    @user-tb5xj1yt6t 10 месяцев назад +4

    Great video! Very helpful and well-organized. Thank you for the effort making such high-quality content.

  • @jsaenzMusic
    @jsaenzMusic 2 года назад +5

    Thank you for shedding light on this subject! Very well explained.

  • @ateebtaseer5964
    @ateebtaseer5964 3 года назад +18

    My whole degree courses are the blessing of NESO academy

  • @dipeshchandiramani1897
    @dipeshchandiramani1897 4 года назад +8

    Very useful content. Thanks a lot!

  • @noelatum8692
    @noelatum8692 Год назад +2

    you are an amazing teacher. this was so helpful, thank you.

  • @AS-ne5wu
    @AS-ne5wu 3 месяца назад

    This was extremely helpful, I found an idea that I can implement into my small programs to make them work faster. Thanks a lot!

  • @mayur_madhwani03
    @mayur_madhwani03 2 года назад +2

    I'm glad that I opened this lecture

  • @Arjun69
    @Arjun69 3 года назад +4

    Simply Brilliant.

  • @trilecao9014
    @trilecao9014 3 года назад +10

    Thanks!
    1. Single-threading vs. Multi-threading
    2. Single core vs. Multi core
    3. Multi threads on multi core system increase concurrency.

  • @yoganandareddy4721
    @yoganandareddy4721 2 года назад

    This is the best way of explaining.....tq very much

  • @Bigeinla
    @Bigeinla Год назад +1

    Thanks for the video. Great presentation.

  • @TheYmBProduction
    @TheYmBProduction 4 года назад +41

    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.

    • @ronweasley5573
      @ronweasley5573 2 года назад

      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?

    • @nischaysharma4922
      @nischaysharma4922 2 года назад

      @@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

  • @raagavirao856
    @raagavirao856 2 года назад +1

    Seriously You are the best!!!!🖤🥺 Please do a video on types of hardware multi threading.

  • @lindsey5236
    @lindsey5236 2 года назад +1

    I always get confused of those topics, thank you so much for your explaination, you are my life saver !!!!

  • @chenzhou9575
    @chenzhou9575 2 месяца назад

    Very well explained, thank you!

  • @olivermolenschot9819
    @olivermolenschot9819 2 года назад +1

    very well explained!!! thanks

  • @ashantharindu4660
    @ashantharindu4660 9 месяцев назад

    Thank you!! Greatly explained

  • @mahmoudmahany3489
    @mahmoudmahany3489 3 года назад +7

    I rarely comment on videos, but I'm grateful that I found this channel.
    Thank you so much for your hard work and contribution :)

  • @AndyAlfa97
    @AndyAlfa97 4 года назад +3

    Thanks for uploading the useful informational vedioes. It's really help us 😊

  • @arnav_0397
    @arnav_0397 Год назад

    aahhhh! I was land on exact video I was looking for. Very well Explained

  • @abhishekvashisth8314
    @abhishekvashisth8314 4 месяца назад

    the example made it very easy to understand
    thanks

  • @vidushiydv01
    @vidushiydv01 15 дней назад

    13:53 thankyou soo soo much sir. It's crystal clear ❤❤

  • @ezatullahjunbesh9979
    @ezatullahjunbesh9979 Год назад

    Well explanation, thanks so much

  • @SathishKumar-ux4cv
    @SathishKumar-ux4cv 3 года назад +4

    Hi. One quick question.
    What is the maximum threads can able to create by single processor..?

  • @fetajonathan2247
    @fetajonathan2247 3 года назад +11

    Things my University didn't teach me😭..thanks #NesoAcademy. Am now literate on Threads

    • @BLG120
      @BLG120 3 месяца назад

      how u doin now?

  • @bfilma
    @bfilma 3 года назад +2

    Thank you so much!

  • @coding_unicorn2
    @coding_unicorn2 11 месяцев назад +1

    Easy to understand😊

  • @AlifKhan-fd5ch
    @AlifKhan-fd5ch 2 года назад +1

    Best way of explaining ❤️ thanks a lot

  • @dhruvburada5391
    @dhruvburada5391 Месяц назад

    Thank you for your efforts

  • @alaaageela1174
    @alaaageela1174 Год назад

    very nice explanation

  • @bashscript2805
    @bashscript2805 2 года назад

    good introduction video i love it, thanks

  • @IFYatharthAurangpureIT
    @IFYatharthAurangpureIT 9 месяцев назад

    Best Explanation ❤

  • @mdnazirhusain1721
    @mdnazirhusain1721 2 года назад

    Grt explaination sir ❤️

  • @faizurahmanjamshedi7300
    @faizurahmanjamshedi7300 4 года назад +1

    well explanation

  • @upasisrinivasulareddy7892
    @upasisrinivasulareddy7892 Год назад

    Useful! Thanks alot

  • @priyankabharti4587
    @priyankabharti4587 4 года назад +3

    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.

  • @free-palestine000
    @free-palestine000 3 года назад

    Neso academy is the goat

  • @Shunya_Advait
    @Shunya_Advait 2 года назад

    Thank You Sir😃

  • @sanjay01376
    @sanjay01376 4 года назад +2

    even with single threaded processes with n processor we can execute many processes at same time right ?

  • @adipratapsinghaps
    @adipratapsinghaps 2 года назад +4

    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?

    • @98854arjun
      @98854arjun 2 года назад

      Me too want the same information

  • @merrygizaw6213
    @merrygizaw6213 4 года назад

    Thank you.

  • @jutlavasantha4176
    @jutlavasantha4176 3 года назад +2

    Hi
    if you could post a video about only tasks,it would be great.

  • @dishasaumymondal2675
    @dishasaumymondal2675 5 лет назад +1

    Nice sir😇😇

  • @ahmed_raaphat
    @ahmed_raaphat 3 года назад +37

    I watch the whole ads cause I can't donate to Neso Academy

  • @bestofthebest2055
    @bestofthebest2055 3 года назад

    Thank you sir

  • @sibgatulhassan8099
    @sibgatulhassan8099 5 месяцев назад

    love your videos❤❤❤❤

  • @kienphan6436
    @kienphan6436 2 года назад

    Thank you!

  • @bhupindernegi7541
    @bhupindernegi7541 4 года назад

    Thanks for my help...... Helped me a lot......

  • @gideonkipyegon
    @gideonkipyegon 2 года назад

    Thank you 💕

  • @jayasingha8115
    @jayasingha8115 3 года назад +1

    Great✨

  • @itbepolicy6007
    @itbepolicy6007 4 года назад +1

    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.]

  • @farahmohamed2104
    @farahmohamed2104 7 месяцев назад

    well explained

  • @shaziyasultana4373
    @shaziyasultana4373 4 года назад +1

    Sir upload the video on computing environment

  • @user-kj5dp9xy8h
    @user-kj5dp9xy8h 2 года назад

    thanks for info.

  • @sachithkasa3811
    @sachithkasa3811 8 месяцев назад

    Following falcon book is too good❤❤

  • @poonamsain6387
    @poonamsain6387 2 года назад

    Amazing😇tq so mch😊

  • @jiyaajmani13
    @jiyaajmani13 Год назад

    God bless you!❤

  • @dhanushsivajaya1356
    @dhanushsivajaya1356 3 года назад

    Thankyou sir

  • @saadmanahmed860
    @saadmanahmed860 3 года назад +3

    a thread is a basic unit of execution / CPU utilization. execution = cpu utilization

  • @killerjohny6116
    @killerjohny6116 3 года назад +3

    What is difference between pipelining and multi threading

  • @ashishkumari762
    @ashishkumari762 3 года назад

    Thank you

  • @manojbaskar3194
    @manojbaskar3194 2 года назад

    superb

  • @98854arjun
    @98854arjun 2 года назад

    Fantastic

  • @balaramprajapati8870
    @balaramprajapati8870 2 года назад

    good explain

  • @infoilahiindustries2903
    @infoilahiindustries2903 3 года назад

    amazing

  • @mohamadtabbakh9887
    @mohamadtabbakh9887 9 дней назад

    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.

  • @esra4281
    @esra4281 Год назад

    you are the best i hope you good and happy life

  • @mahimanishad3387
    @mahimanishad3387 3 года назад

    thanks

  • @prensudangol1547
    @prensudangol1547 2 месяца назад

    finally got it

  • @rayanagoudnadagoudra5411
    @rayanagoudnadagoudra5411 3 года назад +1

    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

  • @bodapatisujatha4181
    @bodapatisujatha4181 Год назад

    Hi sir, can u please Explain about RTOS

  • @imcnx1563
    @imcnx1563 4 года назад +3

    Hi! when you say data section, code section you mean by that data segment and code segment?

  • @dharmalbestor
    @dharmalbestor 3 года назад

    💕Thanks

  • @tabbytabrez6767
    @tabbytabrez6767 Год назад

    Could you please upload some videos on CPU load average in Linux.

  • @truptiranjansahoo7577
    @truptiranjansahoo7577 2 года назад

    Thanku

  • @gatecomputerscience1484
    @gatecomputerscience1484 2 года назад +3

    /* Thanks sir ,such a amazing course */

  • @prathvisingh8288
    @prathvisingh8288 3 года назад +1

    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?

    • @aminesaber467
      @aminesaber467 Год назад

      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.

  • @AndyAlfa97
    @AndyAlfa97 4 года назад +8

    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

    • @SajidAli-ub6th
      @SajidAli-ub6th Год назад

      rest of the videos are for premium users

  • @Terminator0512
    @Terminator0512 4 года назад

    V nice

  • @astaghfirullahalzimastaghf3648
    @astaghfirullahalzimastaghf3648 3 года назад +4

    @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?

    • @astaghfirullahalzimastaghf3648
      @astaghfirullahalzimastaghf3648 3 года назад

      @3:26
      Oh so each thread will have its own stack and register,
      Meaning different address in ram right?

    • @astaghfirullahalzimastaghf3648
      @astaghfirullahalzimastaghf3648 3 года назад

      @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?

    • @astaghfirullahalzimastaghf3648
      @astaghfirullahalzimastaghf3648 3 года назад +1

      @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

  • @abhishekpatil922
    @abhishekpatil922 2 года назад

    Thank you I passed 5th sem 😁😅😕

  • @delpro3735
    @delpro3735 2 года назад

    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...

  • @itsolutions384
    @itsolutions384 2 года назад

    nice

  • @GOODBOY-vt1cf
    @GOODBOY-vt1cf 3 года назад +4

    5:22

  • @kornelijussliubauskas8299
    @kornelijussliubauskas8299 2 года назад

    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

  • @hariharaprasaths3947
    @hariharaprasaths3947 5 лет назад +1

    Sir put java tutorial

  • @Anas-qh3hk
    @Anas-qh3hk Месяц назад

    title of video: intro to threads
    every two seconds in the video: we already discussed this in previous videos Hhhh

  • @manikantamaddipati1090
    @manikantamaddipati1090 4 года назад +3

    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?

    • @killerjohny6116
      @killerjohny6116 3 года назад

      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

    • @aminesaber467
      @aminesaber467 Год назад

      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.

  • @rodrigotudancafernandez17
    @rodrigotudancafernandez17 4 года назад +2

    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

  • @on-line1685
    @on-line1685 3 месяца назад

    ❤🙏🏾

  • @GOODBOY-vt1cf
    @GOODBOY-vt1cf 3 года назад +2

    2:30

  • @z.kjadoon9990
    @z.kjadoon9990 3 года назад +1

    what are the benefits of multiprocessor system for a single threaded process?

    • @vizzy4652
      @vizzy4652 3 года назад +2

      none, I'd assume? If you have multiple processors and you're running a single threaded process, only one processor can run this process.. leaving the other 3 CPU's to be doing nothing.

    • @_________________404
      @_________________404 3 года назад +2

      Advantage would be that it should in theory still be faster because the CPU can use some of it's other cores for running the OS and for other processes, so it should then use the core that is used the least to run your process.

    • @z.kjadoon9990
      @z.kjadoon9990 3 года назад

      @@vizzy4652 thanks

    • @z.kjadoon9990
      @z.kjadoon9990 3 года назад

      @@_________________404 thanks