Sponsored Content
Full Discussion: CAlculating page file size
Top Forums UNIX for Dummies Questions & Answers CAlculating page file size Post 302317261 by Fortune on Monday 18th of May 2009 12:00:53 PM
Old 05-18-2009
CAlculating page file size

hello dont know if this is the correct forum for this post but i have a question.

i am revising for a exam on operating systems and i have the question...

A system has a 32bit virtual address divided into 2kbyte pages and each entry in the page table is 6 bytes in length.
what is the size of the monolithic page table?

i know i have to work out the size of the page table which would be 2^21 (2^32/2^11) giving 2097152 (2mb) but i don't get the 6 byte part

would my answer be 2mb or something else?

can anyone point me in the correct direction
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripts for calculating size and remaining space of a directory automatically.

I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin. * POSIX and PERL are preferred. Can anyone help, please? (1 Reply)
Discussion started by: leonall
1 Replies

2. Programming

calculating size of int

Hi, Is there any way to calculate the size of a built in data type without using 'sizeof' operator? I also don't have the option to read it from std .h file. regards Apoorva Kumar (10 Replies)
Discussion started by: apoorvasharma80
10 Replies

3. Shell Programming and Scripting

How to get the page size (of a url) using wget

Hi , I am trying to get page size of a url(e.g.,www.example.com) using wget command.Any thoughts what are the parameters i need to send with wget to get the size alone? Regards, Raj (1 Reply)
Discussion started by: rajbal
1 Replies

4. Shell Programming and Scripting

Help with calculating size of files.

Hi All, I am very new to shell scripting. I have a text file which is the output of another utility. This text file has a list of SAF files which is basically a list of orphan attachments in the attachments directory. Now I want to read each file name from the file, get its size and repeat this... (6 Replies)
Discussion started by: RajeshReddy
6 Replies

5. Linux

Find Page size in linux

Hi, How do i find Linux kernel page size using command ? Thanks in advance. (1 Reply)
Discussion started by: forumguest
1 Replies

6. AIX

calculating the size of the luns using script

Hi This is the lspv output of my server : cbspsdb01 #lspv hdisk0 00c7518d2d512fd4 cdgvg active hdisk1 00c7518d2dcbc9d6 cdgvg active hdisk2 00c7518dcda9199a appvg active hdisk3... (1 Reply)
Discussion started by: samsungsamsung
1 Replies

7. Shell Programming and Scripting

Calculating average of 100 different files of same size

Hey guys..... I have many files (lets say 100 or more) of same size, and I want to create a new output file and calculate the average of first row fifth column in all files and print it in first row of output file, then 2nd row fifth col in all 100 files and print it in 2nd row of output... (1 Reply)
Discussion started by: CAch
1 Replies

8. Shell Programming and Scripting

Calculating the epoch time from standard time using awk and calculating the duration

Hi All, I have the following time stamp data in 2 columns Date TimeStamp(also with milliseconds) 05/23/2012 08:30:11.250 05/23/2012 08:30:15.500 05/23/2012 08:31.15.500 . . etc From this data I need the following output. 0.00( row1-row1 in seconds) 04.25( row2-row1 in... (5 Replies)
Discussion started by: ks_reddy
5 Replies

9. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have a backup share mounted with me on solaris 10 which have daily backups. everyday i need to calculate all individual sizes of files and need to report somewhere. e.g i have .rman 7backup files daily . what i need that is there any commnd or variation of du command which can add... (1 Reply)
Discussion started by: janakors
1 Replies

10. UNIX for Beginners Questions & Answers

Calculating size of backups

hi everyone i have posted this query but i dont where it has gone i am posting again . my issue is that i have many backup files in a backup nfs share and i need to calculate it size just by adding their individual file sizes which is repetitive jobs. so is there any command or variation of du... (1 Reply)
Discussion started by: janakors
1 Replies
MINCORE(2)						     Linux Programmer's Manual							MINCORE(2)

NAME
mincore - determine whether pages are resident in memory SYNOPSIS
#include <unistd.h> #include <sys/mman.h> int mincore(void *addr, size_t length, unsigned char *vec); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mincore(): Since glibc 2.19: _DEFAULT_SOURCE Glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE DESCRIPTION
mincore() returns a vector that indicates whether pages of the calling process's virtual memory are resident in core (RAM), and so will not cause a disk access (page fault) if referenced. The kernel returns residency information about the pages starting at the address addr, and continuing for length bytes. The addr argument must be a multiple of the system page size. The length argument need not be a multiple of the page size, but since resi- dency information is returned for whole pages, length is effectively rounded up to the next multiple of the page size. One may obtain the page size (PAGE_SIZE) using sysconf(_SC_PAGESIZE). The vec argument must point to an array containing at least (length+PAGE_SIZE-1) / PAGE_SIZE bytes. On return, the least significant bit of each byte will be set if the corresponding page is currently resident in memory, and be clear otherwise. (The settings of the other bits in each byte are undefined; these bits are reserved for possible later use.) Of course the information returned in vec is only a snapshot: pages that are not locked in memory can come and go at any moment, and the contents of vec may already be stale by the time this call returns. RETURN VALUE
On success, mincore() returns zero. On error, -1 is returned, and errno is set appropriately. ERRORS
EAGAIN kernel is temporarily out of resources. EFAULT vec points to an invalid address. EINVAL addr is not a multiple of the page size. ENOMEM length is greater than (TASK_SIZE - addr). (This could occur if a negative value is specified for length, since that value will be interpreted as a large unsigned integer.) In Linux 2.6.11 and earlier, the error EINVAL was returned for this condition. ENOMEM addr to addr + length contained unmapped memory. VERSIONS
Available since Linux 2.3.99pre1 and glibc 2.2. CONFORMING TO
mincore() is not specified in POSIX.1, and it is not available on all UNIX implementations. BUGS
Before kernel 2.6.21, mincore() did not return correct information for MAP_PRIVATE mappings, or for nonlinear mappings (established using remap_file_pages(2)). SEE ALSO
fincore(1), madvise(2), mlock(2), mmap(2), posix_fadvise(2), posix_madvise(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 MINCORE(2)
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy