I don’t think this was Steve’s best video. In my opinion he mixed up three important concepts that have different motivations and are easier to understand separately: relocation, virtual memory and segmentation. Early computers ran a single job at a time so the programmer could decide to start his program at any arbitrary address and place the data in memory as he wanted, there was no interference from other programs. The next step was multi programming where several programs were in memory at the same time and the processor time-sliced between them. Initially this was achieved by using a ‘relocating loader’ that adjusted any internal (relative) address references to the actual addresses in memory. Then hardware was devised to help - a Base and Limit register set that allowed each program to see its address space starting at zero and continuing up to the limit. This had the dual benefit of performing the relocation using hardware that just added the base address to each memory reference (and checking it didn’t exceed the limit) and protecting other programs (and the operating system) from getting overwritten by accidents or bugs. The Base/Limit approach continued into the 1970s (think ICL1900, IBM360) but had the disadvantage that memory needed to be allocated in one contiguous block for each program, which leads to inefficient use over time, unused gaps etc. And this at a time when memory prices were the key constraint in building large computers. To increase efficiency the team at Manchester University designed Atlas to have demand paged virtual memory, so that the need for large contiguous blocks of memory could be overcome. Finally the next generation of computers using virtual memory, eg Multics figured that you could also Segment virtual memory so as to have read only pages shared by several programs, like library routines, and other uses for shared segments were found, for inter program communications. Hope this helps.
I've been bothered by a simple question regarding virtual memory. Suppose I have some extremely time-critical program that needs to run as quickly as possible. With virtual memory, it seems to me that every time my program reads or writes to an address (presumably this happens constantly), the operating system needs to translate this address into a physical address and look there instead. Wouldn't this introduce a significant amount of runtime overhead to the program? I recognize the countless benefits of virtual memory -- from sharing memory between processes to general system security -- but are there not situations where it would be preferable to avoid this overhead and use direct physical memory access?
@@dannystoll84 Hi - doing the lookup to translate from virtual to real address is done using associative memory - one register per virtual page and this is effectively done in parallel for all pages, so it’s extremely fast - much faster than memory access. If the page is marked as not in memory then an interrupt is raised and the OS has to get the page from disk/SSD which is orders of magnitude slower. For information that is time critical or for other reasons must always be available, eg for DMA transfers, pages can be marked as being permanently resident in memory, so they are never swapped out. Hope this helps?
Another benefit of virtual-memory is memory-isolation. It prevents programs from messing with memory of other programs, which increases stability and increases security (it's not 100%, but certainly better than letting all programs access shared physical memory).
Isn't that done regardless of virtualization? the OS won't let your program touch memory outside of the bounds allocated to it, being referenced directly or through translated addresses, and the shared memory for libraries will be read-only for your process regardless
@@nullptr. When your program is running your OS (likely) doesn't. The OS needs to be notified when invalid address is being accessed. For that to happen, the hardware needs to know which addresses are valid. Presumably, without asking the OS every single time a memory access happens (because that'd be colossal waste of time). It is possible to do this without virtualization, with more primitive mechanisms. But there needs to be _some_ mechanism to facilitate this.
Back when there were operating systems like ms dos and windows 3.1 and 95 and all that jazz before program memory was virtualized the OS memory on non Unix systems would often crash whenever a program crashed, which would sometimes be every two or so hours if you were lucky
@@AndrewTSq a technical failure such as a buffer overflow or any memory leak would still just result in crashing other programs running even on virtualized OS memory, that is until software arbitration improved with the introduction of IPCs and processes/services.
6:40 There's a real benefit for multiple mappings and it's when running virtual machines: the virtualised OS does one mapping for its programs and the host OS does another to the physical RAM.
Not really, each VM is just an "application". It will make no difference, the most recent used page will always be the most recent used page on all VM's anyway. Also, that would be impossible (you would need a physical MMU per each VM).
@@framegrace1 If you think of running an OS just like an »application«, you might think of software-emulating the whole machine including MMU, CPU, graphics etc. Actual virtualization does much more than that, so Jan Sten Adámek's original point is an apt ovservation.
The presenter is getting very good at asking pertinent questions. If we ever have an AI working on the meaning of life the universe and everything he could come in handy.
Brady was described by Matt Parker as the audience in the room. He has a knack for asking the right questions at the right time for what the viewer is thinking.
Windows 10 and 11 use this technique as "fast startup", too. So, when you shut down the PC, it writes the volatile memory to the non-volatile storage. That way, your boot time is quicker. Rather than going through your entire bootloader sequence, it can just throw the written storage DATA back into RAM. Kind of like a hybrid of Hibernate mode and Sleep mode. This is why Hibernate mode is now hidden by default in Win10/Win11.
It's of course a highlighter pen, used normally to *highlight* EXISTING black text/writing.... the clue is in its title - to use as just a pen is just plain ridiculous
The lighting + fluorescent marker was a bold choice. But I didn't dislike it as much as others seemed to have. I think it was fun and interesting, in small doses. (I certainly wouldn't want it to be the norm though.)
I liked that the talk mixes different concepts and approaches on RAM management - all because it has been developed on top of one another and tries to solve one common problem, in steps.
About 30 years ago I wrote an incremental linker for Unix (mostly for Sun, but it got ported at least a couple of times -- for all I know, it's still running someplace), and this was around the time that a lot of low-level I/O operations were starting to be written using mmap. Some colleagues suggested at the time I should forsake read() and write() and just use mmap for everything, but my experiments showed it actually made the linker slower to use that for everything, despite it being faster to use it for some things, such as incrementally updating the debugging information in the output file. I've occasionally wondered if making basic I/O depend on mmap ever happened, and if so, how they solved the performance issue I saw. But I don't program at the level anymore, so I don't know how things work these days, and I'm at the mercy of the people writing O/S stuff, instead of being one of the people inflicting my decisions on others.
There are actually microcontrollers with 4 bytes of RAM. They use flash as program and static data memory, and have 1 kilobyte of it; RAM is used only for changing data, e.g. in the hello world you'd need 1 byte of RAM to loop over the data. They are useful in smallest of embedded applications: battery monitors, pushbutton inpts, watchdog timers, simple regulators, infrared remotes and so on.
@@jonasdaverio9369 Not really. It had registers - accumulator, 12-bit pointer register, PC, status, SP (imagine using stack on that 😂). It was a specific set of chips of a family that had all the same core but with different peripherals and different RAM sizes: 4, 16, 64 and 128 bytes of RAM variants, and 1-4k program memory. This one was just the most stripped down one, cheapest of them. I got myself a 64b/1k variant with built-in ADC, never got to use it.
@@sharpfang Why would you want 4 bytes of RAM if you already have so much registers? (Wow, 8 bytes of memory just with registers, that must seem a lot compared to the RAM). I can't seem to understand why it would be economical to be that restrictive on RAM when you already have a comparable amount of registers.
@@jonasdaverio9369 accumulator receives result of every command, so it's not suitable for storing data. 12-bit pointer register is necessary to access the program/data memory, so if you use it for storing own stuff, you can't access any static data, just your 4 bytes of RAM. Can't really mess with PC because that's what makes the program run at all. Status is essentially read-only, and changes after every command, so no storing stuff there. Only the 1 byte of SP could be usable for storing variable data.
@@sharpfang Ok, my point was just that you could consider your RAM as general use registers, even though it's an external device. It would be used in a very similar way (the only difference would be adressing)
I think it was a Sun OS implementation where we put a lot of Ram in this particular system and the OS insisted that you had to have a swap partition about 1.5x the real Ram. It meant we had to buy an extra ultra scsi disk just for a swap partition we didn’t even want. Learning experience
You could have partitioned an existing HDD. The _real_ problems were that the swapping algorithms were still primitive (Linux swap partitions also needed to be 1.5x RAM size) and that Sun assumed that you wanted swap (which at the time, given RAM sizes, was reasonable).
Oddly I was just thinking about this a few minutes before finding your comment. That said, I thought it the minimum size of swap was twice that of physical memory? This requirement did also affect other BSD derivates and there was a technical reason for it but I long forgot it. Maybe somebody else can explain?
@@RonJohn63 Linux - the kernel that is - never had a requirement for swap. It's just the installers of some Linux distributions stubornly insisted on a swap partition. Sometimes one could wiggle around that, sometimes one had to just accept that and remove the swap partition after the installation was complete.
That was not a caprice, or a way to sell more disk. It was recommended so the OS could store the memory and the symbols on kernel panics. So they could investigate later if needed. Almost all early Unixes did the same, Linux included. Curiously enough, nowadays Laptops use this same feature to be able to hibernate; they dump all memory to swap like when a panic, so they can restore the laptop to exactly the same state on restart.
FYI, one of the most popular home computers of the 1980s, the Commodore 64, was equipped with 64 KiB of RAM. Its CPU, the MOS 6510, divided memory into 256-byte pages. That's 8 bits of address space per page. Makes a lot of sense, considering it was an 8-bit CPU (other than addresses, of course). It even had a special "zero-page" addressing mode for some instructions, that reduced the instruction size by a byte, and often saved a cycle too, in exchange for being restricted to the lower 256 bytes. As you might imagine, that zero page was crowded with important system variables. Well, the C64 also had no virtual memory. But then, it barely had an operating system, either, so...
@@toby9999 Which after a while burns the hex numbers of the opcodes so badly into the brain that now about 40 years later I still do recall all the commonly used opcodes of the 6502.
@@toby9999 ISTR I did that a few times myself. In retrospect, it's rather hardcore. 😆 And since you said, "6502", I should mention something else. The C64 had the 6510, which was pretty much a 6502 with an added I/O port, mapped to the bottom 2 bytes of the address space (alas, sacrificing some of that precious zero page), which the C64 used for controlling bank switching (it was equipped with a full 64 KiB of RAM _and_ 20 KiB ROMs _and_ several chips with memory-mapped registers, and it wasn't possible to have all of it available at once in a single 64 KiB space) and the tape drive.
Virtual memory is also important for making 32 bit programs work seamlessly on 64 bit systems. Each program can still only target 4GB, but by translating the addresses to 64 bit, they can be spread out in physical memory and avoid overlapping memory spaces.
I actually made a video on this lol but without all the jargon. Lot's of stop gap animation as well. But listening to a master of his craft is awesome.
11:07 Love how he just casually explained the concept of address mirroring. This is actually a trick the Game Boy Advance uses: A pointer to the IRQ handler is supposed to go at 0x03007FFC but an actual interrupt loads the address stored at 0x03FFFFFC which is much easier for the ARM to load due to its use of ompressed operands. Thanks to mirroring it works out to be the same value regardless.
In a way, memory chips do this all the time, since there is the address map, the logical map, and the physical map in the chip. The address map is what the CPU see as the memory locations, e.g. 0x0023-0x0025. The logical map is how the addresses are in the chip the address sequence might be 0x0023, 0x0025, 0x0024 for instance. and the physical map is how the actual memory cells are laid out on the chip, usually bit grouped instead of byte grouped, all the first bits are grouped, then the second bits are grouped, etc. Again, the order of the bits might be different on the chip as well, with the physical locations of the third bits of the byte are next to the first bits instead of the second. I'll admit I'm a bit out of date w/regards to memory layout since its been 21 years since I worked on testing the chips, so it might not be the same anymore.
Have you ever considered a series for GPUs? I think it would be great, since there are barely any reliable and modern information about how GPUs actually work nowadays.
I don't know if I got correctly what the professor said about the multilevel translation but modern systems do use it. Each process commonly uses only a little of the available memory and its "pages" are adjacent which means that its translation table is mostly empty. This would waste memory to store the empty cells of the table. To counteract this, translation can be made multilevel, so that each table points to another, which exists only if the memory it points to is actually used.
That is done by the kernel. (and much more). MMU Optimization is maybe the main source of speed differences between OS's. THe only thing that needs to be done fast is the memory translation. How do you configure that MMU doesn't require realtime accuracy.
01:50 I think you just named a semiconductor company. I can see it now; *_Luminous Computers_* in some warehouse district, with a giant sign in Neon (real or simulated).
It kinda is like having more RAM. A process can request a block of memory from the kernel and the kernel can just give it a virtual address and still not map it to a physical location until that process really wants to write to that location. In other words the OS can lie and claim that the computer has got e.g. 16 GB of memory while it only has 8.
When I first learned about virtual memory (in the context of 386 protected mode) all the pagetable stuff seemed like a bunch of convoluted nonsense. Now, I see how elegant it is, page faults transferring control to the OS to load pages of memory from disk into RAM, and the program continues on its way none the wiser.
I got the same sense when I initially started with this concept too. Especially multilevel paging... but the more I think about it now, all these core designs are really so beautiful and elegant. Blows my mind how the cpu literally does not know the difference between an app, a driver, our os, or anything else. All these are artificial boundaries created by us humans :) My teacher once gave the analogy of cpu being just a buzzsaw lol
The good thing about swap files on linux is that you can add them on the fly if you need them and if your computer is still responsive. Swap files and partitions can also exist simultaniously for whatever reason there might be for such a setup. But I have a question about swap files, is there a way to read what data is stored in it? I mean, could a swap file be a potential security risk?
Yup, if your super-secret password for some reason gets swapped out anyone with read rights on the swap file/partition can potentially read it. That's why Linux whines if your swap file has public read and suggests you chmod it 0600. You can also set up cryptswap, so your file gets encrypted and you can have your swap partition on a Luks encrypted area.
Doesn't Ben Eater's 8-bit computer means it has 8 bits for memory addressing? Meaning it can address 2^8=256 bytes? This one has 16 bytes of addressable memory, making it a 4-bit if I understand correctly.
This seems close to how cartridge game console like the NES and SNES worked. The cartridge basically is part of the memory and can be addressed immediately. So nothing needed to be loaded into memory; the game cartridge is the memory.
1:35 You would likely need to salvage part of the initial program space, overwriting it with the output. Donald Knuts book had a challenge, writing the shortest program that fills the entire memory (including the program itself) with a single value. This would be similar, except no perfect overwriting of every memory cell is necessary.
I thought paging files/partitions were mostly phased out due to SSD wear leveling concerns? I know this was a big issue with running windows XP/Vista on SSDs (and whether or not to have a swap partition on linux systems).
The algorithms used by SSD controller chips got better. Of course, _the_ solution is to have lots and lots of RAM. (Thus, while my CPU is still an archaic FX-6100, the mobo is filled to it's 32GB max, and I use a SATA SSD drive.)
IIRC, SSD's have a similar "Memory Mapping" technology inside which makes the wear leveling for you. So you write lineal, but the SSD scatters the data all over the place. Anyway, remember that pages on memory Pages on disk. You can use a different storage algorithm to store the page depending on the underlying storage, if you want.
To answer this question, I paraphrase Seymour Cray: "Virtual memory is memory that you don't have." - what he actually said was: "Memory is like an orgasm. It's a lot better if you don't have to fake it."
Isn't dual abstraction of address space a big thing in security. I could have sworn the second layer was undersubscribed with blocks acting basically as honey pots. When the first layer tried to manually request the location in a rude way, think off by 1 C index requests, a security exception would be raised and the OS would know that there was a bad actor thread running. Please see buffer overflow vulnerability mitigation.
Yeah it's common to put holes in virtual memory at the start+end of the stack/heap allocations. A strcpy to a heap address then couldn't corrupt other allocations, recursion won't clobber other thread stacks, etc. It doesn't help much for array index OOBs though.
They've boosted the saturation of orange to make the pen look radioactive, but the paper is still unreadable with insufficient contrast in brightness. Isn't this what was used to be called a memory mapped file? Programs dealing media streams wouldn't attempt to load the whole file into memory, unless the program is a dumb as Windows Sound Recorder. They'd read it from disk and use a structure like Photoshop's scratch disk for edits.
Memory-mapped files are an application of virtual memory. Like, on Linux, you use the "mmap" function to map a file into memory (it takes a file descriptor and an offset into the file as arguments). But, if you want to just allocate RAM, then you call the same function but ask for "anonymous memory" and don't supply a file descriptor. The two things are handled through the exact same system call. On Windows, the equivalent system call is called "VirtualAlloc" and it functions more or less the same way. Memory mapped files and virtual memory are the same thing, at this level, using the same system call. The difference being whether the pages you're allocating are backed up by a physical file or not (and, as mentioned, they're called "anonymous" when they're not). It's the same thing, really. "Virtual memory" is the overall mechanism, "memory mapped files" is a particular application of it to map a file into RAM pages.
Internal builds have had it available for a long time, it’s not that it wasn’t possible, it’s that generally, it’s just not a good idea. As a rule, you should not need to swap on a mobile platform. Still, systems built for two applications are going to start supporting eight concurrent applications overnight, so fair enough
I'd like to know more about a hypervisor running multiple operating systems with identical read only blocks. Does it dedupe and combine blocks across VM guests during idle time? And does VTd speed up hypervisor memory lookups?
A patch is just an update to code on the system. What the specific patch does to make things better (performance, security, new features, etc) will be different for each patch. I'm not sure what angle a video on Windows Update technology could have that would be useful for a general purpose audience.
If you ever have run a program with AddressSanitizer enabled, then you get funny amounts of virtual memory used in htop. But physical memory usage is still normal.
Goodness! Using two 16-bit registers on the 8086 to create a 20-bit address of the form Segment:Offset ... nightmares! Even today, when buying clothes, I get a shiver when I see _Small, Medium, Compact, Large,_ and _Huge._ 👻
Now I know why old computers gain so much performance from SSD upgrade due to the bit of memory being copied in a storage as a form of a translated pages (swap/ swap compressed). Accessing the HDD going to be insanely slow if you're RAM limited thus replacing it with SSD going to make a significant improvement on getting the CPU fully loaded with process. Especially on 32-bit machine with 4GB of memory. Of course we are still limited by the maximum bus speed at the end of the day even with, say, SATA3 ssd.
That’s a bad characterisation. Not using it is reflective of a modern, resource efficient OS. I’m not aware if Android uses swap but if it does then it’s a recent addition. Notice that they didn’t add it to iOS. A mobile OS should be stingey with resources. They didn’t forget to add it. The point in bringing it to iPad is that it’s moving from a just a fork of a mobile OS to one focused around desktop style multitasking needing desktop amounts of RAM that just weren’t realistic before. If I had an older gen iPad I’d be more disappointed that it arrived at all rather than acting like Apple was late to add it.
@@Freshbott2 I just feel silly for assuming that iOS already used some type of swap for the past decade. But then again, I haven't purchased an iOS device in over a decade, either. I do know however that Android has had ZRAM (compressed virtual memory) since about version 4-something.
This is a benefit the video doesn't explain: Virtual memory allows the applications to use all the addressing space, no matter the physical amount of ram available. So in a 64 bits machine, the application can use any of the 16 billion gigabytes of addresses if it wants. The Memory Mapping unit will match it to somewhere on the memory you have. That means that appart of being 32 or 64 bits, the application doesn't care of the amount of memory. (The OS will send an error if there's not more RAM and the app will stop)
what if there was some important data like passwords, keys can u force it to allocate on disk and then pull the plug and search on disk for this important data?
You could probably do Hello World with 16 bytes because there are only 7 different characters. The rest of the bytes would be for mapping the duplicates
Ahhh, I love how they pretend this is a new thing. I remember using windows 3 and setting up my virtual memory to be a set size rather than dynamic. Such fun.
That would likely be something implemented by the memory chips/modules themselves. While that would add another level of lookup/translation, it's probably not something the CPU would be made aware of.
Wear-leveling isn't needed for DRAM, but yes it might work like that if it was required. DRAM doesn't have write endurance limitations as it's only holding a charge temporarily for each bit, unlike flash memory which needs to force a charge through a barrier to store it when unpowered, which causes a small amount of damage each time
Depends on whether the requested data is located in RAM and whether the memory page has been accessed recently. The translation is built into the memory management unit (MMU). On all modern CPUs the MMU is directly integrated into the CPU which performs the translation on the fly. So for that part of the translation process: No delays. But of course there is a catch. In order for the MMU to do the translation, it needs access to the page table which is stored in memory. And memory accesses are slow compared to the CPU. So the MMU has a special cache, called the translation lookaside buffer (TLB). So for most requests, it can avoid to access the page table. And of course if the data is not stored in RAM but swapped out, it takes forever (well, compared to the speed the CPU runs) to swap the data back in. So long story short: Most of the time: No delay. A slight delay if the MMU needs to access the page table. And a huge delay of the page has been swapped out.
VERY 🤔 about Samsung's "RAM Plus" feature. Feel like their offering less RAM then normal then replacing it with this potential hoodwink. My thought is wether it's innovative or a just a gimmicky thing.
Would this somehow protect against attacks in memory tho? Meaning if someone is attacking the memory to try and get some data from there, and there is a virtual memory in place, would that somehow slow them down or prevent them from getting data out? Since they would be seeing one address but in fact its in another address. Or would it not matter?
It makes no real difference. The computer has to know how to access the information, the manufacturer has to publish details of how it's done, the attacker will have the know-how-or it's not a successful attacker. Bad attackers get no money.😁
It's very confusing that the OS will somehow manage the logic of Virtual memory as OS is also running in the CPU and possibly using the data from RAM itself.
Some RAM is marked as Do Not Swap. Such as the code that does the actual memory swapping. Otherwise it could swap itself out, similar to one eating their own head.
Don't SSDs have quite a limited number of write cycles? Imagine you really use virtual memory for video editing. Then you have to copy a lot of data onto the SSD very often. Of course the SSD controller will make sure that the data is spread among all areas of the SDD to avoid using a single area too often, but if there are only a few GB of space left on the SSD, there still is the danger that it has to write on the same area again unless the controller moves the existing data once in a while. Still I would like to keep amount of write cycles as small as possible, if that is the same SSD that also contains important data.
Modern SSDs have a lot of write cycles. It’s not a problem for the lifetime of an iPad. And swap is only implemented in M1-based iPads that have a lot of ram anyway.
This video screams "computerphile: late night". I love it, but it looks like you pulled Stave from a party after a few drinks and decided to make the video right then
Is it just me or does apple sound really outdated? Like in this video virtual memory is mentioned as a new thing on iPads, and in another video a modern looking Mac was mentioned as having a 2 core cpu. Both of these things have been popular since the early 2000s.
I don’t think this was Steve’s best video. In my opinion he mixed up three important concepts that have different motivations and are easier to understand separately: relocation, virtual memory and segmentation.
Early computers ran a single job at a time so the programmer could decide to start his program at any arbitrary address and place the data in memory as he wanted, there was no interference from other programs.
The next step was multi programming where several programs were in memory at the same time and the processor time-sliced between them. Initially this was achieved by using a ‘relocating loader’ that adjusted any internal (relative) address references to the actual addresses in memory. Then hardware was devised to help - a Base and Limit register set that allowed each program to see its address space starting at zero and continuing up to the limit. This had the dual benefit of performing the relocation using hardware that just added the base address to each memory reference (and checking it didn’t exceed the limit) and protecting other programs (and the operating system) from getting overwritten by accidents or bugs.
The Base/Limit approach continued into the 1970s (think ICL1900, IBM360) but had the disadvantage that memory needed to be allocated in one contiguous block for each program, which leads to inefficient use over time, unused gaps etc. And this at a time when memory prices were the key constraint in building large computers.
To increase efficiency the team at Manchester University designed Atlas to have demand paged virtual memory, so that the need for large contiguous blocks of memory could be overcome.
Finally the next generation of computers using virtual memory, eg Multics figured that you could also Segment virtual memory so as to have read only pages shared by several programs, like library routines, and other uses for shared segments were found, for inter program communications.
Hope this helps.
this is a content channel, just something for clicks
I wish I understand more of the differences between the different types of memory management.
Nice explanation dude. I'll add that to my ever expanding block of computer knowledge.
I've been bothered by a simple question regarding virtual memory. Suppose I have some extremely time-critical program that needs to run as quickly as possible. With virtual memory, it seems to me that every time my program reads or writes to an address (presumably this happens constantly), the operating system needs to translate this address into a physical address and look there instead. Wouldn't this introduce a significant amount of runtime overhead to the program?
I recognize the countless benefits of virtual memory -- from sharing memory between processes to general system security -- but are there not situations where it would be preferable to avoid this overhead and use direct physical memory access?
@@dannystoll84 Hi - doing the lookup to translate from virtual to real address is done using associative memory - one register per virtual page and this is effectively done in parallel for all pages, so it’s extremely fast - much faster than memory access. If the page is marked as not in memory then an interrupt is raised and the OS has to get the page from disk/SSD which is orders of magnitude slower. For information that is time critical or for other reasons must always be available, eg for DMA transfers, pages can be marked as being permanently resident in memory, so they are never swapped out. Hope this helps?
Another benefit of virtual-memory is memory-isolation. It prevents programs from messing with memory of other programs, which increases stability and increases security (it's not 100%, but certainly better than letting all programs access shared physical memory).
Isn't that done regardless of virtualization? the OS won't let your program touch memory outside of the bounds allocated to it, being referenced directly or through translated addresses, and the shared memory for libraries will be read-only for your process regardless
@@nullptr. When your program is running your OS (likely) doesn't. The OS needs to be notified when invalid address is being accessed. For that to happen, the hardware needs to know which addresses are valid. Presumably, without asking the OS every single time a memory access happens (because that'd be colossal waste of time).
It is possible to do this without virtualization, with more primitive mechanisms. But there needs to be _some_ mechanism to facilitate this.
I've wondered about this.. does this mean a buffer overflow is impossible then?
Back when there were operating systems like ms dos and windows 3.1 and 95 and all that jazz before program memory was virtualized the OS memory on non Unix systems would often crash whenever a program crashed, which would sometimes be every two or so hours if you were lucky
@@AndrewTSq a technical failure such as a buffer overflow or any memory leak would still just result in crashing other programs running even on virtualized OS memory, that is until software arbitration improved with the introduction of IPCs and processes/services.
6:40 There's a real benefit for multiple mappings and it's when running virtual machines: the virtualised OS does one mapping for its programs and the host OS does another to the physical RAM.
Not really, each VM is just an "application". It will make no difference, the most recent used page will always be the most recent used page on all VM's anyway.
Also, that would be impossible (you would need a physical MMU per each VM).
@@framegrace1 You don't need a separate MMU per VM, just a MMU which supports two levels of mapping such as Intel VT-x and AMD-V.
@@framegrace1 If you think of running an OS just like an »application«, you might think of software-emulating the whole machine including MMU, CPU, graphics etc. Actual virtualization does much more than that, so Jan Sten Adámek's original point is an apt ovservation.
And this is the comment Steve wanted.
Well done everybody. As soon as he said it I started scrolling, and I (and I expect, Steve), was not disappointed
I've had the question in the title of this video for numerous years. Thank you Computerphile.
The presenter is getting very good at asking pertinent questions.
If we ever have an AI working on the meaning of life the universe and everything he could come in handy.
42.
Brady was described by Matt Parker as the audience in the room. He has a knack for asking the right questions at the right time for what the viewer is thinking.
@@lordplenty Thanks for all the fish.
Windows 10 and 11 use this technique as "fast startup", too. So, when you shut down the PC, it writes the volatile memory to the non-volatile storage. That way, your boot time is quicker. Rather than going through your entire bootloader sequence, it can just throw the written storage DATA back into RAM. Kind of like a hybrid of Hibernate mode and Sleep mode. This is why Hibernate mode is now hidden by default in Win10/Win11.
Someone take away his pastel coloured markers and give him a black pen - then we'd be able to see his diagrams!
YES!
Orange highlighter on white paper was an awful decision.
It's of course a highlighter pen, used normally to *highlight* EXISTING black text/writing.... the clue is in its title - to use as just a pen is just plain ridiculous
Hard words but justified
@David Jameson He had, and uses later in the video, other more visible colors on hand. He could've gone with the darker ones to start.
The lighting + fluorescent marker was a bold choice. But I didn't dislike it as much as others seemed to have. I think it was fun and interesting, in small doses. (I certainly wouldn't want it to be the norm though.)
I liked that the talk mixes different concepts and approaches on RAM management - all because it has been developed on top of one another and tries to solve one common problem, in steps.
About 30 years ago I wrote an incremental linker for Unix (mostly for Sun, but it got ported at least a couple of times -- for all I know, it's still running someplace), and this was around the time that a lot of low-level I/O operations were starting to be written using mmap. Some colleagues suggested at the time I should forsake read() and write() and just use mmap for everything, but my experiments showed it actually made the linker slower to use that for everything, despite it being faster to use it for some things, such as incrementally updating the debugging information in the output file. I've occasionally wondered if making basic I/O depend on mmap ever happened, and if so, how they solved the performance issue I saw. But I don't program at the level anymore, so I don't know how things work these days, and I'm at the mercy of the people writing O/S stuff, instead of being one of the people inflicting my decisions on others.
There are actually microcontrollers with 4 bytes of RAM. They use flash as program and static data memory, and have 1 kilobyte of it; RAM is used only for changing data, e.g. in the hello world you'd need 1 byte of RAM to loop over the data. They are useful in smallest of embedded applications: battery monitors, pushbutton inpts, watchdog timers, simple regulators, infrared remotes and so on.
I guess you would call them registers at this point, or is there any reason not to?
@@jonasdaverio9369 Not really. It had registers - accumulator, 12-bit pointer register, PC, status, SP (imagine using stack on that 😂). It was a specific set of chips of a family that had all the same core but with different peripherals and different RAM sizes: 4, 16, 64 and 128 bytes of RAM variants, and 1-4k program memory. This one was just the most stripped down one, cheapest of them. I got myself a 64b/1k variant with built-in ADC, never got to use it.
@@sharpfang Why would you want 4 bytes of RAM if you already have so much registers? (Wow, 8 bytes of memory just with registers, that must seem a lot compared to the RAM). I can't seem to understand why it would be economical to be that restrictive on RAM when you already have a comparable amount of registers.
@@jonasdaverio9369 accumulator receives result of every command, so it's not suitable for storing data. 12-bit pointer register is necessary to access the program/data memory, so if you use it for storing own stuff, you can't access any static data, just your 4 bytes of RAM. Can't really mess with PC because that's what makes the program run at all. Status is essentially read-only, and changes after every command, so no storing stuff there. Only the 1 byte of SP could be usable for storing variable data.
@@sharpfang Ok, my point was just that you could consider your RAM as general use registers, even though it's an external device. It would be used in a very similar way (the only difference would be adressing)
I think it was a Sun OS implementation where we put a lot of Ram in this particular system and the OS insisted that you had to have a swap partition about 1.5x the real Ram. It meant we had to buy an extra ultra scsi disk just for a swap partition we didn’t even want.
Learning experience
If it was Solaris then it's absolutely normal (standard) that it does non-logical things :-)
You could have partitioned an existing HDD. The _real_ problems were that the swapping algorithms were still primitive (Linux swap partitions also needed to be 1.5x RAM size) and that Sun assumed that you wanted swap (which at the time, given RAM sizes, was reasonable).
Oddly I was just thinking about this a few minutes before finding your comment. That said, I thought it the minimum size of swap was twice that of physical memory? This requirement did also affect other BSD derivates and there was a technical reason for it but I long forgot it. Maybe somebody else can explain?
@@RonJohn63 Linux - the kernel that is - never had a requirement for swap. It's just the installers of some Linux distributions stubornly insisted on a swap partition. Sometimes one could wiggle around that, sometimes one had to just accept that and remove the swap partition after the installation was complete.
That was not a caprice, or a way to sell more disk. It was recommended so the OS could store the memory and the symbols on kernel panics. So they could investigate later if needed. Almost all early Unixes did the same, Linux included.
Curiously enough, nowadays Laptops use this same feature to be able to hibernate; they dump all memory to swap like when a panic, so they can restore the laptop to exactly the same state on restart.
FYI, one of the most popular home computers of the 1980s, the Commodore 64, was equipped with 64 KiB of RAM. Its CPU, the MOS 6510, divided memory into 256-byte pages. That's 8 bits of address space per page. Makes a lot of sense, considering it was an 8-bit CPU (other than addresses, of course). It even had a special "zero-page" addressing mode for some instructions, that reduced the instruction size by a byte, and often saved a cycle too, in exchange for being restricted to the lower 256 bytes. As you might imagine, that zero page was crowded with important system variables.
Well, the C64 also had no virtual memory. But then, it barely had an operating system, either, so...
I can still remember writing 6502 code all in hex for the C64. No assembler.
@@toby9999 Which after a while burns the hex numbers of the opcodes so badly into the brain that now about 40 years later I still do recall all the commonly used opcodes of the 6502.
@@toby9999 ISTR I did that a few times myself. In retrospect, it's rather hardcore. 😆
And since you said, "6502", I should mention something else. The C64 had the 6510, which was pretty much a 6502 with an added I/O port, mapped to the bottom 2 bytes of the address space (alas, sacrificing some of that precious zero page), which the C64 used for controlling bank switching (it was equipped with a full 64 KiB of RAM _and_ 20 KiB ROMs _and_ several chips with memory-mapped registers, and it wasn't possible to have all of it available at once in a single 64 KiB space) and the tape drive.
@Ralf Baechle
ORG 0C00
EE 20 D0 4C 00 0C
@Daniel Dawson Had I known that from the beginning I would have never used $00 to store joystick reads... my game kept crashing and I had no idea why!
Starting the weekend well!
Virtual memory is also important for making 32 bit programs work seamlessly on 64 bit systems.
Each program can still only target 4GB, but by translating the addresses to 64 bit, they can be spread out in physical memory and avoid overlapping memory spaces.
Who makes these thumbnails? That person needs a raise.
I actually made a video on this lol but without all the jargon. Lot's of stop gap animation as well.
But listening to a master of his craft is awesome.
11:07 Love how he just casually explained the concept of address mirroring. This is actually a trick the Game Boy Advance uses: A pointer to the IRQ handler is supposed to go at 0x03007FFC but an actual interrupt loads the address stored at 0x03FFFFFC which is much easier for the ARM to load due to its use of ompressed operands. Thanks to mirroring it works out to be the same value regardless.
finally i can leave hundreds of tabs open on my ipad exactly like my pc
I wish I only had hundreds open!
In a way, memory chips do this all the time, since there is the address map, the logical map, and the physical map in the chip. The address map is what the CPU see as the memory locations, e.g. 0x0023-0x0025. The logical map is how the addresses are in the chip the address sequence might be 0x0023, 0x0025, 0x0024 for instance. and the physical map is how the actual memory cells are laid out on the chip, usually bit grouped instead of byte grouped, all the first bits are grouped, then the second bits are grouped, etc. Again, the order of the bits might be different on the chip as well, with the physical locations of the third bits of the byte are next to the first bits instead of the second. I'll admit I'm a bit out of date w/regards to memory layout since its been 21 years since I worked on testing the chips, so it might not be the same anymore.
17:24 Linux also supports swap files. In fact you can have many swap partitions and files at the same time and even add and remove them on the fly.
You can also have virtual swap via zram!
Have you ever considered a series for GPUs? I think it would be great, since there are barely any reliable and modern information about how GPUs actually work nowadays.
Have you found any? I'm in the same boat, can't seem to find some solid information on GPUs
This video would have been *really* useful to me a week ago when I was having my OS finals
I don't know if I got correctly what the professor said about the multilevel translation but modern systems do use it. Each process commonly uses only a little of the available memory and its "pages" are adjacent which means that its translation table is mostly empty. This would waste memory to store the empty cells of the table. To counteract this, translation can be made multilevel, so that each table points to another, which exists only if the memory it points to is actually used.
That is done by the kernel. (and much more). MMU Optimization is maybe the main source of speed differences between OS's. THe only thing that needs to be done fast is the memory translation. How do you configure that MMU doesn't require realtime accuracy.
@@framegrace1 Still, that doesn't change the fact that multilevel translation does happen.
Guuyyyys, give the man a high contrast marker so we can see what he draws.
01:50 I think you just named a semiconductor company.
I can see it now; *_Luminous Computers_* in some warehouse district, with a giant sign in Neon (real or simulated).
Virtual memory makes me think of "downloading more ram".
It kinda is like having more RAM. A process can request a block of memory from the kernel and the kernel can just give it a virtual address and still not map it to a physical location until that process really wants to write to that location. In other words the OS can lie and claim that the computer has got e.g. 16 GB of memory while it only has 8.
So it's kinda like a hashtable but for hardware?
When I first learned about virtual memory (in the context of 386 protected mode) all the pagetable stuff seemed like a bunch of convoluted nonsense. Now, I see how elegant it is, page faults transferring control to the OS to load pages of memory from disk into RAM, and the program continues on its way none the wiser.
I got the same sense when I initially started with this concept too. Especially multilevel paging... but the more I think about it now, all these core designs are really so beautiful and elegant.
Blows my mind how the cpu literally does not know the difference between an app, a driver, our os, or anything else. All these are artificial boundaries created by us humans :) My teacher once gave the analogy of cpu being just a buzzsaw lol
The good thing about swap files on linux is that you can add them on the fly if you need them and if your computer is still responsive. Swap files and partitions can also exist simultaniously for whatever reason there might be for such a setup. But I have a question about swap files, is there a way to read what data is stored in it? I mean, could a swap file be a potential security risk?
The risk can be mitigated, but yes, see the swap-digger tool for example.
Yup, if your super-secret password for some reason gets swapped out anyone with read rights on the swap file/partition can potentially read it.
That's why Linux whines if your swap file has public read and suggests you chmod it 0600.
You can also set up cryptswap, so your file gets encrypted and you can have your swap partition on a Luks encrypted area.
If you can read the swap file, you can also read the swap partition, but also read the memory directly.
@@d5uncr That's why applications should keep their secrets in mlock'd memory.
See: man 2 mlock
Ben Eater’s 8-bit computer, 16 bytes, hello world works.
Doesn't Ben Eater's 8-bit computer means it has 8 bits for memory addressing? Meaning it can address 2^8=256 bytes? This one has 16 bytes of addressable memory, making it a 4-bit if I understand correctly.
@@samuel7998 No. When people talk about 8-bit, 16-bit, etc. computers , they mean the width of the data bus, not the address bus.
@@jope4009 actually they talk about the accumulator size. Lookup 8086 vs 8088. Same 16bit cpu except for databus.
This seems close to how cartridge game console like the NES and SNES worked. The cartridge basically is part of the memory and can be addressed immediately. So nothing needed to be loaded into memory; the game cartridge is the memory.
1:35 You would likely need to salvage part of the initial program space, overwriting it with the output.
Donald Knuts book had a challenge, writing the shortest program that fills the entire memory (including the program itself) with a single value. This would be similar, except no perfect overwriting of every memory cell is necessary.
I thought paging files/partitions were mostly phased out due to SSD wear leveling concerns? I know this was a big issue with running windows XP/Vista on SSDs (and whether or not to have a swap partition on linux systems).
The algorithms used by SSD controller chips got better. Of course, _the_ solution is to have lots and lots of RAM. (Thus, while my CPU is still an archaic FX-6100, the mobo is filled to it's 32GB max, and I use a SATA SSD drive.)
IIRC, SSD's have a similar "Memory Mapping" technology inside which makes the wear leveling for you. So you write lineal, but the SSD scatters the data all over the place. Anyway, remember that pages on memory Pages on disk. You can use a different storage algorithm to store the page depending on the underlying storage, if you want.
To answer this question, I paraphrase Seymour Cray: "Virtual memory is memory that you don't have." - what he actually said was: "Memory is like an orgasm. It's a lot better if you don't have to fake it."
Isn't dual abstraction of address space a big thing in security. I could have sworn the second layer was undersubscribed with blocks acting basically as honey pots. When the first layer tried to manually request the location in a rude way, think off by 1 C index requests, a security exception would be raised and the OS would know that there was a bad actor thread running.
Please see buffer overflow vulnerability mitigation.
Yeah it's common to put holes in virtual memory at the start+end of the stack/heap allocations. A strcpy to a heap address then couldn't corrupt other allocations, recursion won't clobber other thread stacks, etc. It doesn't help much for array index OOBs though.
AFAIK, this all comes from how kernels handle the MMU, not MMU itself or having multiple MMU's.
"of course 16 byte CPU wouldn't be much use for anything" -- the guy obviously hasn't heard of Ben Eater
Can I finally download more RAM?
They've boosted the saturation of orange to make the pen look radioactive, but the paper is still unreadable with insufficient contrast in brightness. Isn't this what was used to be called a memory mapped file? Programs dealing media streams wouldn't attempt to load the whole file into memory, unless the program is a dumb as Windows Sound Recorder. They'd read it from disk and use a structure like Photoshop's scratch disk for edits.
Memory-mapped files are an application of virtual memory.
Like, on Linux, you use the "mmap" function to map a file into memory (it takes a file descriptor and an offset into the file as arguments). But, if you want to just allocate RAM, then you call the same function but ask for "anonymous memory" and don't supply a file descriptor.
The two things are handled through the exact same system call.
On Windows, the equivalent system call is called "VirtualAlloc" and it functions more or less the same way.
Memory mapped files and virtual memory are the same thing, at this level, using the same system call. The difference being whether the pages you're allocating are backed up by a physical file or not (and, as mentioned, they're called "anonymous" when they're not).
It's the same thing, really. "Virtual memory" is the overall mechanism, "memory mapped files" is a particular application of it to map a file into RAM pages.
Orange highlighter might not have been the best choice
I am more shocked iOS did not support swap/virtual memory/page before now.
Internal builds have had it available for a long time, it’s not that it wasn’t possible, it’s that generally, it’s just not a good idea. As a rule, you should not need to swap on a mobile platform. Still, systems built for two applications are going to start supporting eight concurrent applications overnight, so fair enough
I think they did, but at an OS/program level, not app level. Same as Android.
.. did you watch the whole video?
How many layers of abstraction are possible before nobody in the world actually understands how a computer or application works?
Great video!!!
A perfectly excellent description of paging - which has been around for zonks. Sorry is there something "new", couldn't see that bit :S
They didn't say paging was new.
@@ChrisLee-yr7tz Indeed they didn't.
I'd like to know more about a hypervisor running multiple operating systems with identical read only blocks. Does it dedupe and combine blocks across VM guests during idle time? And does VTd speed up hypervisor memory lookups?
Didn’t IBM do an early version of this in the 1960’s.
Yes and some earlier systems had virtual memory as well.
Can you do a video on Microsoft patches and how they protect the computers from vulnerabilities
A patch is just an update to code on the system. What the specific patch does to make things better (performance, security, new features, etc) will be different for each patch. I'm not sure what angle a video on Windows Update technology could have that would be useful for a general purpose audience.
@@Faladrin More specially what it means by remote code execution, elevation of privileged , security bypass
If you ever have run a program with AddressSanitizer enabled, then you get funny amounts of virtual memory used in htop.
But physical memory usage is still normal.
Segmented addressing. Never mention that again! :)
Goodness! Using two 16-bit registers on the 8086 to create a 20-bit address of the form Segment:Offset ... nightmares!
Even today, when buying clothes, I get a shiver when I see _Small, Medium, Compact, Large,_ and _Huge._ 👻
Now I know why old computers gain so much performance from SSD upgrade due to the bit of memory being copied in a storage as a form of a translated pages (swap/ swap compressed). Accessing the HDD going to be insanely slow if you're RAM limited thus replacing it with SSD going to make a significant improvement on getting the CPU fully loaded with process. Especially on 32-bit machine with 4GB of memory.
Of course we are still limited by the maximum bus speed at the end of the day even with, say, SATA3 ssd.
Virtual memory is backup RAM for when you play modern videogames like Warzone on an 8GB PC at the cost of fps.
2:29 Am I high? (The marker)
Wowzer!! Apple is advancing into the 1990s! Truly magical.
Every once in a while Apple or Google announces a feature in one of their devices and my only reaction is "HOW did you NOT already have that?!"
Why is this being drawn out on this kind of paper and highlighter? Was there no pen available? This is so hard to read
Virtual Pen needed to be swapped out for a real pen.
Chain paper: "what did I do wrong?"
The implementation on iPad must be something more than a decades old computer technology? I can't get my head around this.
Steve has the coolest shirt on
and it has very strong buttons!
I've done plenty of things in assembly in embedded applications using 16 bytes or less. So it certainly isn't useless.
Let's not use a orange marker pen ever again :)
I think that safety is important and one should use double-protection technologies, such as Oreol Staking!
Highlighter not the best pen 😀
Advertising your computer having virtual memory as a selling point in 2022 is like treating a car having wheels as a selling point.
if it works for the normies then that's all it needs.
That’s a bad characterisation. Not using it is reflective of a modern, resource efficient OS. I’m not aware if Android uses swap but if it does then it’s a recent addition. Notice that they didn’t add it to iOS.
A mobile OS should be stingey with resources. They didn’t forget to add it. The point in bringing it to iPad is that it’s moving from a just a fork of a mobile OS to one focused around desktop style multitasking needing desktop amounts of RAM that just weren’t realistic before.
If I had an older gen iPad I’d be more disappointed that it arrived at all rather than acting like Apple was late to add it.
@@Freshbott2 I just feel silly for assuming that iOS already used some type of swap for the past decade. But then again, I haven't purchased an iOS device in over a decade, either. I do know however that Android has had ZRAM (compressed virtual memory) since about version 4-something.
@@Freshbott2 another Apple fanboy
VMware virtualisation / MS hypervisor
Mapping changes all the time cause DRS moves workloads around and re-registeres virtual memory continuously
Wouldn't a similar thing happen when you attach a second RAM, so its starter address has to be appended to machine's total available?
This is a benefit the video doesn't explain: Virtual memory allows the applications to use all the addressing space, no matter the physical amount of ram available. So in a 64 bits machine, the application can use any of the 16 billion gigabytes of addresses if it wants. The Memory Mapping unit will match it to somewhere on the memory you have.
That means that appart of being 32 or 64 bits, the application doesn't care of the amount of memory. (The OS will send an error if there's not more RAM and the app will stop)
what if there was some important data like passwords, keys can u force it to allocate on disk and then pull the plug and search on disk for this important data?
Couldn't follow along with the yellow marker on white paper, very hard to read
Oh my! That pen...
Isn’t that essentially what mmap in c is doing?
Hello world in ascii might work but ut8 🤷🏽♂️
You could probably do Hello World with 16 bytes because there are only 7 different characters. The rest of the bytes would be for mapping the duplicates
You could do Hello World with 1 byte or even less.
You just need an ISA with a dedicated Hello World instruction :P
That's a pretty trippy marker! I want one! 😛😉
4K is the largest amount you can do 16 bit CRC with.
Highlighters are supposed to be the most visible pen
The opposite of this is a RAM drive but with 12 terabyte hard drives being economical they don't get much use anymore
Ahhh, I love how they pretend this is a new thing. I remember using windows 3 and setting up my virtual memory to be a set size rather than dynamic. Such fun.
The new IPad Pro, now running on an i286.
Yeah, even phones have it now
How did it not have swap in the first place , at the end of the day its just a modified BSD .
Where do they pretend this is a new thing?
@@wearwolf2500 segmented memory.. Yeah!! ;)
Is there also wear levelling for RAM? And does that use a second virtual memory lookup?
That would likely be something implemented by the memory chips/modules themselves. While that would add another level of lookup/translation, it's probably not something the CPU would be made aware of.
No wear leveling for RAM.
Wear-leveling isn't needed for DRAM, but yes it might work like that if it was required.
DRAM doesn't have write endurance limitations as it's only holding a charge temporarily for each bit, unlike flash memory which needs to force a charge through a barrier to store it when unpowered, which causes a small amount of damage each time
There is no wear levelling for RAM.
How much delay does virtual memory introduce versus accessing memory directly?
Depends on whether the requested data is located in RAM and whether the memory page has been accessed recently. The translation is built into the memory management unit (MMU). On all modern CPUs the MMU is directly integrated into the CPU which performs the translation on the fly. So for that part of the translation process: No delays. But of course there is a catch.
In order for the MMU to do the translation, it needs access to the page table which is stored in memory. And memory accesses are slow compared to the CPU. So the MMU has a special cache, called the translation lookaside buffer (TLB). So for most requests, it can avoid to access the page table.
And of course if the data is not stored in RAM but swapped out, it takes forever (well, compared to the speed the CPU runs) to swap the data back in.
So long story short: Most of the time: No delay. A slight delay if the MMU needs to access the page table. And a huge delay of the page has been swapped out.
I can print "Hello world" in one byte. Build a computer that prints "Hello world" if its byte is 1, and does not print "Hello world" if its byte is 0.
Make a LED lamp with a "Hello World" mask on it and turn it one with 1 bit
Sharpie please
VERY 🤔 about Samsung's "RAM Plus" feature. Feel like their offering less RAM then normal then replacing it with this potential hoodwink. My thought is wether it's innovative or a just a gimmicky thing.
Nice
Yep
The opposite of RAM disc.
Fyi, orange highlighter is not the best choice for showing info on paper.
Download more ram?
Virtual memory is the best
Black marker pls
Would this somehow protect against attacks in memory tho? Meaning if someone is attacking the memory to try and get some data from there, and there is a virtual memory in place, would that somehow slow them down or prevent them from getting data out? Since they would be seeing one address but in fact its in another address. Or would it not matter?
It makes no real difference. The computer has to know how to access the information, the manufacturer has to publish details of how it's done, the attacker will have the know-how-or it's not a successful attacker. Bad attackers get no money.😁
@@trelligan42 thank you for the clarification. I Appreciate it.
It's very confusing that the OS will somehow manage the logic of Virtual memory as OS is also running in the CPU and possibly using the data from RAM itself.
Some RAM is marked as Do Not Swap. Such as the code that does the actual memory swapping. Otherwise it could swap itself out, similar to one eating their own head.
Don't SSDs have quite a limited number of write cycles? Imagine you really use virtual memory for video editing. Then you have to copy a lot of data onto the SSD very often. Of course the SSD controller will make sure that the data is spread among all areas of the SDD to avoid using a single area too often, but if there are only a few GB of space left on the SSD, there still is the danger that it has to write on the same area again unless the controller moves the existing data once in a while. Still I would like to keep amount of write cycles as small as possible, if that is the same SSD that also contains important data.
Modern SSDs have a lot of write cycles. It’s not a problem for the lifetime of an iPad. And swap is only implemented in M1-based iPads that have a lot of ram anyway.
LFG if you don’t work with Oreol Staking provider yet
Is this available on the M1 chip?
that was a poor choice of pen
I am colorblind. Cannot see any of these diagrams.
can we take a look at PassKey announced by Apple and maybe Google, Windows soon. hardware security primitives what are they?
This video screams "computerphile: late night". I love it, but it looks like you pulled Stave from a party after a few drinks and decided to make the video right then
Who diagrams with a highlighter???
Do this damage ssd
I just download more RAM when I run out
10PRINT"HELLO WORLD" on my BBC Micro takes 20 bytes (The difference between TOP and PAGE).
Is it just me or does apple sound really outdated? Like in this video virtual memory is mentioned as a new thing on iPads, and in another video a modern looking Mac was mentioned as having a 2 core cpu. Both of these things have been popular since the early 2000s.