7 ms·
Nommu Linux
- jiri 10y agoI dont see "why"? Any ideas?
- chongli 10y agoProbably so you can run on a microcontroller that lacks an MMU.
- duhast 10y agoLinux on embedded systems? I guess maybe also performance? No MMU means no TLB misses, page tables etc.
- eLobato 10y agoIt also means incredibly slow context switching
- panic 10y agoWouldn't it make context switching faster because you don't have to invalidate any TLB entries?
- TickleSteve 10y agoContext switching is more efficient due to less context.
- adrianN 10y agoVirtual address translation can introduce logarithmic slowdowns for certain memory access patterns. Other than that I don't know why you would want to eschew it.
- saiko-chriskun 10y agosee 'memory fragmentation is a big deal'
- jiri 10y agobut doing memory management is a big deal too
- mfukar 10y agoOnly if you have to. Not all processors come with a MMU. Using an OS is not always necessary. There are size thresholds for which a MMU makes sense - so memory management does not always imply a memory hierarchy which requires a MMU. Maybe a MMU does not make sense in systems with deterministic & hard real-time requirements.
- TickleSteve 10y agoPractically... no one would really use this. Anyone wanting a scheduler on a microcontroller based system would not want the baggage of a linux-level general purpose OS. You use a simple scheduler such as FreeRTOS/RTX/etc. These days the only systems without full MMUs are microcontroller-based ones for which this is not appropriate. No embedded system is going to be dynamically-loading applications like this, its all bare-metal, all built into the one image. No-MMU linux did have a use back when say the 68000 based lines were still in wide use, but these days all I can think of is for user-space linux where everything is simulated in a single process under a full general-purpose OS.
- stephen_g 10y agoWe used it on microwave link products and satellite tracking antennas (on MicroBlaze microcontrollers in Xillinx FPGAs) for many years until we moved to Zynq (FPGAs with a dual core Cortex-A9 bolted on) in 2013.
- TickleSteve 10y agocurious... why would you take the overhead of a general-purpose OS for a system like that? If its just for an IP stack, there's easier, more standard, less resource intensive ways of doing that than using a version of Linux with all its drawbacks.
- stephen_g 10y agoI wasn't there when the decision was made, but it was not too bad an environment. It ran a web server with quite a complex web application, multiple daemons monitoring and controlling various devices, SNMP, various DMAs into the FPGA's block memory to shunt data back and forth for processing in various ways. I probably would have looked at lighter options like VxWorks or QNX or something but for our new products with a dual core A9 Linux suits us really well.
- rjsw 10y agoIf you are creating a complicated communications product it can be helpful to be able to develop on a desktop machine then use basically the same source code on the embedded target.
- avodonosov 10y agoI don't know about this project, but having all processes in the same address space can simplify inter-operation - calling code and accessing data of another process. But that would also require some novel protection (access rights) principle, other than address space separation. The project mentions nothing like this.
- pmarin 10y agoI think is from the same people whom created an open source cpu implementation for the sh2 architecture called J2. They are doing a Linux port. http://j-core.org/talks/ELC-2016.pdf http://j-core.org/talks/ELC-2016.pdf
- cyber_dude 10y agoNot sure, but this should make the kernel implementation simple. Any low memory (RAM and Flash) microcontroller can take advantage of this.
- xgbi 10y agoI would guess battle testing some sensitive programs. Imagine running OpenSSL on this and seeing where the malloc() would fail and start garbaging the memory. But I guess you could also use a special malloc that randomly returns NULL to do that..
- bogomipz 10y agoCan you elaborate why it would it "garbaging" the memory if the malloc() failed to return an allocation to the app requesting it?
- loeg 10y ago> But I guess you could also use a special malloc that randomly returns NULL to do that.. On Linux, set the sysctl vm.overcommit_memory = 2. You can also usually instruct libc to trash freed memory as a debugging mode. But I don't know how to get glibc to do so. Valgrind is good at tracking this kind of thing as well, although slower.
- fsiefken 10y agoIt reminds me of the ELKS project to run Linux on i8086-i286. What would be the advantages or disadvantages of this compared to uClinux? For example perhaps it's raison d'etre is that you can run it on Cortex-M0 for ultra low power
- TickleSteve 10y agoNo one using a microcontroller-based system would be wanting dynamic loading, etc. This is purely a curiosity-satisfying project it seems.
- pantalaimon 10y ago> This is purely a curiosity-satisfying project it seems. http://www.emcraft.com/ http://www.emcraft.com/ suggests otherwise
- DeepYogurt 10y agoNeat, but why?
- bluejekyll 10y agoAnswered above. Some micro-controllers or fpga's ship without MMU's, this is needed if you want to run Linux.
- aMayn 10y agoSo basically like programming for AmigaOS 3.x?
- digi_owl 10y agoKinda. Best i can find is that AmigaOS didn't have memory protection because the 68k initially didn't have it, but later variants got it (68030 onwards?). I think there was similar issues with (classic) Mac OS and Windows 9x.
- bhaak 10y agoAlready the 68010 could have an external MMU, the 68451. IIRC the 68030 was the first 68k CPU that had one built-in. Not that it mattered for AmigaOS. Commodore always used the cheaper versions without MMU.
- ekianjo 10y agoAmigaOS did not have memory protection even in the later iterations post 68040 availability (A4000) - not sure about AmigaOS 4.x though.
- jug 10y agoAmigaOS 4 does use the MMU, but only to map pages to virtual addresses to for example help with memory fragmentation and swapping to disk. Here's some surprisingly thorough documentation on this: http://wiki.amigaos.net/wiki/Exec_Memory_Allocation http://wiki.amigaos.net/wiki/Exec_Memory_Allocation However, the MMU is not used for memory protection, not even on Amiga OS 4. Edit: OK, so not entirely true... See this for more: http://www.os4coding.net/forum/memory-protection-support http://www.os4coding.net/forum/memory-protection-support
- mnw21cam 10y agoIf you were lucky enough to have an Amiga with a CPU that did have an MMU, you could use a piece of freely-downloadable software (called GigaMem) to implement paged virtual memory - albeit still with a single address space. One of those few operating systems that could have virtual memory implemented outside the OS kernel.
- Rangi42 10y agoTempleOS already does this. ("This" being "no virtual addresses".)
- pathompong 10y agoI had a IP camera running uclinux [1] on ARM7 years ago. The camera was connected to the CPU with USB interface internally. I guess the benefit with using Linux was free ip, USB, and uvc stack. 1. http://www.uclinux.org http://www.uclinux.org
- T3RMINATED 10y agowho comes up with this garbage distro
- thedjinn 10y agoSo who actually checks return values of malloc, and why? (or why not?)
- Retr0spectrum 10y agoIMHO checking the return value is only useful if you can actually do something about it. For example, you might want to gracefully write a database to disk before terminating the program. It's definitely bad practice, but if you run out of memory during the initialisation of a program, quitting with a segfault is a fairly reasonable error. Of course, catching the error and printing something meaningful would be much better, but if you're in a rush to get something to work for a personal project it's not much of an issue.
- thedjinn 10y agoThe article states that malloc only fails when you run out of virtual address space, which is basically never going to happen if you're on a 64 bit architecture. So you can go for good practice and check all your mallocs for failure, but if the failure never happens why bother?
- bluejekyll 10y agoAlternatively you could throw in a wait/loop and then the program would recover if memory becomes available. Though, that might never happen...
- loeg 10y ago
- sshb 10y agoThere is no obvious practical application for such system. So "why?" is irrelevant here. Never the less taking such common abstraction as MMU and disabling it is awesome illustration of OS architecture.
- vadiml 10y agoWhat is difference between nommu linux and uclinux?
- poizan42 10y agoThat uClinux got merged into the mainline kernel and is basically the nommu support today, at least as far as I understand it.
- Retr0spectrum 10y agoI'm a little bit confused as to what this site actually is. Is nommu a fork of the linux kernel like uclinux? If so, where is the source? Or is it just a guide for programming on MMU-less systems (e.g. uclinux). I'm planning a MC68020 SBC project. My current goal is to get uclinux running, but I'd be interested to see what else I can run on it.
- pantalaimon 10y agonommu has been part of the mainline kernel for many years now, no fork needed.
- Retr0spectrum 10y agoAh, so it is. I feel like they should have stated that in the introductory paragraph.
- rasz_pl 10y agoWhy: Even 10 years ago some routers/set-top boxes ran on mmuless SoCs(Coldfire, lexra LX4180), and stayed on uclinux even after switching to new processors with mmu. http://paparisa.unpatti.ac.id/linux_journal_archive_1994_2007/LJ/160/9691.html http://paparisa.unpatti.ac.id/linux_journal_archive_1994_200...