GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

In C an array is stored in row-major format. For example, an…

In C an array is stored in row-major format. For example, an integer array of shape 4×4 with data like the one is shown in Figure 2 in memory as shown in Figure 3. Assume there is a tiny address space where each page is of 8 bytes and there are 16 such pages. We have a 4×4 array and the element a[0] is located at virtual address 20. (Virtual Page Number=02, offset = 04). Assume size of integer is 4 bytes   Consider the following function:   void print_array(int *arr, int cols, int rows){   for (size_t i=0; i

Read Details

What is the largest VA for this process that will not cause…

What is the largest VA for this process that will not cause any faults and be in the heap segment?

Read Details

Beyond Physical Memory

Beyond Physical Memory

Read Details

The purpose of the ASID in a TLB entry is to reduce the size…

The purpose of the ASID in a TLB entry is to reduce the size of a process’ page table.

Read Details

In order to execute a getpid system call, what interrupt sho…

In order to execute a getpid system call, what interrupt should a process execute?

Read Details

A system uses a 2-level page table with the following parame…

A system uses a 2-level page table with the following parameters:Page Sizes are 32 bytesVirtual Address space is 1024 pages (or 32 KB)Physical Memory consists of 128 pagesA Virtual Address needs 15 bits (5 for the offset, 10 for the VPN)A Physical address needs 12 bits (5 for the offset, 7 for the PFN)The system uses a multi-level page table.  The upper five bits of a VA are the index into the page directory to get the PDE.  Each PDE is 8 bits.  If the PDE is valid, it points to a page of the page table.  Each page of the page table holds 32 8-bit PTEs.  If the PTE is valid, it holds the desired translation (PFN).The format of a PTE is:VALID | PFN6 … PFN0The format of a PDE is identical:VALID | PT6 … PT0The PDBR holds the value: 0x54 (decimal: 84) [This means the page directory is held in this page]   The content of physical memory is below.  The left-most column shows the physical page number in hex and decimal.  The top two rows show the offset of the bytes in the pages in both hex and decimal.   hex offset   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1fdec offset   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 310×00 (  0): 0f 17 16 15 06 1e 18 0b 04 09 01 16 0e 19 1d 14 05 09 05 03 06 0b 04 16 0e 0e 1e 18 19 02 04 120×01 (  1): 12 02 08 07 0f 15 19 06 1c 11 18 0e 02 0d 0e 08 02 0a 0d 06 04 0c 09 01 09 13 12 01 00 10 0b 130×02 (  2): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f a3 7f 7f 7f 7f 7f 7f dc 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x03 (  3): 10 15 0f 05 17 02 1b 11 18 03 11 1a 17 17 18 13 15 0c 15 07 0f 05 0e 0f 13 09 04 14 07 05 06 1a0x04 (  4): 15 0c 11 01 11 0b 10 03 16 03 13 0d 10 05 17 00 19 09 16 05 14 1a 01 18 1b 07 00 16 1b 0e 17 160×05 (  5): 0c 1a 15 11 0e 18 02 17 07 0b 0b 10 18 17 11 0a 0f 11 16 02 0a 11 16 08 1d 09 17 07 13 0d 0b 190×06 (  6): 07 16 16 0c 0b 11 17 13 00 10 16 0c 03 1e 02 03 1e 19 10 18 1a 06 04 15 0e 0e 12 1a 14 1a 13 0c0x07 (  7): 03 1e 08 0a 08 09 0a 09 02 10 15 07 18 19 15 07 08 05 03 07 1d 1b 1b 19 0c 1d 10 11 1e 04 09 0d0x08 (  8): 0d 01 0b 0a 06 06 18 09 0f 14 0f 18 11 01 08 1b 0e 16 0c 17 05 0e 0d 0f 12 10 0a 01 07 09 14 1e0x09 (  9): 0f 10 05 10 0c 03 1c 00 16 0a 0b 18 07 19 02 07 02 14 10 02 08 06 1c 09 0a 02 09 0f 06 1e 18 0c0x0a ( 10): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x0b ( 11): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f f6 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 83 7f 7f 7f 7f 7f0x0c ( 12): 00 00 19 04 01 1e 0d 02 0a 07 0e 12 17 11 05 08 1a 18 13 12 00 1c 05 12 11 1c 12 15 12 06 0e 180x0d ( 13): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x0e ( 14): 0e 15 09 18 17 04 12 17 1b 0e 03 17 1c 17 1b 01 15 03 13 15 06 07 1d 06 03 17 0a 0b 0b 03 1b 0f0x0f ( 15): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×10 ( 16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×11 ( 17): 19 10 15 1e 13 15 05 0d 0d 1c 13 18 06 16 00 0d 1d 01 0b 13 04 03 1e 09 1d 06 01 0c 08 18 00 030×12 ( 18): c8 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f f9 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x13 ( 19): 0f 1a 0b 19 0a 05 0a 1e 07 05 06 03 0c 0b 0d 18 1c 1c 02 12 11 15 1e 02 01 07 06 14 0f 02 04 080×14 ( 20): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×15 ( 21): 03 09 13 0d 1c 14 04 04 1a 1c 17 17 0c 0c 1c 15 0b 0b 12 1d 1a 03 09 05 13 01 0f 10 16 18 09 000×16 ( 22): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×17 ( 23): 7f 7f 7f 7f 85 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f cd 7f 7f 7f 7f 7f 7f 7f 7f0x18 ( 24): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×19 ( 25): 7f 7f 7f 7f 7f 7f 7f fe 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f db 7f 7f 7f 7f 7f 7f 7f c20x1a ( 26): 07 1a 14 1d 02 19 01 03 04 1c 06 19 07 18 08 01 1c 0a 01 09 0e 15 10 10 06 02 0c 17 13 1d 07 0b0x1b ( 27): 16 08 10 03 18 07 16 0a 07 07 02 09 0e 10 17 14 06 09 17 04 08 18 17 00 01 14 12 09 1a 1e 1a 010x1c ( 28): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f b9 7f0x1d ( 29): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 9f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x1e ( 30): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x1f ( 31): 19 16 12 19 10 13 07 15 11 11 0b 00 02 08 18 14 11 0e 01 16 01 1b 0a 14 05 12 03 15 02 1a 19 0c0x20 ( 32): 7f 7f 7f 7f 7f 7f b7 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 9b 7f 7f 80 7f 7f 7f 7f 7f 7f 7f c50x21 ( 33): fb 7f 7f 7f 7f e3 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x22 ( 34): 15 10 0c 02 0b 14 00 0c 02 0d 06 10 03 1e 1e 19 1d 05 07 05 17 01 00 13 0c 16 14 0d 06 1a 09 170×23 ( 35): 15 13 0f 1e 12 07 0e 0c 1c 0d 11 0b 03 0d 1a 10 03 0e 19 1c 1d 1e 0b 1a 1b 1d 02 11 11 14 10 0d0x24 ( 36): 11 16 18 0b 0b 02 1d 18 03 0d 03 1d 08 1c 17 1b 13 0c 05 12 04 0e 16 12 1e 00 10 07 03 13 04 0c0x25 ( 37): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×26 ( 38): 0a 1b 07 0d 16 08 13 14 12 0e 09 17 1a 11 1d 0a 0e 16 09 19 14 03 08 09 04 17 19 04 04 17 1e 140×27 ( 39): 7f 7f 7f 7f 7f e0 7f 7f 7f 7f 91 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x28 ( 40): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×29 ( 41): 7f c0 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ea 7f 7f 7f 7f 7f 7f 7f 7f0x2a ( 42): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x2b ( 43): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f c4 f1 7f 7f 7f 7f 7f 7f 7f 7f b2 7f0x2c ( 44): 0e 07 19 09 12 0f 1e 05 04 0a 15 11 19 1a 0d 14 0d 0c 03 07 05 01 16 11 00 03 00 0d 0b 03 0d 100x2d ( 45): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x2e ( 46): 1e 07 11 1d 03 11 03 09 12 04 08 0a 17 0e 1a 03 1b 15 1b 07 06 11 12 07 16 08 0f 11 10 10 08 1b0x2f ( 47): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×30 ( 48): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×31 ( 49): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×32 ( 50): 1d 04 12 11 17 0a 15 0f 1b 12 1d 04 19 02 1b 19 0a 08 0a 04 0e 07 0b 05 1d 19 13 03 09 13 03 140×33 ( 51): 0c 17 1d 0d 06 09 1d 09 07 09 0d 06 0d 09 04 0c 1c 18 1b 18 0a 07 04 01 18 0c 0b 15 0e 1d 14 020×34 ( 52): 00 1a 07 0d 0d 0f 06 0e 15 15 07 12 19 15 04 13 0d 0d 04 03 05 03 1e 0a 16 0c 1c 19 0b 06 04 190×35 ( 53): 11 08 06 0a 13 0d 1c 1c 0c 1a 02 1c 1a 0f 0e 18 1b 1e 03 0b 00 0c 1a 10 14 0b 03 17 08 08 16 120×36 ( 54): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000×37 ( 55): 1b 07 04 0f 09 0b 13 0f 03 02 1a 0e 0d 19 10 13 04 0e 15 19 04 07 00 17 09 1d 10 0d 19 17 10 0c0x38 ( 56): 7f fd 7f c9 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f a4 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x39 ( 57): 01 1b 15 1b 15 19 00 15 06 16 00 1a 10 06 01 0c 1c 0d 00 0f 07 03 02 1c 0b 16 02 10 10 06 05 0f0x3a ( 58): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 95 81 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 8e 7f 7f0x3b ( 59): 1e 1b 07 0e 0f 15 1e 0d 1e 13 13 03 19 03 0a 0c 0f 13 11 04 15 03 05 03 09 13 11 1e 09 0b 0b 1d0x3c ( 60): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000x3d ( 61): 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f b3 88 7f 7f 9a 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x3e ( 62): 7f 7f 7f 7f b4 7f b5 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f dd 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f0x3f ( 63): 0c 02 00 14 10 0c 0c 02 0a 08 06 06 01 1e 01 16 16 0d 17 03 06 16 06 0a 12 09 15 0f 00 0d 0a 020×40 ( 64): 03 16 10 08 13 1c 0b 16 1e 0c 03 14 16 02 1a 11 0c 1a 0f 02 1a 0b 1e 19 08 10 16 04 08 06 17 130×41 ( 65): 7f f5 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f a6 7f 7f 7f 7f 7f bb 7f 7f 7f 7f 7f 7f 7f 7f0x42 ( 66): 14 0c 0c 02 00 0d 04 13 1d 19 00 01 0d 02 13 07 18 03 17 0f 09 08 18 10 14 05 0c 07 08 1e 14 110×43 ( 67): 7f 7f 7f 7f 7f 7f 7f ae 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f

Read Details

On a 32-bit machine, how big is the virtual address space fo…

On a 32-bit machine, how big is the virtual address space for each process?

Read Details

Look at the code for the prog and other programs shown below…

Look at the code for the prog and other programs shown below.  Assume all function and system calls are successful, output occurs immediately, and all the necessary includes are present.

Read Details

The segment table for a process running in this system is sh…

The segment table for a process running in this system is shown below:

Read Details

What is the size of a virtual address?

What is the size of a virtual address?

Read Details

Posts pagination

Newer posts 1 … 37,543 37,544 37,545 37,546 37,547 … 72,016 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top