IPC: To Share Memory Or To Send Messages

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 280

  • @jean-naymar602
    @jean-naymar602 2 місяці тому +117

    13:20 Is this overhead inherently caused by the syscall approach ?
    I mean, if you go the "shared memory" route, you'd have to essentially re-implement the synchronizing behaviour of the kernel's messaging implementation anyway.
    Would there still be a significant increase in performance even after doing that ?

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +132

      Yes, with shared memory you still need some sort of synchronization to avoid race conditions, so you pay that little price that comes with every atomic operation.
      But generally sys-calls are way slower because many of them inherently make the process go to a "wait" state, which translate into a huge performance penalty in terms of CPU scheduling.

    • @jean-naymar602
      @jean-naymar602 2 місяці тому +11

      @@CoreDumpped Thanks ! I'll rewatch the syscall video to refresh my memory then :)

    • @xeridea
      @xeridea 2 місяці тому +25

      @@jean-naymar602 Due to how CPUs and privilege levels work, doing a system call requires an interrupt and context switch, and a delay for the system process to handle it, and then again returning to the calling process. this can be 100s or thousands of CPU cycles, which is generally acceptable, but often it would be too much. They may be on the order of microseconds, which is still fast, but you don't want to be doing them constantly. Many other tasks require syscalls, opening a file, reading keyboard input, interacting with any hardware, etc. Back in the bad old days, like DOS, all memory would be shared, and programs could interact directly with everything. While this is faster, it makes your system significantly more unstable. This is a big reason we have drivers and driver models, to communicate with hardware in a sane way.

    • @giusdb
      @giusdb 2 місяці тому +4

      Synchronization is mandatory in any condition where there are two asynchronous things that communicate with each other.
      It doesn't matter what they are, it has to be there somewhere.
      In IPC, besides synchronization, there are various other context exchanges.
      And besides that, there is a double COPY of the data, from the sender to the kernel, from the kernel to the receiver.
      In shared memory, there is only synchronization, fast but fragile and insecure.

    • @FlyWR
      @FlyWR 2 місяці тому

      ​@@giusdb finally a good answer.
      Theoretically, the copy can be avoided by remapping the pages from one process to another. The first process will loose access there, but often that's totally acceptable. I don't know if any existing OSes implement that though.
      Due to that, I think there can be an IPC protocol having roughly the same efficiency as shared memory. It will be quite complex though, and I'm not aware of any implementations.
      From answers above:
      * sys-calls are way slower, but they also are not required, as the IPC subsystem can be fully in userspace
      * context switching is not required, the sync code can be the part of the processes sharing the memory
      * the IPC code could use promise- or handle- like data, like non-locking disk IO, that way the code calling IPC will not have to wait and loose cycles. But even if it doesn't, the IPC should be handled the same way as the disk IO - in a separate thread.

  • @user-tn4mr8co5v
    @user-tn4mr8co5v 2 місяці тому +71

    The most unanswered or confused part to this date was ports, sockets and pipes.
    I had given up searching on this topic. But accidentally hit this video and the moment I heard the word pipes, sockets, and port, all my brain cells made a permanent communication path.
    Thanks, so many years of confusion cleared in a minute.

    • @u_u_u_2921
      @u_u_u_2921 29 днів тому +1

      A series of books from W. Richard Stevens answers all these questions and many more. IPC, network programming, programming in unix environment (syscalls, pipes, fork, exec, ...). I'm in love with these books since I found them in the early 2000s being a student.

  • @krutyanjayshinde7015
    @krutyanjayshinde7015 2 місяці тому +66

    I am study adv. operating systems in my masters right now and your videos are a god send, Thank you so much ... best thing to watch with my morning coffee.

    • @YoussefBouhrira
      @YoussefBouhrira 2 місяці тому

      @krutyanjayshinde7015 Could you please recommend me some good Books that examine in details such advanced concepts related to operating systems ?

    • @botondtoth9316
      @botondtoth9316 Місяць тому

      Same

  • @FreestateofOkondor
    @FreestateofOkondor 2 місяці тому +36

    This is hands down one of the best channels on UA-cam. Thank you so much for all the work you put in.

  • @joaopedrorocha5693
    @joaopedrorocha5693 Місяць тому +1

    Thanks! Was stuck trying to understand these concepts and how they play with each other!
    Your videos are great on how they mix the concepts with just enough implementation details so we can grasp the concepts and how they are concretized.

  • @MarkDavid712
    @MarkDavid712 2 місяці тому +81

    12:25 - You have no idea how much I needed this.
    I mean, I do understand-the server and client are essentially processes on their respective machines. I've even written simple programs and worked with interconnected systems, so you'd think I would have an intuitive grasp of it.
    But the way it’s often represented, with the client and server depicted as entire machines, really stuck with me, and I couldn’t separate them in my mind. This explanation feels like a breakthrough. I think it’s going to help me develop a much stronger intuition about how OSes and IPC work. Thank you.

    • @Occultastic
      @Occultastic 2 місяці тому +3

      based profile picture.

    • @GreatTaiwan
      @GreatTaiwan Місяць тому

      @@Occultastic this cringe pfp is everywhere

    • @ardnys35
      @ardnys35 Місяць тому +1

      you should read about sockets or networking in general because client-server architecture is built upon all those. i didn't quite understand it either until i read some chapters from computer networks books

  • @MdYasir-bn6id
    @MdYasir-bn6id Місяць тому +1

    Its crazy how this video cleared all of my doubts related to ports, distributed systems and client-server architecture.

  • @kitamashi
    @kitamashi 2 місяці тому +1

    this is a GREAT video that actually explains the concepts without the overcomplicated jargons that usually means nothing. This video showed what happens with great description and illustration. You just gained a new subscriber, thanks!

  • @franciscomagalhaes7457
    @franciscomagalhaes7457 2 місяці тому +81

    ooooooooohhhh so a port is like a mailbox! It's memory space! That's an awesome explanation, I think it finally clicked! Thank you!
    Also thanks for reminding people that these illustrations usually found around the internet incorrectly imply that server and client are machines. It took me a while to figure out it's all just software that may or may not be running on different machines.

    • @davidarmijo8903
      @davidarmijo8903 2 місяці тому +4

      Yeah! Just in time because my Intro to Computer Systems class is just covering Ports and Sockets and I was having trouble making a distinction between the two of them! 👍

    • @yurisich
      @yurisich 2 місяці тому +6

      In Linux, a pipe, a port, a socket, and a process are all represented in the filesystem as readable and writable resources, albeit in different ways, and with different types of behaviors corresponding to the baseline actions you normally take against the filesystem.

    • @franciscomagalhaes7457
      @franciscomagalhaes7457 2 місяці тому +1

      @@yurisich that is *really* interesting, thank you so much for sharing, I'm always looking to understand this low level stuff better.

  • @d4vidyo
    @d4vidyo 2 місяці тому +2

    Crazy how you can explain concepts that i have read about a hundred times but only now really made it click

  • @ВладФоменко-р4е
    @ВладФоменко-р4е 2 місяці тому +7

    Just the best channel about computers!

  • @LycheeLele-mh2ku
    @LycheeLele-mh2ku 18 днів тому

    Graduated from college a few months back in comp sci. I don't think I've came across anyone who's explained this concept better than you did

  • @bodycowlin
    @bodycowlin 2 місяці тому +8

    What a great start to this Friday 🎉 Happy coredumped day everyone! And thank you, Jorge, for another excellent video that elegantly pulls back the veil of our collective ignorance a little more.

  • @shelata
    @shelata 25 днів тому

    Thanks!

  • @AhmedAsus2024
    @AhmedAsus2024 2 місяці тому +14

    4:55 I'm excited to watch an episode about threads and thread synchronization

  • @hghmnds
    @hghmnds 2 місяці тому +1

    sponsored by Jetbrains!!?? woah I'm really glad to be part of this channel

  • @anonymouskitten4715
    @anonymouskitten4715 2 місяці тому +31

    I was just rewatching one of your videos

  • @NHGeneral
    @NHGeneral Місяць тому

    Wow, what I'm working with now is invented 400 years ago and through this video I just got the idea behind it, before that just blindly accept the terminologies, thank you and subscribed!

  • @MaxLothaire
    @MaxLothaire 2 місяці тому +3

    This video came out the very day I start learning the wayland protocol.

  • @Ahmedsb12
    @Ahmedsb12 2 місяці тому +5

    Bro, you are one of the best to do it ever. Could you make a video explaining how you do it, I think that 's going to be interesting.

  • @premsagar4438
    @premsagar4438 2 місяці тому +1

    Yes exactly, take your time to develop a great video. You don't have to rush just to diliver content super fast. Keep going!

  • @SGnfX2000scnsoft
    @SGnfX2000scnsoft Місяць тому

    TBH, I could not understand what is Networking and Ports, I do know that it has IP that shows machine location, but had no idea what the port actually is, Thank you very much.
    May Allah bless you bro, keep doing such learning stuff, you are doing best!

  • @simonleary7090
    @simonleary7090 2 місяці тому

    I really like the way you put focus on different parts of code using the yellow box

  • @dipper23874
    @dipper23874 2 місяці тому +1

    I wish this video had existed for me when I was first learning about IPC several years ago!

  • @nneddenn6207
    @nneddenn6207 2 місяці тому

    That's an instant subscribe from me. Thank for explaning core stuff in simple ways! I'm Senior Web Dev, it's interesting to listen about mechanisms underneath

  • @a.v7998
    @a.v7998 2 місяці тому +1

    loved the video! im studying about operating system in my college semester right now! Watching your videos has been really great!

    • @Amanda_Huginkiss
      @Amanda_Huginkiss 2 місяці тому

      Same. Stoked to go through these videos before the final.

  • @dixztube
    @dixztube 2 місяці тому

    Man this is so incredibly good how you explain these things. It makes it so clear

  • @fardelian
    @fardelian 2 місяці тому +14

    Thank you JetBrains for sponsoring this video!

    • @andrewtran9870
      @andrewtran9870 2 місяці тому +1

      Fr fr, this channel is gold, and I'm glad JetBrains supports this

  • @Abe41194
    @Abe41194 2 місяці тому +1

    Dude. Your content is unmatched.

  • @EduardoTardinCosta
    @EduardoTardinCosta 2 місяці тому +6

    You are the best content online for CS students after CS50.

  • @DinHamburg
    @DinHamburg Місяць тому

    20 years ago i worked with QNX2 - which was a message-passing OS. Benefit was, that interprocess communication was the same, independent whether the peer-process was on the same or a different network node.
    The question whether memory sharing or message passing is better, depends on the granularity of calls.
    For instance, if you consider the number of registry calls around _any_ windows api-call, message passing seems out of question.

  • @PierreThierryKPH
    @PierreThierryKPH 2 місяці тому +4

    It's a common myth that shared memory is faster, and a few high performance Erlang applications are good counter examples.
    Shared memory usually uses locks and mutexes that stop execution, sometimes degrading performance in huge ways (cf. Python's GIL). Shared memory also forces the CPU to use memory barriers.

    • @yimyim117
      @yimyim117 2 місяці тому +2

      It’s not a myth that shared memory is faster. It literally is, as it requires less total system calls(Assuming Kernel level IPC). But in big applications it typically does not matter anymore. In the end, it’s much more important to write good code, which is arguably much harder with shared memory. And that’s the whole reason why you can find counter examples. You lose the performance benefits from shared memory quite fast if your data and control flow model are badly designed.

    • @PierreThierryKPH
      @PierreThierryKPH 2 місяці тому

      @@yimyim117 if your lock stops execution for more cycles than it takes the IPC, then no, it's not literally faster.
      It's only faster in a theoretical setting that has no practical application, because we don't know how to make reliable use of locks.

    • @yimyim117
      @yimyim117 2 місяці тому

      @@PierreThierryKPH Unfortunately I can only partially agree with your statement. Yes, if you wait for your locks longer than the overhead of IPC, then it’s faster.
      But that’s not the complete story. Usually you design an application around using too many locks. Single Producer-Consumer Buffers are almost no overhead, also lock free data structures are rising in popularity. In theory you could even go so far to „mimic“ IPC by opening a shared memory area for each producer. This would make a very small performance overhead and you would not need to go through the kernel to relay a message; instead you forward it yourself I to the unique send buffer(in your shared memory).
      So no, the discussion is not that simple. Shared Memory is faster in its raw state and even in well-thought out and designed applications. But again, the complexity to manage an efficient design and an efficient implementation usually is hard enough, that you already lose the benefit of using shared memory.

  • @BenTrem42
    @BenTrem42 2 місяці тому +2

    4:56 is *_exactly_*_ what came to mind when I read the title!_

  • @yanglijian
    @yanglijian 2 місяці тому +1

    When Core Dumped post a new video, I know my brain will start to grow up again.

  • @exe.m1dn1ght
    @exe.m1dn1ght 2 місяці тому

    This man cleaned my soul.. Thank you so much for this video , we all needed this

  • @koussayhajlaoui9440
    @koussayhajlaoui9440 2 місяці тому

    Excellent work! Well-structured videos and straightforward communication of information makes these videos really enjoyable

  • @laoluade5741
    @laoluade5741 Місяць тому

    I haven't finished watching the video, but the way ports popped in I had to leave a comment. I got so used to not really getting this broken down that I never asked!

  • @swyveu
    @swyveu Місяць тому

    I'm 9 seconds in...
    Any vid that starts with a Mandelbrot set is thumbs up by design !!

  • @_dnL
    @_dnL 2 місяці тому

    I never really understood the purpose of ports but just now it clicked. Thanks, excellent video !

  • @CheeseBananas
    @CheeseBananas Місяць тому

    OS thread scheduling plays a role on IPC. An advantage of messaging on top of shared memory is that the OS thread scheduler knows that it needs to schedule the message receiving thread next.

  • @DoggletPug
    @DoggletPug Місяць тому

    Please cover RPC's and sockets... You're doing 10x better than my professors at uni for these topics!

  • @commonwombat-h6r
    @commonwombat-h6r 2 місяці тому

    simply incredible video. The quality is top notch! Bravo

  • @aj.arunkumar
    @aj.arunkumar Місяць тому

    thanks for existing... love your videos

  • @ellehooq
    @ellehooq 2 місяці тому

    I can't believe I didn't know about this channel. This is brilliant!

  • @needlermasta
    @needlermasta 2 місяці тому

    These videos are absolutely incredible - can you please make one where you describe how virtual machines relate to their host operating systems, and contrast that with how containers work, with animations of the address space? I'm wondering if virtual NICs are implemented any different than what's presented in this video.

  • @perguto
    @perguto 17 днів тому

    7:18 I think it's more like 1 renderer process per tab _group_. The precise rules are complicated, but for example, if a tab opens another tab via the open() function, they'll always share the same process, as they can acces each others' html. You can see what tabs are grouped into a process by opening the Chrome task manager via shift + escape

  • @antonyanchev7112
    @antonyanchev7112 2 місяці тому +3

    Hello Core Dumped, do you think a topic like memory models/ memory ordering/ memory barriers could be a good idea for a future video ? It's a tough low level concept and people might benefit from your amazing explanation for it. Anyways, congrats on another great video!

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +6

      Two videos on memory (Paging and Virtual memory) are already on my list. Just be patience cause it takes quite a lot to make these videos.

    • @antonyanchev7112
      @antonyanchev7112 2 місяці тому +1

      @@CoreDumpped Hey I hear you, the quality of these videos is insane! I was just wondering what you think of these topics

  • @Mei-snt
    @Mei-snt 2 місяці тому

    Great video George, your animations are really awesome

  • @nullpointer1284
    @nullpointer1284 2 місяці тому

    Would love a Mach version of this! I know the Unix process model is so ubiquitous, but Mach's concept of Task, Thread, and Virtual Memory that processes can be composed of is super cool IMO.

  • @rezah336
    @rezah336 2 місяці тому +5

    messages: hundreds mb/sec
    memory sharing: gigabytes/sec
    you should have mentioned stdout/in which is the simplest and best one
    another fun one is the clipboard, but then you cant use it when your program runs, but good when you need to setup IPC in short time

  • @gnodar01
    @gnodar01 Місяць тому +1

    Small correction: Mach was not and is not an Operating System. It was a kernel designed around the idea of microkernel architecture. macOS uses a heavily modified derivative of it called XNU, which is itself a (not so micro) kernel forming the basis of Darwin OS, which macOS is a superset of.

    • @j.rayscott4681
      @j.rayscott4681 20 днів тому

      Great video. Small correction. Mach is pronounced “mock”.

  • @higochumbo8932
    @higochumbo8932 Місяць тому

    That is great! Very easy to understand, and visualizing things always helps.
    Would it be possible for you to share the sources you use in the video descriptions?

  • @heh2393
    @heh2393 2 місяці тому

    Kudos for such high quality systems explainers

  • @supmaxred
    @supmaxred 2 місяці тому +4

    3:06 This is wrong, a process cannot access the memory of another process at all if it does not want to, because the process works in its own address space, and there is no other process there. Only if the process itself wants shared memory, the operating system will allocate virtual memory, and map these addresses to the addresses of another process

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +4

      It is not wrong, a process trying to access the address space of another process might as well mean that it tries to use privilege instructions to manipulate the MMU, which triggers an interrupt.

    • @jonnyradars
      @jonnyradars Місяць тому +2

      @@CoreDumpped well yea, but without this notion what you're saying in the video sounds like processes do share the same address space which is, as the OP noted, plain wrong. IMO would be better to clearly state that in the video.

  • @gurupartapkhalsa6565
    @gurupartapkhalsa6565 2 місяці тому +1

    shared memory is not necessarily faster as it depends on mutex locking, so the throughput of the memory space is a big factor if you're actually searching for a bottleneck and not just being pedantic. smem is a traditional approach for communicating with a trusted OS, and this is because most trusted OSes are single threaded by design, with access controls per function/object which are routed through a trusted kernel, and the trusted kernel handles most memory mapping and cleaning semantics. As a simple rule of thumb, the more asynchronous the two processes are, the less they should use shared memory.

  • @whtiequillBj
    @whtiequillBj 2 місяці тому +13

    Also message passing implementation changes per-Operating System.
    Also it's pronounced Mok.
    Also how does the change in a Micro kernel, a hybrid kernel, a monolithic kernel and an exo kernel?

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +4

      I was wondering why the TTS pronounced Mok. Thanks, I learned something today.

    • @idoben-yair429
      @idoben-yair429 2 місяці тому +2

      None of these labels are important. What's important is the level of memory isolation. Most of the time when people say "process" they mean an execution context with fully isolated virtual memory. Then you can choose your level of punching a hole through this shield: threads within a process have no isolation, messages getting copied around preserve the isolation but can be expensive, and shared memory areas break the isolation although only in certain areas.

    • @XDarkGreyX
      @XDarkGreyX 2 місяці тому

      Kind of a Duh

  • @nathanpotter1334
    @nathanpotter1334 Місяць тому

    Bro had Prime's 2 Idiots 1 Keyboard up ☠😆 Amazing Video

  • @leondepdelaw
    @leondepdelaw 2 місяці тому

    Thank you! I just learned something new today. 😁😁😁😁

  • @iloveparallelism
    @iloveparallelism 2 місяці тому

    Great video as always core dumped. Thank you for the content. I actually think I past my exams easier thanks to your channel.
    Regarding the performance, the communication is definitely much slower as you said. I had chance to work on a super computer with ~2000 cores. It is multiple machines w NUMA architecture, connected together over ethernet. Any communication would be extremely costly since over-ethernet networking, typically handled through southbridge, will be much slower than Memory Access, through northbridge. And of course the wait time by the OS contributes to the performance cost of communication. None the less, communication is inevitable on the way to scalability, so efficient communication it is.

    • @yimyim117
      @yimyim117 2 місяці тому

      The problem is, your operating system will do too many copies. Once from user to kernel space, once from kernel space to network driver transmit queue, one from kernel space of the receiver to the user space of the receivers process

  • @Drudge.Miller
    @Drudge.Miller 2 місяці тому +1

    hi jorge, my name is drudge, and this, is core content

  • @sevfx
    @sevfx Місяць тому

    Hey there, I recently discovered your videos and am astonished by the technical, animating and didactic quality you put out here!
    Are there any sources you recommend, that you used for your videos? I would be interested in some quotable books or sites.
    Thank you for the great content :)

  • @edulum1318
    @edulum1318 2 місяці тому

    My favorite channel right now

  • @sunilh1002
    @sunilh1002 2 місяці тому

    Thanks for this great video, easy to understand, well put together. Waiting for Threads specific video - concurrency,locks, synchronization. When is it going to get released ?

  • @gFamWeb
    @gFamWeb 2 місяці тому +3

    Minor correction: it might just be the TTS (not sure if you are using TTS), but Mach is pronounced like Mock, not Match.

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +2

      The TTS actually got it right, but I didn't know about it (I'm not a native english speaker) and I re-wrote it as "ma-ach" to make it pronounce it "mach" instead of "mock".
      Sorry, I guess it is nice to learn something.

    • @gFamWeb
      @gFamWeb Місяць тому

      ​@@CoreDumppedyeah, no worries! Otherwise it's a really great video!

  • @Lojdika
    @Lojdika 2 місяці тому

    In regards with consuming the messages by a server process, a video on reactor vs proactor model would be nice.

  • @mahmoudbasha4838
    @mahmoudbasha4838 28 днів тому

    I saw tons of articles talk about that IPC is to let processes communicate, share info etc and the mechanisms. But why processes need to communicate or share data at first ????
    i need to know the why the philosophy of IPC

  • @MrSomethingdark
    @MrSomethingdark 2 місяці тому +153

    I swear Core Dumped is like a leaker from the dev community. All the devs obfuscate their knowledge and yet Core Dumped is like a prophet!!!

    • @noelgallagher3646
      @noelgallagher3646 2 місяці тому

      Check out operating systems in 3 easy pieces for a nice introduction to a lot of these topics

    • @benebene9525
      @benebene9525 2 місяці тому +26

      who tf is obfuscating knowledge??

    • @инкогнито-ю7з
      @инкогнито-ю7з 2 місяці тому +23

      No.
      He just tell you how it work in video format
      There tons of docs that discrabe how something works

    • @MrSomethingdark
      @MrSomethingdark 2 місяці тому

      @@инкогнито-ю7з coming from installing the SFML library and configuring it for VS 17. The devs of that library are actually telling ppl to get better scrub and read docs again and works fine for me. The actual guide for it is awful especially if youve never had a course before in such things. Specifically they tell you to include everything in your linker dependencies for input but when I do that the program doesnt compile

    • @hassanlabyad4082
      @hassanlabyad4082 2 місяці тому

      ​@@benebene9525 if you ever went to a computer science or computer engineering school you will find that the gatekeeping is crazy (just go ask for something a bit difficult about arch linux in its community as an example, they will make you sweat before giving an answer)

  • @jebstuart3162
    @jebstuart3162 2 місяці тому +1

    Can you make a video about computer graphics please? I'd like to know how the CPU/graphics card make things appear on the screen, and how they process so many pixels so quickly

  • @zarmeza1
    @zarmeza1 2 місяці тому +1

    awesome animation and explanation. what tools did you use to create it?

  • @zxxvcc
    @zxxvcc Місяць тому

    Text to speech is getting pretty great.

  • @kooba-be
    @kooba-be 2 місяці тому +1

    The point about not needing a network on localhost is a little misleading, since this is impleented via networks and loopback interface

  • @SirusStarTV
    @SirusStarTV 2 місяці тому

    Make a video about 'stream' concept, how it abstracts away how data is exchanged from various sources.
    In programming languages they use streams assuming people know what it's, but only by coding something with them i understood how they work.

  • @Omlet221
    @Omlet221 11 днів тому

    Why is mailbox in kernel instead of shared memory? Could programs in theory implement their own mailbox in shared memory, so sockets is just an abstraction for developers?

  • @ThePowerRanger
    @ThePowerRanger Місяць тому

    God this channel is great.

  • @dullyvampir83
    @dullyvampir83 14 днів тому

    Great video! What I'm not quiet sure I get, why not implement the mail boxes on top of shared memory with libraries in user space?

  • @tibontibon5772
    @tibontibon5772 2 місяці тому

    bro youre awesome, thank you very much for the explanation!!

  • @jean-naymar602
    @jean-naymar602 2 місяці тому

    Thank you again for this amazing video!

  • @AchrafTITO-vl1hi
    @AchrafTITO-vl1hi 2 місяці тому +1

    The Question here is that we as a software developers do we just need to learn about thoes topics in a basic way know what that do and why , or not knowing them will effect our job ? I mean the web dev backend & machine learning

    • @yimyim117
      @yimyim117 2 місяці тому +1

      It generally is very important to understand the behaviour of the operating system, your program runs on. Because system calls are used quite heavily most of the time. Also when implementing efficient IPC architectures for parallelized machine learning, this could potentially be important. To know the up-and downside of the IPC models.

    • @AchrafTITO-vl1hi
      @AchrafTITO-vl1hi 2 місяці тому

      @yimyim117 thank you sir

  • @ABaumstumpf
    @ABaumstumpf 2 місяці тому

    Message-passing really is fast enough in 99% of all cases.
    And when it is not - then you notice. But unless you have very good reasons to do otherwise you should stick with messaging. It is a lot simpler to set up and get going, and even if it turns out to be too slow later it is easy to replace.

    • @MadScientist267
      @MadScientist267 Місяць тому

      I'm not all that experienced but a few years back needed to do a bunch of IPC and needed it robust. I found sharing memory to be buggy (probably my fault lol) but message passing was rock solid with the race conditions dealt with. I got around any "speed" issues by passing them within memory by doing it on a small ram drive... it was clumsy code to look at but ran perfect and to be honest, I'd probably do it the same way (just better organized) today if I were to go at the same project again.

  • @RandomGeometryDashStuff
    @RandomGeometryDashStuff 2 місяці тому

    13:30 kernel also has to copy message from sender process to queue to receiver process

  • @ADNANEELMIR-r8f
    @ADNANEELMIR-r8f Місяць тому +1

    can you make a simple video about "File Descriptors" .

  • @exe.m1dn1ght
    @exe.m1dn1ght 2 місяці тому

    9:51 , why i feel this is an open hole for malicious code to execute right there ?

  • @vikraal6974
    @vikraal6974 26 днів тому

    If process A sends message to the mailbox. How does process B know that they have a message before they can call receive()?

  • @averagejoe8386
    @averagejoe8386 2 місяці тому

    Very good explanation.

  • @GiC7
    @GiC7 2 місяці тому +1

    Thanks, great lecture

  • @AEF23C20
    @AEF23C20 29 днів тому

    cooperating processes:
    4. different rights for processes
    5. if a process crashes, the other processes continue to work - this is reliability
    etc...

  • @juanjosecabrera3240
    @juanjosecabrera3240 2 місяці тому

    I was just yesterday thinking about how can I improve processes communication (I'm using curl to pass event from a zig process to a nodejs service🤦‍♂)

  • @tommyhuffman7499
    @tommyhuffman7499 2 місяці тому

    This is so good! Thank you!!

  • @randomgamevideos241
    @randomgamevideos241 Місяць тому

    Ever since this video i have been wandering where, STDIO fall, is it an IPC thing using send messages , and what is a pipe ?

  • @Tayoky
    @Tayoky 2 місяці тому +1

    cool video what sofware do you use to make that

  • @marceloreston
    @marceloreston 2 місяці тому

    Excellent video! Congratulations!

  • @MrSomethingdark
    @MrSomethingdark 2 місяці тому

    Quick Time, now that's a name I haven't heard since the Browser Wars!!!

  • @sobreinquisidor
    @sobreinquisidor 2 місяці тому

    Can you do a video on async/await specifically around non blocking IO and how that can make web servers faster?

  • @diamonddemon7612
    @diamonddemon7612 2 місяці тому

    I want to know how memory is managed between the kernel and the hardware. Could you explain how an MMU (Memory Management Unit) works and how the kernels access to the RAM is different from processes running on the computer

    • @CoreDumpped
      @CoreDumpped  2 місяці тому +1

      Yes, that topic is already on my list.

    • @ItsCOMMANDer_
      @ItsCOMMANDer_ 2 місяці тому

      MMUs are really cool (and pretty simple too!)

  • @Occultastic
    @Occultastic 2 місяці тому +1

    we are so back, boys.

  • @ayobomari8990
    @ayobomari8990 2 місяці тому

    Message passing is like how golang go routine communicate between each other using channels, "don't communicate by sharing memory, share memory by communicating"

  • @fullaccess2645
    @fullaccess2645 2 місяці тому

    KEEP COOKING BRO 💯💯💯💯💥💥💥

  • @FlyWR
    @FlyWR 2 місяці тому

    If your fractal image is a program, then anything is a "program", which means "program" does not make any sense and is not a term.
    An image produced by a program is not a program, unless that image is somehow executed afterwards.

  • @tonynarde5634
    @tonynarde5634 2 місяці тому

    In the shared memory approach how exactly do you prevent race conditions?

  • @MaxPicAxe
    @MaxPicAxe 2 місяці тому

    Very well made video