Segmented, Paged and Virtual Memory

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024
  • Memory management is one of the main functions of an operating system. This video is an overview of the paged and segmented memory management systems. It describes how a segmented memory management system employs segments of different sizes, which can result in fragmented free space and prevent large processes from accessing the memory very often. This is compared with a paged memory management system in which small equal sized pages are used instead. Concepts such as logical and physical memory are explained, as well as the use of secondary storage to provide virtual memory.

ความคิดเห็น • 225

  • @Liam-bp2rm
    @Liam-bp2rm 3 ปีที่แล้ว +208

    He speaks so passionately and eloquently. He was born to be an educator.

    • @sergioloo_
      @sergioloo_ 2 ปีที่แล้ว +2

      He speaks like Mr Bean.

    • @lukaassaf3894
      @lukaassaf3894 2 ปีที่แล้ว

      no

    • @anirudhsrinivasaraghavan9561
      @anirudhsrinivasaraghavan9561 ปีที่แล้ว

      ya bro i aslo agree tis guy good explaning

    • @Nibbles.
      @Nibbles. 10 หลายเดือนก่อน +3

      the meat riding is crazy bro but yeah clear and concise.

  • @danielmcleod6535
    @danielmcleod6535 3 ปีที่แล้ว +113

    Lifesaver. Was trying to understand this from my lecturer for far too long, this saved me hours. Great concise explanation.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว +13

      Thank you. I'm glad to be of service :)KD

    • @lukaassaf3894
      @lukaassaf3894 2 ปีที่แล้ว

      @@ComputerScienceLessons cap

    • @lukaassaf3894
      @lukaassaf3894 2 ปีที่แล้ว

      @@ComputerScienceLessons liked the video tho :(

  • @alizein5107
    @alizein5107 3 ปีที่แล้ว +30

    my teacher just said:
    paging is dividing the memory into equal spaces..
    and then i had to figure out what happens from this amazing vid...
    it's really fun when you understand how it works not just telling me stuff to memorize like a memory card

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว +7

      I agree - you need to known WHY in order to appreciate something. :)KD

  • @daveamiana778
    @daveamiana778 3 ปีที่แล้ว +73

    Saved me 2 hours of rewatching my lecture on this. Thank you for such great content.

  • @chris7056
    @chris7056 5 ปีที่แล้ว +53

    your videos are a gem! thank you for this. i am going to be going through them over break - UCSD student here.

  • @MyStockz
    @MyStockz 8 หลายเดือนก่อน +2

    Last time I saw this video was 3 years ago. Whenever I want to refresh my paged/segmented/virtual memory knowledge, I skip all other videos on it and come straight to this.
    0% bullshit
    100% to the point/visualized explanation

    • @ComputerScienceLessons
      @ComputerScienceLessons  7 หลายเดือนก่อน +1

      Thank you. Welcome back :)KD

    • @MyStockz
      @MyStockz 7 หลายเดือนก่อน

      @@ComputerScienceLessons Thank you for the warm welcome ^_^

  • @yorha.a2
    @yorha.a2 2 ปีที่แล้ว +5

    Thank you for this! I've read and watched several articles and videos but none of them were as detailed and easy to understand as this

  • @hepbitkin9854
    @hepbitkin9854 2 ปีที่แล้ว +8

    That is the best video I have ever seen on the internet about segmentation, paging and swapping operations. Explaining all the concepts on the same video allows us to understand the whole concept of memory management. Thank you so much for your help.

  • @v380riMz
    @v380riMz 3 ปีที่แล้ว +7

    I swear you're helping me to pass my exam this friday.. First the negative binary addition and now paging. Thanks alot

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว

      You are most welcome. Keep up the good work, and the best of luck to you :)KD

  • @sunset6109
    @sunset6109 3 ปีที่แล้ว +45

    The 10 dislikes must be from my uni lecturers :)

  • @anthonyvaccaro2681
    @anthonyvaccaro2681 หลายเดือนก่อน

    You have such an amazing ability to simplify complex topics. Thank you

  • @celsiusfahrenheit1176
    @celsiusfahrenheit1176 4 ปีที่แล้ว +1

    you should be the only one teaching this, most eveyone else in billions of google searches could not clearly explain the difference between logical, physicla and virtual memory, i was very confused betweeen logical and virtual, now with one image I totally get it.

    • @ComputerScienceLessons
      @ComputerScienceLessons  4 ปีที่แล้ว

      It's actually a really simple idea isn't it? Thanks for the comment, it's much appreciated. :)KD

  • @raz0229
    @raz0229 2 ปีที่แล้ว +2

    Couldn't wrap my head around with fragmentation and paging by MMU from the book, watched this video and went through the chapter again. Excellent explanation mate 👍

  • @heinzotto1194
    @heinzotto1194 4 ปีที่แล้ว +12

    Clear and concise! This is great, thank you.

  • @thop7964
    @thop7964 ปีที่แล้ว +1

    I needed a refresher on segmented vs paged memory, and this was fantastic and concise. Wish this video was around when I learned about it the first time lol

  • @enchhuang3273
    @enchhuang3273 2 ปีที่แล้ว +3

    Thank you for this amazing video, I've spent the whole day today trying to understand my lectures, this helped clear things up so much!

  • @hongkyulee9724
    @hongkyulee9724 3 หลายเดือนก่อน +4

    Very clear and concise! Thank you for the good explanation!

  • @vephovandenberg3181
    @vephovandenberg3181 4 ปีที่แล้ว +2

    Currently, I am learning how do operating systems work. This video is super helpful. Thank you so much.

  • @akhileshbhalerao6908
    @akhileshbhalerao6908 2 ปีที่แล้ว +2

    It's been a long time i wasn't clear with the concept and after watching this video and many more videos of yours in this playlist.. All became crystal clear.. Thanks a lot.. 👍🏻

  • @taubenangriff
    @taubenangriff 2 ปีที่แล้ว +2

    exam in 2 days, crunching learning hard. what a great video to get into the basics fast.

  • @emperor8716
    @emperor8716 3 หลายเดือนก่อน +1

    Have an exam tmr and still haven't learnt this. I'm not stressing though because I know you won't disappoint :)

  • @intuitiveclass6401
    @intuitiveclass6401 ปีที่แล้ว +1

    I wish my professor spoke about these topics as concise as you do, thank you

  • @NeaRaRiver
    @NeaRaRiver 2 ปีที่แล้ว

    1. You sound like Daniel from the game Amnesia : The dark descent.
    2. Awesome. Hours of reading in 7 minutes... Why I just cant understand why cant people explain something easily with examples like this, we would have conquered all planets by now with educators like you. I start to think that we make things sound difficult on purpose... Thank you!

  • @williamjayaraj2244
    @williamjayaraj2244 2 ปีที่แล้ว +1

    Thank you for this lesson on memory allocation in computers. Easy to understand.

  • @user-dl3rc2bb1r
    @user-dl3rc2bb1r 9 หลายเดือนก่อน

    Thank you!!! Cannot understand this without you

  • @kosmasraptis8374
    @kosmasraptis8374 3 ปีที่แล้ว

    Personally I'm trying to make an operating system as a hobby and I randomly came across this so I watched it. Great explanation, I subbed

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว +1

      Thank you. If you're the next Bill Gates or Steve Jobs, remember me :)KD

    • @kosmasraptis8374
      @kosmasraptis8374 3 ปีที่แล้ว

      @@ComputerScienceLessons I sure will, my friend

  • @teetanrobotics5363
    @teetanrobotics5363 4 ปีที่แล้ว +2

    Best video on TH-cam.

  • @oliverbeck6839
    @oliverbeck6839 2 ปีที่แล้ว +1

    such a great voice, tone with a clear explanation, awesome...

  • @fluorescent_axolotl
    @fluorescent_axolotl 3 ปีที่แล้ว +3

    Beautifully done! I wish you were my professor.

  • @fatihersoy7559
    @fatihersoy7559 3 ปีที่แล้ว

    another subtle, concise and golden one.

  • @andrewgreen1970
    @andrewgreen1970 ปีที่แล้ว +1

    Stellar video. Clear and concise. Thank you.

  • @estherwahnon3638
    @estherwahnon3638 3 ปีที่แล้ว +1

    WOW. Incredible video , this helped me understood the material in such a small amount of time !!!! Highly recommended

  • @sylvestertweetyhunter1733
    @sylvestertweetyhunter1733 ปีที่แล้ว +1

    Helped me a lot with my exam. Thank you so much👍

  • @Liam-bp2rm
    @Liam-bp2rm 3 ปีที่แล้ว +1

    I am about to finish my second-to-last semester in my CS BA degree and just today found out there is a channel called computer science

  • @unity3dconcepts434
    @unity3dconcepts434 3 ปีที่แล้ว +2

    love your videos... :-D . your voice + tempo makes it more interesting

  • @timgorman807
    @timgorman807 2 ปีที่แล้ว +1

    This makes a lot more sense, brilliant.

  • @lamalamalamalamapapa
    @lamalamalamalamapapa 7 หลายเดือนก่อน +1

    what an excellent explanation!! thanks a lot!!

  • @Alex-fo7jc
    @Alex-fo7jc 4 ปีที่แล้ว +1

    Your explanation is the best! Thanks!

  • @mwtiktok7552
    @mwtiktok7552 หลายเดือนก่อน

    this was the best explanation! thank you so much!!!

  • @kanashimi6209
    @kanashimi6209 3 ปีที่แล้ว +1

    Thank you for all the great content you put out! Keep up the good work

  • @zerubabeljember9387
    @zerubabeljember9387 2 ปีที่แล้ว +2

    Thank you so much for making such amazing and clear lesson

  • @mr.t877
    @mr.t877 3 ปีที่แล้ว +3

    This was one of the best videos on this topic I found. THANK YOU SO MUCH. btw I like British English. :-)

  • @linyidai9076
    @linyidai9076 6 หลายเดือนก่อน

    thank you my friend, you helped my midterm :)

  • @fddon4166
    @fddon4166 5 ปีที่แล้ว +3

    flawless explanation!

    • @jirihorak2924
      @jirihorak2924 4 ปีที่แล้ว +2

      Not exactly. The segmented memory can be also virtualized. The video shows it in a way segments must follow each other, even though it is usually the same as with pages, the only difference is external fragmentation and internal fragmentation (=unused space in a segment) problem at once with segments (tries to balance both types out) or internal fragmentation only with pages.

  • @diogomeneses48
    @diogomeneses48 5 ปีที่แล้ว +2

    Very good articulation, please keep up!

  • @mk9834
    @mk9834 5 ปีที่แล้ว +2

    very clear and helpful presentation! thanks

  • @PhenChua
    @PhenChua ปีที่แล้ว +1

    Beautiful presentation

  • @charlesc2064
    @charlesc2064 4 ปีที่แล้ว +3

    Thank you!! Super easy to understand, loved it

  • @searchforwardlimited8657
    @searchforwardlimited8657 ปีที่แล้ว

    This is exactly what I need.

  • @yeadatwunyt8004
    @yeadatwunyt8004 ปีที่แล้ว +1

    wonderful presentation

  • @wonderbuddy3204
    @wonderbuddy3204 3 ปีที่แล้ว +1

    thank you so much for this, you have no idea how much you have helped me through!

  • @someone3706
    @someone3706 3 ปีที่แล้ว +2

    Your video is great, thank you. But I do not understand what does logical memory store? I mean, the logical memory part is not so clear. Sorry for the criticism.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว +3

      logical memory is not real!!! The operating system (E.G. Windows) fools each program into thinking it is the only thing running on the computer. It fools each program into thinking it has all of the memory to itself. Logical memory is one program's view of the memory - it is how an individual program sees the memory. Physical memory on the other hand is what is really going on - that is, lots of different programs sharing the memory (oblivious of each other). :)KD

    • @someone3706
      @someone3706 3 ปีที่แล้ว +1

      @@ComputerScienceLessons :))) Thank you it is now clear. Keep doing such kinds of videos.

  • @digitaldrive1192
    @digitaldrive1192 2 ปีที่แล้ว

    Great delivery, thanks.

  • @moarz__1888
    @moarz__1888 7 หลายเดือนก่อน +1

    This is insanely helpful

  • @jebalimazen1809
    @jebalimazen1809 ปีที่แล้ว +1

    I got nothing to say, you nailed it

  • @bextract0
    @bextract0 2 ปีที่แล้ว +1

    Fantastic resource.

  • @mohammadahmedragab837
    @mohammadahmedragab837 3 ปีที่แล้ว +1

    amazing concise information on memory management 💙💙💙

  • @vamosabv
    @vamosabv 3 ปีที่แล้ว

    Thanks for a very nice explanation with helpful diagrams!

  • @satyaprakash5503
    @satyaprakash5503 5 ปีที่แล้ว +5

    Please make a video on "Virtual segmented systems" .
    Thank you

  • @Got-it747
    @Got-it747 3 หลายเดือนก่อน

    My God, give this guy 1k more likes 🙏

  • @user-oy4kf5wr8l
    @user-oy4kf5wr8l หลายเดือนก่อน

    the voice in IT is so unique

  • @saudgl
    @saudgl 2 ปีที่แล้ว

    What a perfect explanation really good job

  • @friction5001
    @friction5001 3 ปีที่แล้ว +1

    This is mouth watery content

  • @swedishguyonyoutube4684
    @swedishguyonyoutube4684 3 ปีที่แล้ว +1

    YES! I LOVE these vids!

  • @oviya.n1317
    @oviya.n1317 3 ปีที่แล้ว +1

    This got me with a good revision ❤️

  • @KabelkowyJoe
    @KabelkowyJoe ปีที่แล้ว

    BUT in order to work CPU must have access must be provided to page list where each currently running process is loaded to translate adresses, 368 support this, 286 only segmented, 88/86 none only real mode, page size, segment size is defined in hardware

  • @com0oan
    @com0oan 3 ปีที่แล้ว

    Amazing presentation!

  • @indigod3323
    @indigod3323 8 หลายเดือนก่อน +1

    You are the best!

  • @nates9778
    @nates9778 3 ปีที่แล้ว +3

    Would there be a disadvantage for having a higher page size, 1gb for instance.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว +3

      It takes longer to swap large amounts of data in an out. You might also swap out some smaller programs and data unnecessarily, then need them again immediately. There's definitely a balancing act to be performed here. For windows based computers, someone decided 4KB was optimal :)KD

  • @binhtong570
    @binhtong570 3 ปีที่แล้ว

    Thank you! Your video is very informative.

  • @giorgosK936
    @giorgosK936 2 ปีที่แล้ว

    why is your voice so perfect?

  • @yahyarechaki9908
    @yahyarechaki9908 3 ปีที่แล้ว +1

    Thanks
    Here , 6:04 youre talking about the logical adress (logical memory) ? The logical memory is not necessary contiguous ?

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว

      Logical memory is smoke and mirrors! It is simply the way one program sees the memory. Each program is made to believe that it is the only thing running on the computer, and that it has all of the memory to itself. (thanks to the operating system). :)KD

  • @user-cy7st6bw4b
    @user-cy7st6bw4b 3 ปีที่แล้ว +1

    Very clear, thank you!

  • @chenchang-zr5rb
    @chenchang-zr5rb 3 หลายเดือนก่อน +1

    great video❤

  • @omarghoche1828
    @omarghoche1828 3 ปีที่แล้ว +1

    thank you for the explanation!

  • @aislinnlimbird8114
    @aislinnlimbird8114 3 ปีที่แล้ว +1

    Watching before my masters exam tomorrow :)

  • @saudaljaloud5953
    @saudaljaloud5953 3 หลายเดือนก่อน

    best video ever 👍👍👍

  • @ggeuk__5244
    @ggeuk__5244 3 ปีที่แล้ว +1

    This helped alotttt thankyou

  • @lucarauchenberger628
    @lucarauchenberger628 4 ปีที่แล้ว +1

    wow just wow! soooo helpful! thank you

  • @sto2779
    @sto2779 2 ปีที่แล้ว +1

    Where is the "page table" itself actually located, in memory or hard disk?

    • @vojtamaximus5291
      @vojtamaximus5291 2 ปีที่แล้ว +1

      During the execution time of a process, it is in main memory, for sure. It is part of a Process Control Block data structure, also called program descriptor, which contains all the info about a process.

  • @jojorose375
    @jojorose375 3 ปีที่แล้ว

    Thank you, it was an understandable lecture. .

  • @yousefmousa9796
    @yousefmousa9796 2 หลายเดือนก่อน

    Gold thanks !

  • @ed1849x
    @ed1849x ปีที่แล้ว +1

    Thank you!

  • @avirajpatil630
    @avirajpatil630 2 ปีที่แล้ว +1

    Thank you Sir

  • @filipsiroky4439
    @filipsiroky4439 5 ปีที่แล้ว +1

    thank you! really well explained

  • @juancamilogomezrave6097
    @juancamilogomezrave6097 2 ปีที่แล้ว +1

    This is a good information, and what about all Linux based systems?

  • @benyaminyakobi3652
    @benyaminyakobi3652 4 ปีที่แล้ว +1

    Thank you very much, clear explanation :)))

  • @Gooberpatrol66
    @Gooberpatrol66 11 หลายเดือนก่อน

    It's not true that segments must be swapped entirely. Multics had segments, and the segments were divided into pages, and the pages were swapped to disk

  • @user-xl8uo9gp9p
    @user-xl8uo9gp9p 3 ปีที่แล้ว

    so correct me if im wrong!
    segments are like those mentioned in say,x86 architecture
    ie code,data,stack etc?and at one time one process's one/more segments can be in physical ram(i mean is the ram concerned about "segments",which one!!,or it just "has the data"?)
    and these segments are atomic? but at 2:11 you say process is atomic??
    im stupid but please explain this to me,ive got everything jumbled in my head
    one bonus question::windows has page file,so it def uses paging.what about segmentation?

  • @swaminathbera6407
    @swaminathbera6407 7 หลายเดือนก่อน

    Segmentation is another non-contiguous memory allocation scheme like paging

  • @subodhvashistha676
    @subodhvashistha676 4 ปีที่แล้ว

    Crisp and clear

  • @setokousuke6548
    @setokousuke6548 3 ปีที่แล้ว

    may I ask how is modern os deal with memory management? I mean are they using pure paging or segmented paging. and also they're all hardware implements right?
    I'm learning os but I got so much confused between architecture because some of their content are duplicated to each other. Thanks for your video I'm really appreciate it.

  • @JKSmith-qs2ii
    @JKSmith-qs2ii 4 ปีที่แล้ว +1

    Excellent video! How is the address degined in paged memory? Is it supplied with a page number and an offset within that page? How does that work if some of the program is in memory, and other parts in virtual memory?

    • @ComputerScienceLessons
      @ComputerScienceLessons  4 ปีที่แล้ว

      A memory address includes a column address and a row address, and more! My playlist on Random Access Memory goes into more details about this: th-cam.com/play/PLTd6ceoshpreE_xQfQ-akUMU1sEtthFdB.html
      Page replacement techniques depend on the operating system. There's a good starter article on Wikipedia about this: en.wikipedia.org/wiki/Page_replacement_algorithm. I hope this helps :)KD

  • @tylsmithfield8971
    @tylsmithfield8971 3 ปีที่แล้ว +1

    Is the physical address of the operating system never fragmented?

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 ปีที่แล้ว

      I wouldn't say that. The operating system is usually more than just one program (much more in fact). There are programs that control the user interface, process scheduling, memory management, etc. etc. Some of the OS processes that load when a system boots up (E.G. the so called kernel) are always running and will not become fragmented. :)KD

    • @tylsmithfield8971
      @tylsmithfield8971 2 ปีที่แล้ว

      @@ComputerScienceLessons So if I understand it correctly, kernel address space is contiguous both in virtual memory and physical memory. Does that mean the kernel address space is always located at the same location on physical memory? I would be great if you could make an in-depth video about kernel address space with concepts like kernel image, kernel stack, kernel metadata, kernel ASLR and so on. Really appreciate your videos. thanks.

  • @2giaitich98
    @2giaitich98 2 ปีที่แล้ว

    Could you help me? In which system is segmentation with paging used (give an example of at least one system)?

  • @calvin_713
    @calvin_713 9 หลายเดือนก่อน +1

    THanks!

  • @logangraham2956
    @logangraham2956 2 ปีที่แล้ว +1

    luckily i have 46GB of ram XD
    put simple, under normal condition i will never run out of ram.
    even if a single program is experiencing a memory leak it still wouldn't fill up very fast.
    i would have to have several programs experiencing memory leaks all at the same time to even remotely have a possibility of running out of memory which is not at all remotely likely.

    • @ComputerScienceLessons
      @ComputerScienceLessons  2 ปีที่แล้ว

      46GB!!! :)KD

    • @logangraham2956
      @logangraham2956 2 ปีที่แล้ว

      @@ComputerScienceLessons sorry 48* not 46

    • @logangraham2956
      @logangraham2956 2 ปีที่แล้ว

      @@ComputerScienceLessonsya i know , crazy amount of ram XD literally will probably never use it all even if i wanted to.
      tis a recycled server computer
      48GB ram
      2x intel xeon x5675
      nvidia gtx 1070 ti duke
      4x 1tb drives hardware raid0 to 2x 2tb logical drives then software mirrored .
      so i have 2tbs worth of drive space that is reduntant only for my /home
      and a seperate 1tb drive for the /
      it's a "nice" system if just a tad bit on the slow side compared to current pcs of modern time.

    • @logangraham2956
      @logangraham2956 2 ปีที่แล้ว

      @@ComputerScienceLessons reason im here though is i need to figure out how to implement paging :) having only 2MiB worth of usable memory in my experimental operating system sounds like it could eventually lead to some problems.
      i guess i should also figure out a way to calculate just how much of that 2MiB space i've already used up. right now im only really able to calculate for the stack but pretty much nothing else.

  • @gtb7878
    @gtb7878 4 ปีที่แล้ว +1

    thanks :) very good to understand

  • @simatbirch
    @simatbirch 4 ปีที่แล้ว +1

    Excellent - subbed!

  • @Crazygon1998
    @Crazygon1998 5 ปีที่แล้ว

    Thank you very much!