Skip to playerSkip to main contentSkip to footer
  • 6/8/2025
Ever clicked an icon and wondered how your program starts? Meet the Loader Module, the unsung hero in your operating system! This video breaks down how it loads programs from your disk to RAM, sets up processes, and gets your apps ready to roll. Perfect for tech newbies or curious coders! Join us for a fun, easy-to-follow explanation, and stick around for more OS secrets. Subscribe, comment your thoughts, and scan the QR code to explore more tutorials on our site! Let?s geek out together!

Introduction to Loader Module 00:00:00
What is the Loader Module 00:00:10
Role in Operating Systems 00:00:14
Loading Process Overview 00:00:21
Program Execution Trigger 00:00:44
Signal to Operating System 00:01:00
Executable Validation 00:01:43
Memory Allocation 00:02:31
Process Creation 00:03:05
Process Setup Completion 00:04:22
Operating System Scheduling 00:04:54
Multitasking Illusion 00:05:24
Process Termination 00:05:59
Loader Module Limitations 00:06:11
Conclusion and Summary 00:06:28
Call to Subscribe 00:07:00
Website and Community 00:07:56

Thanks for watching!

Find us on other social media here:
- https://www.NeuralLantern.com/social

Please help support us!

- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras
Transcript
00:00Hey there, let's talk about the Loader Module for just a second.
00:10What is the Loader Module?
00:11For starters, you probably have one on your computer at home.
00:14Almost, I mean as far as I understand, every major operating system has a Loader Module.
00:18I would be surprised if an operating system did not have one.
00:22The Loader Module is basically responsible for getting your program loaded from your
00:28hard disk, your SSD or whatever into RAM and sort of setting it up, setting up an empty
00:33process and getting it all prepared so that the operating system can begin executing your
00:38process.
00:39It doesn't actually execute it, it just gets it set up.
00:42So I mean think about it, what if I click on my desktop here and I click on this little
00:46mouse icon, this little text editor icon, the mouse pad, it launched.
00:52What happened?
00:53It wasn't running before and now it is running.
00:54Something had to do that.
00:56It wasn't the desktop environment actually.
00:58The desktop environment, when I click this little button, it just sent a signal to the
01:01operating system letting it know that I wanted to start executing a program but it didn't
01:05actually load it up for me.
01:07That's the Loader Module.
01:08The Loader Module is part of the operating system and imagine that as soon as I, you know,
01:15click this button right here, a signal gets sent to the operating system or maybe even if
01:19I just execute a command like echo, you know, test or something or run git, git status, let's
01:24say, or even I could run this terminal again, terminator, and it shows up in another window,
01:31something like that.
01:32Let me exit from that.
01:33You know, anything that I exit, whatever, the Loader Module is involved.
01:38So I click this and the first thing that will happen is the Loader Module will inspect the
01:43executable, which is just kind of sitting on disk somewhere, and it'll make sure that
01:47it's actually executable, it'll make sure not just in terms of, you know, permissions,
01:52that's sort of an operating system thing, a different part of the operating system, but
01:56it'll check to make sure, let's say that it's a binary program that needs to be executed.
02:00It'll make sure that the data inside of the binary, the actual executable is correct for
02:07the current system that you're on.
02:10Right now I'm on Linux 64-bit, so it'll make sure that the executable is in a ELF 64 format,
02:17or a format that can be executed.
02:20It'll check that, it'll make sure everything's okay, it'll make sure it's got some data,
02:23it's got like a, you know, an entry point, whatever, if everything looks good, then it
02:28will go through system RAM and try to find a little place in RAM that's unoccupied.
02:34I'm not going to talk too much about operating system concepts beyond the Loader Module, but
02:38just so you know, there is a paging system that it would go through, which sort of lets
02:43you have fragmented memory without too much of a penalty, so it's not necessarily scanning
02:48the RAM stick directly, but for our purposes, we'll just say it's looking for a free spot
02:53in memory.
02:54Anyway, once it finds out that there's a free spot in memory that's big enough to accommodate
02:59the program, then it actually loads the program from disk, from SSD, from whatever, into that
03:05spot in memory, and creates a process in the operating system.
03:10Remember everything that's actually running in your operating system is a process.
03:14There's a process for this notepad, there's a process for the mouse stuff, there's a process
03:18for this little widget down here, there's a process for the entire desktop, there's a
03:22process for probably every tab in your browser.
03:24You know, a process just means, here's a little spot in memory on the computer, and it's got
03:30a program inside of it, and it wants to be run by the CPU whenever the CPU thinks that
03:35it has some time to run that process.
03:38So that's like a process.
03:40Anyway, so it, you know, it finds a spot in memory, it loads the program in there, you
03:44know, checks everything, it sets it up as a process, which means it has to set up some
03:49data structures in the operating system indicating, hey, there's a new process in town, and here's
03:54where the memory is, and here's the first instruction that you should execute.
03:58And it just kind of sets everything up so that it's like a, like a ready process, a
04:03process in the ready state that hasn't been actually executed yet, but it's ready to get
04:07executed.
04:08So once it does all of that, creating the new process, you know, setting everything up,
04:14maybe figuring out what is the virtual memory address that the process is going to see and
04:19so forth.
04:20Then finally, it lets the operating system know that the process is ready to run.
04:24So before it was just kind of like loading it and setting it up, marking little flags.
04:28Figuring out the virtual memory offset, all that stuff.
04:31Then once that's all finished, it just tells the operating system.
04:34Now this process is ready to run.
04:37The process doesn't actually run at that point.
04:39Again, I'm going to try my best not to talk too much about operating systems concepts beyond
04:43the loader module, but the loader modules job is not to run the process.
04:47It's just to load it, just to set it up.
04:49At some later point in time, maybe some amount of microseconds or milliseconds in the future,
04:54the operating system will decide, okay, now I'm ready to let that program run for a little while.
04:58Since the process has already been set up by the loader module, the operating system knows
05:03where it is in memory and it knows the next instruction address or offset address to execute.
05:09It'll just start bringing those instructions onto the CPU and just execute them for some amount of time.
05:16And then the operating system will decide to stop and take it off the CPU again,
05:20you know, put it back just into a, into a ready state.
05:23And then it just keeps switching back and forth between that, by the way,
05:27have you ever wondered how it is that maybe your CPU only has one core or only eight cores,
05:32but there are hundreds of browser tabs that you have open hundreds and hundreds of processes that you have open.
05:38That's how the operating system does it.
05:40It, uh, it simulates, it provides the illusion that all these programs are running at the same time.
05:45So this notepad process right here, it's not actually running at all times.
05:49It just runs in tiny little slices.
05:51Again, I'll try to stay away from explaining that too much because I'm really here to talk about the loader module.
05:56Another thing to keep in mind is that eventually when your process terminates,
05:59like the, the program terminates itself or the operating system kills it for some reason,
06:03or just, you know, something happens to where it's just not going to be running anymore.
06:07It's not the loader module that has anything to do with that.
06:10And there is no unloader module.
06:12It will just mark itself as, you know, I'm done, I'm terminated, whatever, or it'll get marked.
06:17Then the operating system will come along and clean it up.
06:20So loader module is not involved in that step.
06:23It's just involved in getting, getting everything set up so that it can start to execute.
06:28And that's the basic idea.
06:30Uh, not, you know, super detailed, but, uh, that's what the loader module does in general.
06:35And you probably have a loader module on your operating system right now,
06:38unless you're running some bizarre operating system that has some other strange method of doing things.
06:45Okay. That's all I really wanted to say in this video.
06:49Thank you so much for watching.
06:50I hope you learned a little bit of stuff and had some fun.
06:53I'll see you in the next video.
06:55Hey everybody. Thanks for watching this video again from the bottom of my heart.
07:02I really appreciate it.
07:03I do hope you did learn something and have some fun.
07:06Uh, if you could do me a please, a small little favor, could you please subscribe and follow this channel or these videos or whatever it is you do on the current social media website that you're looking at right now.
07:17Um, it would really mean the world to me and it'll help make more videos and grow this community.
07:22So we'll be able to do more videos, longer videos, better videos, or just, I'll be able to keep making videos in general.
07:28So please do, do me a kindness and, uh, and subscribe.
07:32You know, sometimes I'm sleeping in the middle of the night and I just wake up because I know somebody subscribed or followed.
07:38It just wakes me up and I get filled with joy.
07:40That's exactly what happens every single time.
07:42So you could do it as a nice favor to me or you could, you could troll me if you want to just wake me up in the middle of the night, just subscribe and then I'll, I'll just wake up.
07:49Uh, I promise that's what will happen.
07:51Also, uh, if you look at the middle of the screen right now, you should see a QR code, which you can scan in order to go to the website, which I think is also named somewhere at the bottom of this video.
08:01And it'll take you to my main website where you can just kind of like, see all the videos I published and the services and tutorials and things that I offer and all that good stuff.
08:10And, uh, if you have a suggestion for, uh, uh, clarifications or errata or just future videos that you want to see, please leave a comment.
08:20Or if you just want to say, Hey, what's up, what's going on?
08:23You know, just send me a comment, whatever.
08:25I also wake up for those in the middle of the night.
08:27I get, I wake up in a cold sweat and I'm like, it would really, it really mean the world to me.
08:32I would really appreciate it.
08:33So again, thank you so much for watching this video and, um, enjoy the cool music as, as I fade into the darkness, which is coming for us all.
08:44Thank you so much for watching this video and this video.
08:45Let's see.
08:46Let's see.
08:47Let's see.

Recommended