Process vs Thread

Поділитися
Вставка
  • Опубліковано 11 лис 2024

КОМЕНТАРІ • 30

  • @starofeden9277
    @starofeden9277 5 років тому +132

    this didnt help me at all

  • @a.asadsh
    @a.asadsh 5 років тому +15

    I love short and effective conceptual videos thank you Udacity

  • @josephemmanuel5409
    @josephemmanuel5409 Рік тому +1

    Short and straight to the point. Thanks for this explanation.

  • @isuckatthisgame
    @isuckatthisgame 9 місяців тому +1

    What do you mean by code, data and files?

  • @anoriginalnick
    @anoriginalnick 5 років тому +27

    Could you use more jargon please ? 🙄

  • @Fine_Mouche
    @Fine_Mouche 2 роки тому +1

    and vs co-routine ? where would be a co-routine in the schema OR what would be the schema of a co-routine if its not in / don't share the same structure / if it's a concept of another paradigme

  • @jonallison9691
    @jonallison9691 2 роки тому

    Thanks for the concise explanation!

  • @ironplank
    @ironplank 2 роки тому

    I'm just gonna go take the course on Udacity.
    Sounds very useful but seems out of place cause I lack context.

  • @junkim3965
    @junkim3965 4 роки тому +2

    Here the threads you are talking about are kernel level threads?
    So the structure would be:
    CPU containing processes where each process can have multiple kernel level threads (all kernel level threads share the same address space, but they have separate registers, stack, etc) and each kernel thread can have multiple user level threads ?

  • @hyceltaylor
    @hyceltaylor 2 роки тому +1

    Really well explained!

  • @z.kjadoon9990
    @z.kjadoon9990 4 роки тому +1

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

  • @OssaGhalyoun
    @OssaGhalyoun 8 років тому +3

    A question for you, a thread or more are always executing on same CPU/Core that the process is pegged on and moves with it to different CPU/Core if the process moves ?

    • @samadahmed7293
      @samadahmed7293 5 років тому

      Which multithreading is beneficial one to one or many to many ?

  • @7Mango033
    @7Mango033 2 роки тому

    Really helpful, thank you!

  • @LarryPeteet
    @LarryPeteet 4 роки тому

    Thank you in 2020!

  • @birakova_16
    @birakova_16 4 роки тому +1

    Nice

  • @dimitriskatsoulis4986
    @dimitriskatsoulis4986 5 років тому +1

    Amazing explanation! Cheers : )

  • @amulyananjajjar5219
    @amulyananjajjar5219 7 років тому +4

    Good explanation. Thank you :)

    • @saadbinsami4801
      @saadbinsami4801 7 років тому

      beta ap k 5 marks extra

    • @sundarb6673
      @sundarb6673 6 років тому

      You are cute Amulya! Have a great day!! I love you!

  • @nigusiebirhanu8857
    @nigusiebirhanu8857 5 років тому

    Thank you

  • @조현우-n9g
    @조현우-n9g 5 років тому

    What does it mean about "share all of the virtual to physical adress mappings"??

    • @CliffordFajardo
      @CliffordFajardo 4 роки тому +1

      When you start a process (a dormant program now executing) it starts off with 1 thread. Each process (program) is given a chunk of memory for use by the OS.
      When we start a new thread from WITHIN a process, it's almost like starting a new process, BUT it's not; starting a new process means starting a new instance of the program entirely. That's expensive, so threads let us avoid having to create entirely new processes when it makes sense.
      When a process creates a new thread (now going from single-threaded to multi-threaded process) the new thread is going to make use of the same memory that was allocated by the OS for that process and it should since threads live in a process.
      For example, let's say I had a global variable "a = 1" at the top of my program and then I spawned a new thread from within my currently running process. My new thread would be able to see that global variable "a=1" and also update it "a=2" and all other threads would be able to see that update. This means threads can communicate with each other.
      In summary, in a way threads are like running multiple processes, but instead of actually creating multiple processes (programs) and paying a big cost, we're re-using memory.
      Nice reading here: www.backblaze.com/blog/whats-the-diff-programs-processes-and-threads/
      Some code here: www.geeksforgeeks.org/multithreading-c-2/

    • @full_stack9810
      @full_stack9810 4 роки тому

      "address" can be seen as a reference to a location in the computer's memory that is allocated to the process. The OS should have a map from addresses to memory locations and it should protect the location reserved to a process, so the other processes are blocked from accessing it. That location can store the process' code and/or data. For the sake of understanding the video, the multiple threads in a process have access to the shared addresses within its process.

    • @full_stack9810
      @full_stack9810 4 роки тому

      To go further and have an idea of "virtual" or "physical" memory, let's define "memory". Traditionally, memory refers to RAM memory sticks, which usually provide faster access to the code and data they store, as compared to other types of storages -disks - that usually are Hard Drives (HDs) or Solid State Drives (SSDs). However, RAM sticks cost more, so they tend to be more limited in terms of maximum storage capacity. An OS may use the disk to emulate more memory storage capacity for the processes. So a process may "perceive" it has X amount of virtual memory; some of that may be actually a representation to the physical memory (Y) and some, a virtualization (Z) - the data is actually stored on a disk. So the process may have a storage capacity of X = Y + Z

    • @gonzalocastro9771
      @gonzalocastro9771 4 роки тому +1

      @@full_stack9810 that's a very good example!

    • @gonzalocastro9771
      @gonzalocastro9771 4 роки тому

      @@CliffordFajardo well explained!

  • @blazing123
    @blazing123 3 роки тому

    theres a thread among us

  • @dertankwart1924
    @dertankwart1924 6 місяців тому

    Schier