-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopic-wise Quiz-4 (Virtual Memory).html
More file actions
116 lines (104 loc) · 29.6 KB
/
Topic-wise Quiz-4 (Virtual Memory).html
File metadata and controls
116 lines (104 loc) · 29.6 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html PUBLIC "-//W3C//DTD printout 1.0 Strict//EN"
"http://www.w3.org/TR/printout1/DTD/printout1-strict.dtd">
<html xmlns="http://www.w3.org/1999/printout">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
@media print
{
div{
page-break-inside: avoid;
}
}
body {
font-family: verdana, helvetica, sans-serif;
background-color: #fff;
color: #000;
font-size: 12px;
}
div {
display: block;
}
.mcanswer {
line-height: 2em;
}
.question {
border: 1px solid #ddd;
margin: 5px;
padding: 3px;
}
.multichoice {
list-style-type: lower-alpha;
}
.questionlist {
list-style-type: decimal;
}
.category {
font-size: 1.5em ; font-weight: bold;
}
.questiontext {
font-weight: bold;
}
.questiontype {
font-size: 0.75em;
}
.points {
font-size: 0.75em;
font-weight: bold;
}
.wrong {
color: crimson;
}
.correct {
color: green;
}
</style>
</head>
<body>
<div><p><li class="questiontext">Calculate the EAT in NANO-seconds (upto 2 decimal points) w.r.t. a page fault, given
Memory access time = {m} ns
Average page fault service time = {t} ms
Page fault rate = {p}</li></p><p>Answer: (1-{p})*{m} + {p}*{t}*1000000</p><br><p class="questiontype">EAT (page fault) (Calculated)</p><hr></div>
<div><p><li class="questiontext">Map the parts of a C code to the memory regions they are related to</li></p><ul><li>global initialized variables-> <span class="correct">data</span></li><li>static variables-> <span class="correct">data</span></li><li>global un-initialized variables-> <span class="correct">bss</span></li><li>functions-> <span class="correct">code</span></li><li>local variables-> <span class="correct">stack</span></li><li>function arguments-> <span class="correct">stack</span></li><li>malloced memory-> <span class="correct">heap</span></li><li>-> <span class="correct">buffers</span></li></ul><p class="questiontype">C code parts, region mapping (Matching)</p><hr></div>
<div><p><li class="questiontext">Suppose two processes share a library between them. The library consists of 5 pages, and these 5 pages are mapped to frames 9, 15, 23, 4, 7 respectively. Process P1 has got 6 pages, first 3 of which consist of process's own code/data and 3 correspond to library's pages 0, 2, 4. Process P2 has got 7 pages, first 3 of which consist of processe's own code/data and remaining 4 correspond to library's pages 0, 1, 3, 4. Fill in the blanks for page table entries of P1 and P2.</li></p><ul><li>Page table of P1, Page 3-> <span class="correct">9</span></li><li>Page table of P1, Page 4-> <span class="correct">23</span></li><li>Page table of P1, Page 5-> <span class="correct">7</span></li><li>Page table of P2, Page 0-> <span class="correct">9</span></li><li>Page table of P2, Page 1-> <span class="correct">15</span></li><li>Page table of P2, Page 3-> <span class="correct">4</span></li><li>Page table of P2, Page 4-> <span class="correct">7</span></li><li>-> <span class="correct">2</span></li><li>-> <span class="correct">3</span></li><li>-> <span class="correct">0</span></li><li>-> <span class="correct">5</span></li><li>-> <span class="correct">6</span></li></ul><p class="questiontype">Find page table entries (Matching)</p><hr></div>
<div><p><li class="questiontext">Map the technique with it's feature/problem</li></p><ul><li>static linking-> <span class="correct">large executable file</span></li><li>dynamic linking-> <span class="correct">small executable file</span></li><li>static loading-> <span class="correct">wastage of physical memory</span></li><li>dynamic loading-> <span class="correct">allocate memory only if needed</span></li></ul><p class="questiontype">static/dynamic link/load (Matching)</p><hr></div>
<div><p><li class="questiontext">Given below is the "maps" file for a particular instance of "vim.basic" process.
Mark the given statements as True or False, w.r.t. the contents of the map file.
55a43501b000-55a435049000 r--p 00000000 103:05 917529 /usr/bin/vim.basic55a435049000-55a435248000 r-xp 0002e000 103:05 917529 /usr/bin/vim.basic55a435248000-55a4352b6000 r--p 0022d000 103:05 917529 /usr/bin/vim.basic55a4352b7000-55a4352c5000 r--p 0029b000 103:05 917529 /usr/bin/vim.basic55a4352c5000-55a4352e2000 rw-p 002a9000 103:05 917529 /usr/bin/vim.basic55a4352e2000-55a4352f0000 rw-p 00000000 00:00 0 55a436bc9000-55a436e5b000 rw-p 00000000 00:00 0 [heap]7f275b0a3000-7f275b0a6000 r--p 00000000 103:05 917901 /usr/lib/x86_64-linux-gnu/libnss_files-2.31.so7f275b0a6000-7f275b0ad000 r-xp 00003000 103:05 917901 /usr/lib/x86_64-linux-gnu/libnss_files-2.31.so7f275b0ad000-7f275b0af000 r--p 0000a000 103:05 917901 /usr/lib/x86_64-linux-gnu/libnss_files-2.31.so7f275b0af000-7f275b0b0000 r--p 0000b000 103:05 917901 /usr/lib/x86_64-linux-gnu/libnss_files-2.31.so7f275b0b0000-7f275b0b1000 rw-p 0000c000 103:05 917901 /usr/lib/x86_64-linux-gnu/libnss_files-2.31.so7f275b0b1000-7f275b0b7000 rw-p 00000000 00:00 0 7f275b0b7000-7f275b8f5000 r--p 00000000 103:05 925247 /usr/lib/locale/locale-archive7f275b8f5000-7f275b8fa000 rw-p 00000000 00:00 0 7f275b8fa000-7f275b8fc000 r--p 00000000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b8fc000-7f275b901000 r-xp 00002000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b901000-7f275b904000 r--p 00007000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b904000-7f275b905000 ---p 0000a000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b905000-7f275b906000 r--p 0000a000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b906000-7f275b907000 rw-p 0000b000 103:05 924216 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.47f275b907000-7f275b90a000 r--p 00000000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b90a000-7f275b921000 r-xp 00003000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b921000-7f275b932000 r--p 0001a000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b932000-7f275b933000 ---p 0002b000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b933000-7f275b934000 r--p 0002b000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b934000-7f275b935000 rw-p 0002c000 103:05 924627 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.87f275b935000-7f275b937000 rw-p 00000000 00:00 0 7f275b937000-7f275b938000 r--p 00000000 103:05 917914 /usr/lib/x86_64-linux-gnu/libutil-2.31.so7f275b938000-7f275b939000 r-xp 00001000 103:05 917914 /usr/lib/x86_64-linux-gnu/libutil-2.31.so7f275b939000-7f275b93a000 r--p 00002000 103:05 917914 /usr/lib/x86_64-linux-gnu/libutil-2.31.so7f275b93a000-7f275b93b000 r--p 00002000 103:05 917914 /usr/lib/x86_64-linux-gnu/libutil-2.31.so7f275b93b000-7f275b93c000 rw-p 00003000 103:05 917914 /usr/lib/x86_64-linux-gnu/libutil-2.31.so7f275b93c000-7f275b93e000 r--p 00000000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b93e000-7f275b94f000 r-xp 00002000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b94f000-7f275b955000 r--p 00013000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b955000-7f275b956000 ---p 00019000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b956000-7f275b957000 r--p 00019000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b957000-7f275b958000 rw-p 0001a000 103:05 915906 /usr/lib/x86_64-linux-gnu/libz.so.1.2.117f275b958000-7f275b95c000 r--p 00000000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b95c000-7f275b978000 r-xp 00004000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b978000-7f275b982000 r--p 00020000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b982000-7f275b983000 ---p 0002a000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b983000-7f275b985000 r--p 0002a000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b985000-7f275b986000 rw-p 0002c000 103:05 923645 /usr/lib/x86_64-linux-gnu/libexpat.so.1.6.117f275b986000-7f275b988000 r--p 00000000 103:05 924057 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.17f275b988000-7f275b98d000 r-xp 00002000 103:05 924057 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.17f275b98d000-7f275b98f000 r--p 00007000 103:05 924057 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.17f275b98f000-7f275b990000 r--p 00008000 103:05 924057 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.17f275b990000-7f275b991000 rw-p 00009000 103:05 924057 /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.17f275b991000-7f275b995000 r--p 00000000 103:05 921934 /usr/lib/x86_64-linux-gnu/libtdb.so.1.4.37f275b995000-7f275b9a3000 r-xp 00004000 103:05 921934 /usr/lib/x86_64-linux-gnu/libtdb.so.1.4.37f275b9a3000-7f275b9a9000 r--p 00012000 103:05 921934 /usr/lib/x86_64-linux-gnu/libtdb.so.1.4.37f275b9a9000-7f275b9aa000 r--p 00017000 103:05 921934 /usr/lib/x86_64-linux-gnu/libtdb.so.1.4.37f275b9aa000-7f275b9ab000 rw-p 00018000 103:05 921934 /usr/lib/x86_64-linux-gnu/libtdb.so.1.4.37f275b9ab000-7f275b9ad000 rw-p 00000000 00:00 0 7f275b9ad000-7f275b9af000 r--p 00000000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9af000-7f275b9b4000 r-xp 00002000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9b4000-7f275b9b5000 r--p 00007000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9b5000-7f275b9b6000 ---p 00008000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9b6000-7f275b9b7000 r--p 00008000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9b7000-7f275b9b8000 rw-p 00009000 103:05 924631 /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3.3.77f275b9b8000-7f275b9ba000 r--p 00000000 103:05 924277 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.07f275b9ba000-7f275ba1e000 r-xp 00002000 103:05 924277 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.07f275ba1e000-7f275ba46000 r--p 00066000 103:05 924277 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.07f275ba46000-7f275ba47000 r--p 0008d000 103:05 924277 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.07f275ba47000-7f275ba48000 rw-p 0008e000 103:05 924277 /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.9.07f275ba48000-7f275ba6d000 r--p 00000000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275ba6d000-7f275bbe5000 r-xp 00025000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275bbe5000-7f275bc2f000 r--p 0019d000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275bc2f000-7f275bc30000 ---p 001e7000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275bc30000-7f275bc33000 r--p 001e7000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275bc33000-7f275bc36000 rw-p 001ea000 103:05 917893 /usr/lib/x86_64-linux-gnu/libc-2.31.so7f275bc36000-7f275bc3a000 rw-p 00000000 00:00 0 7f275bc3a000-7f275bc41000 r--p 00000000 103:05 917906 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so7f275bc41000-7f275bc52000 r-xp 00007000 103:05 917906 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so7f275bc52000-7f275bc57000 r--p 00018000 103:05 917906 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so7f275bc57000-7f275bc58000 r--p 0001c000 103:05 917906 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so7f275bc58000-7f275bc59000 rw-p 0001d000 103:05 917906 /usr/lib/x86_64-linux-gnu/libpthread-2.31.so7f275bc59000-7f275bc5d000 rw-p 00000000 00:00 0 7f275bc5d000-7f275bcce000 r--p 00000000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275bcce000-7f275bf29000 r-xp 00071000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275bf29000-7f275c142000 r--p 002cc000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275c142000-7f275c143000 ---p 004e5000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275c143000-7f275c149000 r--p 004e5000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275c149000-7f275c190000 rw-p 004eb000 103:05 917016 /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.07f275c190000-7f275c1b3000 rw-p 00000000 00:00 0 7f275c1b3000-7f275c1b4000 r--p 00000000 103:05 917894 /usr/lib/x86_64-linux-gnu/libdl-2.31.so7f275c1b4000-7f275c1b6000 r-xp 00001000 103:05 917894 /usr/lib/x86_64-linux-gnu/libdl-2.31.so7f275c1b6000-7f275c1b7000 r--p 00003000 103:05 917894 /usr/lib/x86_64-linux-gnu/libdl-2.31.so7f275c1b7000-7f275c1b8000 r--p 00003000 103:05 917894 /usr/lib/x86_64-linux-gnu/libdl-2.31.so7f275c1b8000-7f275c1b9000 rw-p 00004000 103:05 917894 /usr/lib/x86_64-linux-gnu/libdl-2.31.so7f275c1b9000-7f275c1bb000 rw-p 00000000 00:00 0 7f275c1bb000-7f275c1c0000 r-xp 00000000 103:05 923815 /usr/lib/x86_64-linux-gnu/libgpm.so.27f275c1c0000-7f275c3bf000 ---p 00005000 103:05 923815 /usr/lib/x86_64-linux-gnu/libgpm.so.27f275c3bf000-7f275c3c0000 r--p 00004000 103:05 923815 /usr/lib/x86_64-linux-gnu/libgpm.so.27f275c3c0000-7f275c3c1000 rw-p 00005000 103:05 923815 /usr/lib/x86_64-linux-gnu/libgpm.so.27f275c3c1000-7f275c3c3000 r--p 00000000 103:05 923315 /usr/lib/x86_64-linux-gnu/libacl.so.1.1.22537f275c3c3000-7f275c3c8000 r-xp 00002000 103:05 923315 /usr/lib/x86_64-linux-gnu/libacl.so.1.1.22537f275c3c8000-7f275c3ca000 r--p 00007000 103:05 923315 /usr/lib/x86_64-linux-gnu/libacl.so.1.1.22537f275c3ca000-7f275c3cb000 r--p 00008000 103:05 923315 /usr/lib/x86_64-linux-gnu/libacl.so.1.1.22537f275c3cb000-7f275c3cc000 rw-p 00009000 103:05 923315 /usr/lib/x86_64-linux-gnu/libacl.so.1.1.22537f275c3cc000-7f275c3cf000 r--p 00000000 103:05 923446 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.57f275c3cf000-7f275c3d9000 r-xp 00003000 103:05 923446 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.57f275c3d9000-7f275c3dd000 r--p 0000d000 103:05 923446 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.57f275c3dd000-7f275c3de000 r--p 00010000 103:05 923446 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.57f275c3de000-7f275c3df000 rw-p 00011000 103:05 923446 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.57f275c3df000-7f275c3e5000 r--p 00000000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c3e5000-7f275c3fe000 r-xp 00006000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c3fe000-7f275c405000 r--p 0001f000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c405000-7f275c406000 ---p 00026000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c406000-7f275c407000 r--p 00026000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c407000-7f275c408000 rw-p 00027000 103:05 924431 /usr/lib/x86_64-linux-gnu/libselinux.so.17f275c408000-7f275c40a000 rw-p 00000000 00:00 0 7f275c40a000-7f275c418000 r--p 00000000 103:05 924540 /usr/lib/x86_64-linux-gnu/libtinfo.so.6.27f275c418000-7f275c427000 r-xp 0000e000 103:05 924540 /usr/lib/x86_64-linux-gnu/libtinfo.so.6.27f275c427000-7f275c435000 r--p 0001d000 103:05 924540 /usr/lib/x86_64-linux-gnu/libtinfo.so.6.27f275c435000-7f275c439000 r--p 0002a000 103:05 924540 /usr/lib/x86_64-linux-gnu/libtinfo.so.6.27f275c439000-7f275c43a000 rw-p 0002e000 103:05 924540 /usr/lib/x86_64-linux-gnu/libtinfo.so.6.27f275c43a000-7f275c449000 r--p 00000000 103:05 917895 /usr/lib/x86_64-linux-gnu/libm-2.31.so7f275c449000-7f275c4f0000 r-xp 0000f000 103:05 917895 /usr/lib/x86_64-linux-gnu/libm-2.31.so7f275c4f0000-7f275c587000 r--p 000b6000 103:05 917895 /usr/lib/x86_64-linux-gnu/libm-2.31.so7f275c587000-7f275c588000 r--p 0014c000 103:05 917895 /usr/lib/x86_64-linux-gnu/libm-2.31.so7f275c588000-7f275c589000 rw-p 0014d000 103:05 917895 /usr/lib/x86_64-linux-gnu/libm-2.31.so7f275c589000-7f275c58b000 rw-p 00000000 00:00 0 7f275c5ae000-7f275c5af000 r--p 00000000 103:05 917889 /usr/lib/x86_64-linux-gnu/ld-2.31.so7f275c5af000-7f275c5d2000 r-xp 00001000 103:05 917889 /usr/lib/x86_64-linux-gnu/ld-2.31.so7f275c5d2000-7f275c5da000 r--p 00024000 103:05 917889 /usr/lib/x86_64-linux-gnu/ld-2.31.so7f275c5db000-7f275c5dc000 r--p 0002c000 103:05 917889 /usr/lib/x86_64-linux-gnu/ld-2.31.so7f275c5dc000-7f275c5dd000 rw-p 0002d000 103:05 917889 /usr/lib/x86_64-linux-gnu/ld-2.31.so7f275c5dd000-7f275c5de000 rw-p 00000000 00:00 0 7ffd22d2f000-7ffd22d50000 rw-p 00000000 00:00 0 [stack]7ffd22db0000-7ffd22db4000 r--p 00000000 00:00 0 [vvar]7ffd22db4000-7ffd22db6000 r-xp 00000000 00:00 0 [vdso]ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall]</li></p><br><p class="questiontype">Meaning of "maps" file (Multiple True False (ETH))</p><hr></div>
<div><p><li class="questiontext">W.r.t the figure given below, mark the given statements as True or False.
</li></p><br><p class="questiontype">page replacement choices (Multiple True False (ETH))</p><hr></div>
<div><p><li class="questiontext">Select all the correct statements, w.r.t. Copy on Write</li></p><ul class="multichoice">
<li><span class="correct points">(25%) </span><span class="mcanswer">Fork() used COW technique to improve performance of new process creation. </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">If either parent or child modifies a COW-page, then a copy of the page is made and page table entry is updated </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">COW helps us save memory </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">Vfork() assumes that there will be no write, but rather exec() </span></li> <li><span class="wrong points">(-50%) </span><span class="mcanswer">use of COW during fork() is useless if exec() is called by the child </span></li> <li><span class="wrong points">(-50%) </span><span class="mcanswer">use of COW during fork() is useless if child called exit() </span></li></ul>
<p class="questiontype">COW T/F (Multiple choice)</p><hr></div>
<div><p><li class="questiontext">Given below is the output of the command "ps -eo min_flt,maj_flt,cmd" on a Linux Desktop system. Select the statements that are consistent with the output
626729 482768 /usr/lib/firefox/firefox -contentproc -parentBuildID 20220202182137 -prefsLen 9256 -prefMapSize 264738 -appDir /usr/lib/firefox/browser 6094 true rdd
2167 687 /usr/sbin/apache2 -k start
1265185 222 /usr/bin/gnome-shell
102648 111 /usr/sbin/mysqld
9813 0 bash
15497 370 /usr/bin/gedit --gapplication-service</li></p><ul class="multichoice">
<li><span class="correct points">(25%) </span><span class="mcanswer">Firefox has likely been running for a large amount of time </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">Apache web-server has not been doing much work </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">The bash shell is mostly busy doing work within a particular locality </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">All of the processes here exihibit some good locality of reference </span></li></ul>
<p class="questiontype">meaning of ps -eo min_flt, etc. (Multiple choice)</p><hr></div>
<div><p><li class="questiontext">which of the following, do you think, are valid concerns for making the kernel pageable?</li></p><ul class="multichoice">
<li><span class="correct points">(25%) </span><span class="mcanswer">The kernel's own page tables should not be pageable </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">The page fault handler should not be pageable </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">The kernel must have some dedicated frames for it's own work </span></li> <li><span class="correct points">(25%) </span><span class="mcanswer">The disk driver and disk interrupt handler should not be pageable </span></li> <li><span class="wrong points">(-50%) </span><span class="mcanswer">No data structure of kernel should be pageable </span></li> <li><span class="wrong points">(-50%) </span><span class="mcanswer">No part of kernel code should be pageable. </span></li></ul>
<p class="questiontype">pageable kernel (Multiple choice)</p><hr></div>
<div><p><li class="questiontext">Order the following events, related to page fault handling, in correct order</li></p><ul><li>MMU detects that a page table entry is marked "invalid"</li><li>Page fault interrupt is generated</li><li>Page fault handler in kernel starts executing</li><li>Page fault handler detects that it's a page fault and not illegal memory access</li><li>Empty frame is found</li><li>Disk read is issued</li><li>Page faulting process is made to wait in a queue</li><li>Other processes scheduled by scheduler</li><li>Disk Interrupt occurs</li><li>Disk interrupt handler runs</li><li>Page table of page faulted process is updated</li><li>Page faulted process is moved to ready-queue</li></ul><br><p class="questiontype">Demand paging : order (Ordering)</p><hr></div>
<div><p><li class="questiontext">Assuming a 8- KB page size, what is the page numbers for the address {address} reference in decimal :
(give answer also in decimal)
</li></p><p>Answer: {address} / (8*1024)</p><br><p class="questiontype">page number calculation (Calculated)</p><hr></div>
<div><p><li class="questiontext">Given six memory partitions of 300 KB , 600 KB , 350 KB , 200 KB , 750 KB , and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB and 500 KB (in order)?</li></p><ul><li><p>first fit 115 KB</p>-> <span class="correct">300 KB</span></li><li><p>first fit 500 KB</p>-> <span class="correct">600 KB</span></li><li><p>best fit 115 KB </p>-> <span class="correct">125 KB</span></li><li><p>best fit 500 KB </p>-> <span class="correct">600 KB</span></li><li><p>worst fit 115 KB</p>-> <span class="correct">750 KB</span></li><li><p>worst fit 500 KB</p>-> <span class="correct">635 KB</span></li><li>-> <span class="correct">200 KB</span></li><li>-> <span class="correct">350 KB</span></li></ul><p class="questiontype">first/worst/best fit (Matching)</p><hr></div>
<div><p><li class="questiontext">For the reference string 3 4 3 5 2
the number of page faults (including initial ones) using
FIFO replacement and 2 page frames is : {#1}
FIFO replacement and 3 page frames is : {#2}</li></p><ul><li class="mcanswer">{1:SHORTANSWER:%100%4}</li><li class="mcanswer">{1:SHORTANSWER:%100%4}</li></ul><p class="questiontype">#page faultts (Embedded answers (Cloze))</p><hr></div>
<div><p><li class="questiontext">Page sizes are a power of 2 because</li></p><ul class="multichoice">
<li><span class="correct points">(100%) </span><span class="mcanswer">Certain bits are reserved for offset in logical address. Hence page size = 2^(no.of offset bits) </span></li> <li><span class="wrong points">(0%) </span><span class="mcanswer">operating system calculations happen using power of 2 </span></li> <li><span class="wrong points">(0%) </span><span class="mcanswer">MMU only understands numbers that are power of 2 </span></li> <li><span class="wrong points">(0%) </span><span class="mcanswer">Power of 2 calculations are highly efficient </span></li> <li><span class="wrong points">(0%) </span><span class="mcanswer">Certain bits are reserved for offset in logical address. Hence page size = 2^(32 - no.of offset bits) </span></li></ul>
<p class="questiontype">Page sizes are a power of 2 because (Multiple choice / One answer only)</p><hr></div>
<div><p><li class="questiontext">Compare paging with demand paging and select the correct statements.</li></p><ul class="multichoice">
<li><span class="correct points">(14.28571%) </span><span class="mcanswer">Demand paging requires additional hardware support, compared to paging. </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">Both demand paging and paging support shared memory pages. </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">With demand paging, it's possible to have user programs bigger than physical memory. </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">Demand paging always increases effective memory access time. </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">Paging requires some hardware support in CPU </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">Calculations of number of bits for page number and offset are same in paging and demand paging. </span></li> <li><span class="correct points">(14.28571%) </span><span class="mcanswer">The meaning of valid-invalid bit in page table is different in paging and demand-paging. </span></li> <li><span class="wrong points">(-33.33333%) </span><span class="mcanswer">With paging, it's possible to have user programs bigger than physical memory. </span></li> <li><span class="wrong points">(-33.33333%) </span><span class="mcanswer">Paging requires NO hardware support in CPU </span></li> <li><span class="wrong points">(-33.33333%) </span><span class="mcanswer">TLB hit ration has zero impact in effective memory access time in demand paging. </span></li></ul>
<p class="questiontype">paging vs demand paging (Multiple choice)</p><hr></div>
<div><p><li class="questiontext">Shared memory is possible with which of the following memory management schemes ?</li></p><ul class="multichoice">
<li><span class="correct points">(33.33333%) </span><span class="mcanswer">paging </span></li> <li><span class="correct points">(33.33333%) </span><span class="mcanswer">segmentation </span></li> <li><span class="wrong points">(-100%) </span><span class="mcanswer">continuous memory management </span></li> <li><span class="correct points">(33.33333%) </span><span class="mcanswer">demand paging </span></li></ul>
<p class="questiontype">shared memory - possible (Multiple choice)</p><hr></div>
</body>
</html>