Sponsored Content
Operating Systems Linux How does the Operating System handle memory? Post 302894673 by wisecracker on Wednesday 26th of March 2014 04:09:58 PM
Old 03-26-2014
Oooh, if only I knew how to disable the MMU for a single byte read anywhere in contiguous memory on an x86 machine that has an OS up and running...

@Corona688, made me smile, nice and pinched... ;o)

@ Lost in Cyberia, although seriously deep reading at the core it might be worthwhile reading up about an MMU, Memory Management Unit as this controls all aspects memory allocation, paging, VM, 32 to 36 bit address pseudo-memory, etc...
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Operating System

I need the Unix operating system on disc as im new to unix. Im studying unix and x windows next year at Sheffield University and would like to get a head start. Any suggestions would be appreciated (2 Replies)
Discussion started by: jeffersno1
2 Replies

2. Programming

How to handle memory error?

Hi, I need to know what is the right way of handling out of memory conditions. If a program is not able to dynamically allocate memory (new fails), is it right to wait for some amount of time (say 5 sec) and then try again to allocate memory? Or should we kill the process and again restart it?... (1 Reply)
Discussion started by: diganta
1 Replies

3. UNIX for Dummies Questions & Answers

Operating System

Which is much more powerful as an operating system: 1. Windows 2000 2. Windows 98 3. Windows XP 4. Windows ME 5. Unix 6. Linux and why is it much more powerful than the other operating systems that i have mentioned. thanks for your info... (1 Reply)
Discussion started by: alecks1975
1 Replies

4. Homework & Coursework Questions

Operating system LINUX

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be produced.... (1 Reply)
Discussion started by: paradise
1 Replies

5. Homework & Coursework Questions

Operating system LINUX

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be produced.... (0 Replies)
Discussion started by: paradise
0 Replies

6. UNIX for Advanced & Expert Users

Best Operating System

Hello All, I want to install Linux on my machine, so please tell me one thing which is the best to install- 1.)Red Hat 2.)Cent OS 3.)Red Hat 4.)Ubuntu 5.)Fedora except that if there is any please tell me. (1 Reply)
Discussion started by: parthmittal2007
1 Replies

7. UNIX for Advanced & Expert Users

What's my Operating System

Can we know the operating given the IP address or DNS of the host. All I have is file://myserver/myapp (4 Replies)
Discussion started by: mohtashims
4 Replies

8. Android

Android (operating system)

From Wikipedia (FYI): (0 Replies)
Discussion started by: Neo
0 Replies

9. UNIX and Linux Applications

Pick Operating System

Anyone know anything about "Advanced Plus Operating Environment". Preferably release 10 Revision 522Gcd probably dated 2003. (4 Replies)
Discussion started by: jgt
4 Replies
SUBPAGE_PROT(2) 					     Linux Programmer's Manual						   SUBPAGE_PROT(2)

NAME
subpage_prot - define a subpage protection for an address range SYNOPSIS
long subpage_prot(unsigned long addr, unsigned long len, uint32_t *map); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION
The PowerPC-specific subpage_prot() system call provides the facility to control the access permissions on individual 4kB subpages on sys- tems configured with a page size of 64kB. The protection map is applied to the memory pages in the region starting at addr and continuing for len bytes. Both of these arguments must be aligned to a 64-kB boundary. The protection map is specified in the buffer pointed to by map. The map has 2 bits per 4kB subpage; thus each 32-bit word specifies the protections of 16 4kB subpages inside a 64kB page (so, the number of 32-bit words pointed to by map should equate to the number of 64-kB pages specified by len). Each 2-bit field in the protection map is either 0 to allow any access, 1 to prevent writes, or 2 or 3 to prevent all accesses. RETURN VALUE
On success, subpage_prot() returns 0. Otherwise, one of the error codes specified below is returned. ERRORS
EFAULT The buffer referred to by map is not accessible. EINVAL The addr or len arguments are incorrect. Both of these arguments must be aligned to a multiple of the system page size, and they must not refer to a region outside of the address space of the process or to a region that consists of huge pages. ENOMEM Out of memory. VERSIONS
This system call is provided on the PowerPC architecture since Linux 2.6.25. The system call is provided only if the kernel is configured with CONFIG_PPC_64K_PAGES. No library support is provided. CONFORMING TO
This system call is Linux-specific. NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2). Normal page protections (at the 64-kB page level) also apply; the subpage protection mechanism is an additional constraint, so putting 0 in a 2-bit field won't allow writes to a page that is otherwise write-protected. Rationale This system call is provided to assist writing emulators that operate using 64-kB pages on PowerPC systems. When emulating systems such as x86, which uses a smaller page size, the emulator can no longer use the memory-management unit (MMU) and normal system calls for control- ling page protections. (The emulator could emulate the MMU by checking and possibly remapping the address for each memory access in soft- ware, but that is slow.) The idea is that the emulator supplies an array of protection masks to apply to a specified range of virtual addresses. These masks are applied at the level where hardware page-table entries (PTEs) are inserted into the hardware page table based on the Linux PTEs, so the Linux PTEs are not affected. Implicit in this is that the regions of the address space that are protected are switched to use 4-kB hardware pages rather than 64-kB hardware pages (on machines with hardware 64-kB page support). SEE ALSO
mprotect(2), syscall(2) Documentation/vm/hugetlbpage.txt in the Linux kernel source tree Linux 2012-07-13 SUBPAGE_PROT(2)
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy