6 ms·
I dont see "why"? Any ideas?
by jiri 10y ago
I 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.