Introduction To Operating Systems NPTEL Week 4 Assignment

Session: JULY-DEC 2023

Course Name: Introduction to Operating Systems

Course Link: Click Here

These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q1. Let the number of bits for Interrupt gate descriptor be 48, ie 32:16 (segment selector:offset). Each entry in the interrupt descriptor table is 5 Bytes. What will the total size of the IDT in bytes ?
1256
1024
1020
1280

Answer: 1280


Q2. State True or False
The user to kernel stack switching is done using Task Segment Descriptor, by changing SS to SS1 and ESP to ESP1

True
False

Answer: False


Q3. Which of the following is FALSE.
An interrupt occurs in the protected mode.

Determine the IRQ number from the interrupt controller.
Switch from user to kernel stack
Save the process states.
None of these

Answer: Switch from user to kernel stack


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q4. Interrupt vector number used for system call is xv6 _.
16
32
48
64

Answer: 64


Q5. What does the the system call sys_uptime() return?
Time the when system call is invoked.
Time since the start of the process
The number of clock ticks interrupts that have occurred since the start.
Maximum time the interrupt taken to complete execution.

Answer: The number of clock ticks interrupts that have occurred since the start.


Q6. The signal sent from the processor to the device after receiving an interrupt is
Interrupt-acknowledge
Return signal
Service signal
Permission signal

Answer: Interrupt-acknowledge


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q7. The return address from the interrupt-service routine is stored on the
Interrupt handler
Processor register
Kernel stack
Memory

Answer: Kernel stack


Q8. Which of the following are TRUE in a multiprogrammed OS?
a. More than one program can be in the ready state at the same time.
b. When a program exits, other programs are loaded into ready queue immediately.
c. After a software interrupt occurred, a process in the ready queue may switch to running state
d. If a higher priority process is present in the ready queue, then the running process will immediately switching from running to ready state.

a, b, c
a, b, d
a, c, d
a, b, c, d

Answer: a, c, d


Q9. Which of the following does not interrupt a running process?
A device
Timer
Power Failure
None of the above

Answer: None of the above


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q10. State True/False for each of the following statements.
1. In a multitasking operating system, interrupt (either software, hardware, or exception) is required for the operating system to execute.
2. A context switching occurs whenever the OS executes.

True,True
True,False
False, True
False, False

Answer: True,False


Q11. Which of the following need not necessarily be saved when context switch occurs?
Registers
TLB
Program counter
None of the above

Answer: TLB


Q12. Consider a system having n CPUs, k processes, and k > n. Calculate the upper bound for the number of processes in the READY, RUNNING and BLOCKED states
k, k, k
n, n, n
k, k , n
k, n, k

Answer: k, n, k


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q13. State True or False
Double fault is a fault that occurs when a CPU is trying to call an exception handler.

True
False

Answer: True


Q14. Devices that turn on interrupt in xv6?
UART
IDE
Keyboard
All of these

Answer: All of these


Q15. Match the following
Trapframe 1. Overflow
Trap 2. Difficult to recover
Fault 3. Restore the context
Abort 4. Segment not present

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

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


These are Introduction to Operating Systems NPTEL Assignment 4 Answers

More Weeks of Introduction to Operating Systems: Click here

More Nptel Courses: Click here


These are Introduction to Operating Systems NPTEL Assignment 4 Answers

Course Name: Introduction To Operating Systems

Link of course: Click here


Q1. A double fault is a fault that occurs when a CPU is trying to call an exception handler.
a. True
b. False

Answer: b. False


Q2. Arrange in order of occurrence
a) Obtain the IRQ number from the interrupt controller
b) I/O APIC transfer interrupt to Local APIC.
c) Save the program states
d)Local APIC assert the CPU interrupt

Answer: d, b, c, a


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q3. A system n processes, and with a non preemptive scheduler. What is the total number of scheduling possible?
a. n
b. n!
c. n(n-1)
d. 2^n

Answer: c. n(n-1)


Q4. When a CPU is interrupted, it
a. Stops executing instructions
b. Acknowledge interrupt and continues
c. Acknowledge interrupt and branches to a subroutine
d. Acknowledge interrupt and waits for the next instruction from the interrupted device

Answer: Acknowledge interrupt and waits for the next instruction from the interrupted device


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Consider a system having n CPUs, k processes, and k > n. Calculate the upper bound and lower bound for the number of processes in the RUNNING, READY and BLOCKED states.

Q5. The upper bound is :
a. k, k, k
b. n, k, k
c. k, k , n
d. k, n, k

Answer: n, k, k


Q6. The lower bound is :
a. 1, 1, 1
b. 0, 0, 0
c. 0, 1 , 1
d. 1, 1, 0

Answer: d. 1, 1, 0


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q7. Six bytes are required to store the Interrupt gate descriptor in Intel’s 80386 processor. Each descriptor comprises of 32 bits for the segment
selector and 16 bits for the offset(segment selector:offset). What is the total size in bytes of the interrupt descriptor table (IDT)?

a. 1256
b. 1024
c. 1536
d. 1280

Answer: c. 1536


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q8. Which one of the following is FALSE?
a. Kernel level threads cannot share the code segment
b. User level threads are not scheduled by the kernel
c. Context switching between user level threads is faster than context switching between kernel level threads
d. When a user level thread is blocked, all other threads of its process are blocked

Answer: a. Kernel level threads cannot share the code segment


Q9. Context switching is not required for a system without multi programmed OS
a. True
b. False

Answer: a. True


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q10. Which of the below statement is False?
a. Kernel stack can be used to store the context of a process
b. User stack is used to store the function details during function calls
c. Kernel stack is used to store the function arguments during systems calls
d. Context of the process is useful to restart the process after some time

Answer: b. User stack is used to store the function details during function calls


These are Introduction to Operating Systems NPTEL Assignment 4 Answers


Q11. Match the following
a) a-3, b-1 c-4, d-2
b) a-3, b-4,c-1, d-3
c) a-4, b-1, c-4, d-2
d) a-4, b-3, c-2, d -1

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


These are Introduction to Operating Systems NPTEL Assignment 4 Answers

All weeks of Introduction To Operating Systems: https://progies.in/answers/nptel/introduction-to-operating-systems

More NPTEL Solutions: https://progies.in/answers/nptel


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