Introduction To Operating Systems NPTEL Week 2 Assignment

Session: JULY-DEC 2023

Course Name: Introduction to Operating Systems

Course Link: Click Here

These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q1. Match the following
CR0 1)Remove free pages from the list
CR3 2)Enable paging
kalloc() 3) Page table point register
kfree() 4) Add free pages to the list

a-3, b-2, c-1, d-4
a-2, b-3, c-1, d-4
a-2, b-3, c-4, d-1
a-3, b-2, c-4, d-1

Answer: a-3, b-2, c-1, d-4


Q2. Match the following
First Instruction 1) Application Processor begins to boot
Real mode 2) Frequency at which DRAM is flushed and set
BIOS 3) 16 Byte below the 1 MB region of the RAM
Startup IPI 4) Backward compatible with 8088

a-1, b-3, c-4, d-2
a-2, b-1, c-4, d-3
a-2, b-1, c-3, d-4
a-3, b-4, c-2, d-1

Answer: a-3, b-4, c-2, d-1


Q3. State True or False
Protection bit indicates that a block corresponds to OS code or User code.

True
False

Answer: True


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q4. State True or False
Master Boot Record allows the user to select which OS need to loaded.

True
False

Answer: True


Q5. In a 32 bit processor the virtual address is 22 bit:12 bit(Table index : Offset). What is the size of the page frame and the process page table assuming that each entry in the page table is 4 Bytes?
4KB, 4MB
4MB, 8MB
4MB, 16KB
4KB, 16MB

Answer: 4KB, 16MB


Q6. The bootloader switches the OS from _ to _.
Protected mode, real mode
User mode, kernel mode
User mode, protected mode
Real mode, Protected mode.

Answer: Real mode, Protected mode.


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q7. Match the following
Single contiguous model 1) Scan through all the free blocks.
Best Fit 2) Program memory size is restricted to RAM size
First Fit 3) Fragmentation is worse
Worst Fit 4) Allocates the largest free block.

a-4, b-3, c-1, d-2
a-2, b-1, c-4, d-3
a-2, b-1, c-3, d-4
a-3, b-1, c-4, d-2

Answer: a-2, b-1, c-4, d-3


Q8. State True or False
walkpgdir function create the page directory entry but will not create the table.

True
False

Answer: False


Q9. Let the number of bits required to address a memory word be 25. Each word is of 16 bits.
Number of words in the memory is __.
Number of bytes in the memory denoted as __
Number of bits to address __.
Where W denotes word and B denotes bytes.

32 KW, 64 KW, 29
32 MW, 64 MB, 26
64 KW, 32 MW, 29
64 MW, 32 MB, 26

Answer: 32 MW, 64 MB, 26


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q10. The lgdt instruction is used to _
Fills the segment descriptor in GDT
Fills the Data segment descriptor in the GDT
Fills the GDT in an MMU register.
Fills the Kernel code segment in the GDT

Answer: Fills the GDT in an MMU register.


Q11. Which one of the following is true?
Block size is not equal to the frame size
Need to allocate frames into the blocks of the RAM.
Every memory access has an additional overhead, which can be reduced by using a TLB.
Per process page table is stored in hard disk

Answer: Every memory access has an additional overhead, which can be reduced by using a TLB.


Q12. The number of bits for limit, segment base and type in a 32 bit segment descriptor is
20,32,2
32,20,2
32,20,4
20,32,4

Answer: 20,32,4


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q13. PTPR(Page Table Point Register) is known as _ register in Intel systems
CR0
CR1
CR2
CR3

Answer: CR3


Q14. Consider a system using 2-level paging and the virtual address is 38 bits. The most significant 12 bit are used to index the page directory and next 14 bits index the page table. Each entry in both level is 4 Bytes.
How large are the page frames ?
Size of page tables?

4KB, 16KB
4B, 16KB
4KB, 64KB
4B, 32KB

Answer: 4KB, 64KB


Q15. Consider the following memory map using the partition model (Blue – In use and White – Free).
A new process Pnew of size 5k. Where Pnew is place in
Best Fit – _____________k
First Fit – _____________k
Worst Fit- _____________k

5, 8, 20
5, 6, 48
6, 8, 34
6, 6, 48

Answer: 6, 8, 34


These are Introduction to Operating Systems NPTEL Assignment 2 Answers

More Weeks of Introduction to Operating Systems: Click here

More Nptel Courses: Click here


Course Name: Introduction To Operating Systems NPTEL

Link of course: Click here

These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q1. Match the Following

a) Present bit 1) Difference in contents of page in RAM and the Disk
b) Dirty bit 2) Moving page from Disk to Memory
c) Swap out 3) Moving page from memory to Disk
d) Swap in 4) page is present in RAM

a-1, b-3, c-4, d-2

a-2, b-1, c-4, d-3

a-3, b-4, c-2, d-1

a-4, b-1, c-3, d-2

Answer: d. a-4, b-1, c-3, d-2


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q2. Consider a system using 2-level paging and the virtual address is 38 bits. The most significant 10 bits are used to index the page directory and next 16 bits index the page table. Each entry in both levels is 4 Bytes. What is the maximum size of a page table in KB?

Answer: 256


Q3. Consider a system using 2-level paging and the virtual address is 38 bits. The most significant 10 bits are used to index the page directory and next 16 bits index the page table. Each entry in both levels is 4 Bytes. What is the maximum number of page tables that a process can have?

Answer: 4096


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q4. Consider a system with total memory available is 2^(38) bytes. A user write a C program on this system that uses the entire addressing space. What is the size of a pointer (in bytes) defined in this C program.

Answer: 5


Q5. Consider the following memory map using multiprogram with partition model. Blue represent memory in use while white represent free memory as shown in the figure below.

These are answers of Introduction To Operating Systems NPTEL Week 2 Assignment

Request for memory follows the following order : 100k, 25k, 125k, 50k. Which of the following allocation satisfies the above request?
1)Best Fit 2)First Fit 3)Worst Fit

1,2,3

1,2

2,3

None of these

Answer: b.1,2


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q6. Match the following

a)CR0 1)Removes free pages from a linked list
b)CR3 2) Enable paging
c)kalloc( ) 3) Page directory point register
d)kfree( ) 4) Add free pages to a linked list

a-3, b-2, c-1, d-4

a-2, b-3, c-1, d-4

a-2, b-3, c-4, d-1

a-3, b-2, c-4, d-1

Answer: c. a-2, b-3, c-4, d-1


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q7. During swap out of a page all the changes that occurred in a page are updated in the main memory.

True

False

Answers: True


Q8. Sector 0 is of _____________ bytes, which is loaded into the location _____________

512, 0xffff0

1024, 0xffff0

512, 0x7c00

1024, 0x7c00

Answer: c. 512, 0x7c00


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q9. The bootloader switches the OS to _____________ from _____________.

Protected mode, Real mode

User mode, kernel mode

User mode, protected mode

Real mode, Protected mode.

Answer: a. Protected mode, Real mode


These are Introduction to Operating Systems NPTEL Assignment 2 Answers


Q10. Consider the following memory map using the partition model, with Blue representing memory in use and White representing free memory.

These are answers of Introduction To Operating Systems NPTEL Week 2 Assignment

A new process Pnew is of size 10k. In which partition is Pnew placed for

a)Best Fit : _____________k
b)First Fit : _____________k
c)Worst Fit : _____________k

10, 11, 11

10, 10, 11

11, 12, 40

11, 10, 48

Answer: c. 11, 12, 40


These are Introduction to Operating Systems NPTEL Assignment 2 Answers

All weeks of Introduction To Operating Systems: Click Here

More NPTEL Solutions: Click me


Introduction to Operating Systems NPTEL Assignment 2
The content uploaded on this website is for reference purposes only. Please do it yourself first.