Questions tagged [virtual-memory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 views

Would an asynchronous interrupt context write to the page table in the Linux kernel?

Specifically, in the Linux kernel, is it possible that the page table (level3_kernel_pgt) can be overwritten when an asynchronous interrupt context happens (Local timer interrupts). I've been seeing ...
0
votes
1answer
36 views

how to check virtual memory page size without getconf

I need to check vm pagesize on an embedded device running linux. Do not have the getconf to check the same. Is there a way to check the page size in linux without getconf, is it possible to derive it ...
0
votes
1answer
39 views

Why are the virtual memory regions for the same program different on every run?

I am studying virtual memory mappings of memory regions in Linux. The executable is a simple counting program. When two instances of the program are run, the following are the mappings shown by /proc/...
1
vote
0answers
14 views

Are there custom memory manager (mm) replacements for Linux kernel?

Are there alternatives to Linux kernel memory manager (mm)? More specifically, are there companies that develop their own replacements for mm algorithms to suit specific needs such as supercomputing ...
2
votes
1answer
48 views

How does Linux translate a physical address to (possibly multiple) virtual address?

From my understanding, when Linux swaps a physical page frame in/out RAM, it needs to set valid bit for all virtual pages mapping into this physical page. Mapping a virtual page to physical page frame ...
2
votes
0answers
54 views

virtual address translation in Linux

I try to translate a virtual address to a physical address. I can translate the below address. 00400000-00401000 r-xp 00000000 103:04 14292394 /home/user/readMaps 00600000-00601000 r--p 00000000 103:...
0
votes
1answer
46 views

Are Virtual Memory and Swap Space the same?

I have been working with Linux for quite sometime and when we say virtual memory are we referring to swap space? Say for instance in the top command we have a separate column for VIRT(virtual memory), ...
0
votes
1answer
64 views

how user access page tables

how will translation of address take place in user mode? if user has a separate page table, then where are these stored? Moreover, how will the user access page tables stored in kernel address space ...
0
votes
1answer
55 views

I can't really get why directories in paging are needed

I've been trying to figure out this stuff for years, but every time I don't understand. I understand quite well how paging, page tables and page table directories work in Linux, I just don't get why ...
0
votes
0answers
30 views

linux kernel virtual memory layout

I'm using the 32bit 4.1.8 linux kernel , RT patch (no high memory) and changing the following configurations: -CONFIG_LOWMEM_SIZE (Maximum low memory size) -CONFIG_PAGE_OFFSET (Virtual address of ...
0
votes
0answers
37 views

memory swapping and cgroup

I wonder how is swapping mechanism implemented under the memory cgroup v1. Most existing books (understanding the linux kernel, professional linux kernel architecture, understanding the linux virtual ...
0
votes
3answers
48 views

Why am I not seeing as many page faults as I expect?

I am trying to explore the page fault behavior of Linux. I made an lxc container with restricting the memory to 1GB (by adding 'lxc.cgroup.memory.limit_in_bytes = 1G' to /etc/lxc/default.conf). Then, ...
-2
votes
1answer
27 views

Inode vs multi level paging

I'm studying for an exam right now and would love an answer to this little confusion I am having. Inodes have (say) 10 direct, 1 indirect, 1 double indirect, 1 triple indirect pointer. From those you ...
14
votes
3answers
1k views

What happens when a file that is 100% paged in to the page cache gets modified by another process

I know that when a page cache page is modified, it is marked dirty and requires a writeback, but what happens when: Scenario: The file /apps/EXE, which is an executable file, is paged in to the page ...
0
votes
0answers
25 views

What would happen if we didn't map the kernel's memory in the virtual memory of every process, and force a context switch instead? [duplicate]

So can someone explain to me that what will happen if they did this and how much overhead will this cause, to have a seperate process for the kernel part of the virtual memory, and make a context ...
1
vote
0answers
74 views

Weird major page fault number when reading sequentially / randomly in mmap region

I'm following this answer, trying to generate some major page faults with mmap: #include <fcntl.h> #include <stdio.h> #include <sys/mman.h> #include <sys/stat.h> int main(...
3
votes
1answer
27 views

“One-shot” swapping activity monitoring

I am trying to monitor the swapping activity in a Linux Server in the last, say, 1, 5 or 15 minutes. One way is to run vmstat and keep watching si and so counters during these intervals. However how ...
1
vote
1answer
59 views

Can a program trap on memory access to certain regions of process memory?

I'm looking for a way to have an event get triggered and trapped when accessing a specific read-only section of a program's memory. Specifically, if I have a section of program memory that contains a ...
5
votes
2answers
778 views

Are Linux kernel modules a sort of Linux system paged pool?

I always read that Linux kernel isn't pageable. If I'm not mistaken Windows, instead, divedes system virtual memory in a paged part (paged pool) and non-paged part (non-paged pool). The non-paged part ...
0
votes
1answer
183 views

how does the virtual memory and page cache work?

I know that: The virtual memory is split into user-space and kernel-space, and is mapped into the physical memory. When a user process accesses a file the kernel will cache the file into memory, ...
2
votes
2answers
336 views

Can kswapd be active if free memory well exceeds pages_high watermark?

I'm struggling to understand the inner workings of page frame reclamation algorithm in RHEL 6. More specifically, I want to understand why we are seeing non zero values of si/so in vmstat and other ...
0
votes
1answer
44 views

My linux is using heavy swap even the swapiness is low and ample amount of free space

cat /proc/meminfo --------- MemTotal: 7990416 kB MemFree: 2094352 kB MemAvailable: 2506396 kB Buffers: 44 kB Cached: 1040004 kB SwapCached: 144332 kB ...
1
vote
0answers
34 views

Can I profile my application's access to physical memory?

I would like to profile how many times my app accessed specific physical memory addresses. For example, PFN | COUNT 0x000123 3 0x000124 5 ... Is there any profiling tool ...
1
vote
0answers
179 views

Bus error when access nonaligned memory on zynq

EDIT: Is there a better stackexchange site I should put this on? I am trying use the DDR4 connected to the FPGA side of a zynq ultrascale chip, specifically on Xilinx's devboard zcu102. I am using ...
0
votes
0answers
27 views

Reloading from disk vs swap?

In this answer, the following piqued my interest: Reloading a page from disk is the same as reloading it from swap, except having to reload from swap is usually less likely (due to making proper ...
2
votes
1answer
49 views

How does the Linux kernel arrange the Page tables when running 32-bit code in x86_64 Long mode?

the x86_64 architecture allows 32-bit code run natively while operating in Long mode. Therefore a submode called "compatibility mode" was added. Now the the memory managment mode goes through the ...
1
vote
1answer
139 views

Is turning off swap a good idea when a system has available RAM and swap being used?

I have a system with 4 gigs of RAM and an SSD. I heard allocating swap on SSD is a bad idea because SSD has got limited write cycle. So when I see < 100 MiB of pages is written to the swap, and I ...
1
vote
0answers
43 views

Difference virtual address space and process address space?

Is there a difference in the definition of a virtual address space and process address space or can they be used as synonyms? Sometimes it seems, that process address space means only the memory that ...
2
votes
0answers
94 views

Why /proc/status and /proc/smaps RSS value is different?

If I sum up all Rss fields in /proc/smaps I never get the same result as VmRss field in /proc/status Who knows why this happens? Which value is true RSS? Example: cat /proc/16004/smaps | grep -P '...
0
votes
1answer
264 views

Disable buff/cache linux for fixing ubuntu hangs on full ram

I have 8 gb of ram, ssd and very greedy for ram Android studio/gradle. and sometimes when gradle builds project(eats ram) it hangs all ubuntu(and xubuntu). ui becomes so laggish - mouse cursor moves 1 ...
2
votes
1answer
194 views

What is the size of the x86_64 linux kernel page?

I am curious what is the size of the x86_64 linux kernel page. I heard that it is 4KB but some other sources tell it is 2MB. I am also curious if the user kernel page size can be different from the ...
4
votes
2answers
277 views

Solaris 10: Virtual Memory Exhausted

Our group is all programmers and exclusively use Linux or MacOS, but a customer uses Solaris 10, and we need our code to work there. So we scrounged up an old SunFire V240, and a rented Solaris 10 VM ...
0
votes
1answer
197 views

Does the kernel address region in user page tables need to be updated in an 64 bit system?

In 32 bit systems with more than 896 MB of RAM it is obvious, that the mapping of kernel addresses need to be changed because of kernel virtual addresses and the non-continuous mapping. But how is ...
0
votes
0answers
33 views

Find applications accessing certain memory address / trace memory access

Is there some way on Linux or Unix systems to determine if a distinct physical or virtual memory address has been accessed? I know the address or list of addresses but want to know if and what ...
1
vote
2answers
317 views

What's inside the kernel part of virtual memory of 64 bit linux processes?

I came upon this question : What's the use of having a kernel part in the virtual memory space of Linux processes? and based on the answer and the comments on the answer : the kernel memory ...
0
votes
0answers
42 views

What is the benefit of a per-process memory limit given demand paging?

There are several questions on here regarding how to set a limit on a process's memory consumption. I have recently learned about demand paging, and my question is why it would be useful to set such a ...
0
votes
1answer
69 views

uninitialized pointers dangerous?

I read, that pointers (in C), that are not initialized, could point to an address that contain data or program code from other programs. In the book it says, that this can cause damage. Is this issue ...
0
votes
1answer
184 views

How to understand PBS output “mem” and “vmem” keep the same when the task is x-fold increased with mpirun -np x task

Here is a simple experiment I tried: Given a task called "sim.exe" which doing a model simulation, I then use MPI to launch x "sim.exe" simultaneously on one node (shared memory system). I have tried ...
2
votes
1answer
230 views

Kernel Logical address

Does Kernel logical address go through MMU when used in load/store instruction? Does MMU handle kernel logical address differently from kernel virtual address? Please give reasons for the same. If ...
2
votes
1answer
30 views

Using Systemtap probing Getting the virtual address location of bytes for every read write operation in Linux

Using Systemtap probing tool I got the way to get total amount of bytes read by a file by probing syscall.read and syscall.read.return function. syscall.read.return has returnval() which gives the ...
1
vote
2answers
204 views

Get the SuperPage size

It appears that some BSD systems have a superpage size of 2MB while others have 4MB. I've not seen any others. Is there any way to tell what the available superpage size is? Ideally from the command ...
1
vote
0answers
42 views

How guarantee a responsive Desktop using cgroup memory limit

I would like to setup a system with limited memory (raspberry pi) in such a way that application can't cause the desktop (x11, LXDE, openbox, mouse driver, video card driver) to be unresponsive. When ...
1
vote
1answer
449 views

How does the operating system read the page size from hardware?

Books on operating systems usually mentions that the page size is decided by the processor architecture, for example Intel x86 supports 4KB page size. I have a perception that when we were installing ...
2
votes
0answers
92 views

Share aarch64 page tables created by Linux with SMMU [closed]

I am currently working on creating a shared virtual address space in Linux arm64 on a Xilinx Zynq Ultrascale+ board. In the future it should be possible to share pointers/addresses between the Cortex ...
3
votes
1answer
215 views

Are .text sections shared between loaded ELF executables?

If one program, for example grep, is curretly running, and a user executes another instance, do the two instances share the read-only .text sections between them to save memory? Would the sharing of ...
2
votes
0answers
268 views

Is there a standard for the Linux user-space memory map?

I'm contemplating a project where I would use a memory mapped file that is shared between multiple processes, and in order to be able to use pointer values in the mapped region in all those processes*,...
2
votes
1answer
3k views

Where is page table stored in Linux?

I want know where Linux stores page tables. Is it in kernel virtual memory? It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me ...
0
votes
2answers
251 views

Is there a way to predict or count the number of page faults?

I am working on hardware performance counter (HPCs) and I seek to use these counters to measure some events accurately. I have found that the non-determinism in hardware performance counter (...
3
votes
0answers
137 views

What does nr_vmscan_write track, in layman’s terms?

nr_vmscan_write is a metric that refers to writeback of dirty pages during a scan of the LRU(s), I believe. As I understand it, there are only a few circumstances where this metric is incremented (in ...
2
votes
0answers
464 views

Swappiness set at 100, but is empty nonetheless

Backstory: So, I have a vm running and managed to open enough browser tabs to make linux mint freeze completely, by filling up both swap and ram. Then swappiness was at 60. So after this happened a ...