Q1. Which one of the following is false ?
Answer: Resource management hides the nitty gritty details of the program
execution.
Q2. In the PC organization _ interfaces memory and PCI Bus
Answer: Chipset
Q3. State True or False?
Stack Pointer points to a frame present in the stack
Answer: False
These are Introduction to Operating Systems NPTEL Assignment 1 Answers
Q4. Which one of the following is the correct order of statements?
(1) Read byte by byte from memory
(2) Graphics card displays string on the monitor
(3) printf(“%s”,str)
(4) Device driver takes care of setting attributes.
3, 4, 1, 2
3, 1, 4, 2
1, 4, 2, 3
1, 2, 4, 3
Answer: 3, 1, 4, 2
Q5. Which one of the following is false ?
Answer: Microkernel is faster than monolithic kernels
Q6. State True or False?
Resource abstraction and hardware management are important uses of an OS.
Answer: True
Q7. Which one of the following is false ?
Multiprogramming will not cause starvation.
Time sharing improves performance.
Scheduler should able to prioritize some applications.
Kernel runs in a protected mode.
Answer: Multiprogramming will not cause starvation.
Q8. Match the following
Instructions a. Heap section
Global and Static Data b. Stack section
Function call invocation c. Data section
Dynamic allocation d.Text section
1-b, 2-a, 3-d, 4-c
1-d, 2-c, 3-a, 4-b
1-c, 2-d, 3-b, 4-a
1-d, 2-c, 3-b, 4-a
Answer: 1-d, 2-c, 3-b, 4-a
Q9. Name the operating systems most suited for wireless sensor nodes.
Answer: Contiki OS
These are Introduction to Operating Systems NPTEL Assignment 1 Answers
Q10. State True or False?
Access control and biometric are used to increase security of an operating
system.
Answer: True
Q11. State True or False.
To extend the IO address range, we use the low memory region of the RAM as
Memory mapped IO.
Answer: False
Q12. Match the following
a.out a. compiles the program
Process state b. Stored in hard disk
gcc hello.c c. executes from RAM
Process d. Hidden section of process maintained by OS
1-a, 2-b, 3-c, 4-d
1-b, 2-d, 3-a, 4-c
1-b, 2-a, 3-d, 4-c
1-a, 2-c, 3-d, 4-a
Answer: 1-b, 2-d, 3-a, 4-c
Q13. State True or False?
printf() is a system call that switches from user space to kernel space.
Answer: False
Q14. MAX_SIZE in a 32 bit Linux Kernel is fixed at_____________.
Answer:
(Type: String) 0xc0000000
(Type: String) c0000000
Q15. Synchronization mechanism is used to avoid _.
Answer:
(Type: String) Race condition
(Type: String) Racecondition
(Type: String) Raceconditions
(Type: String) Race conditions
Q1. A distributed system is a system whose components are located on different
computers on a network, which communicate and coordinate their actions by passing
messages to one another.
Answers:- d. All of the above
Q2. Which one of the following is False ?
Answers:- b. Monolithic Kernel is faster than microkernel.
Q3. To extend the IO address range, we use the low memory region of the RAM as
Memory mapped IO.
Answers:- b. False
Q4. Match the following?
a. 1-d, 2-c, 3-b, 4-a
b. 1-c, 2-d, 3-b, 4-a
C. 1-b, 2-a, 3-c, 4-d
d. 1-a, 2-b, 3-d, 4-a
Answers:- a. 1-d, 2-c, 3-b, 4-a
Q5. fopen() system call switches from _____________ space
Answers:- USER
Q6. fopen() system call switches to _____________ space.
Answers:- KERNEL
Q7. For monolithic kernels, which of the following is False.
i) The entire kernel runs in protected mode.
ii) Communication between kernel modules is by system calls.
iii) Is likely to be more crashable.
a. I only
b. II only
C. I and III only
d. II and III only
Answers:- b. II only
These are Introduction to Operating Systems NPTEL Assignment 1 Answers
Q8. _____________ module in the operating system helps in communicating with
hardware devices.
Answers:- DEVICE DRIVER
Q9. In the absence of system calls, a user process can never dynamically allocate
memory.
Answers:- TRUE
Q10. What are the features of Contiki OS
a. Provide good user interface features
b. Energy aware scheduling.
C. Small footprint
d. Zigbee protocol support
Answers:- b, c and d
Q11. With a monolithic kernel such as Linux, a process, when executing can occupy the
entire 4GB address space (assuming a 32 bit system).
Answer:- True
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
Q4. State True or False
Master Boot Record allows the user to select which OS need to loaded.
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?
Answer: 4KB, 16MB
Q6. The bootloader switches the OS from _ to _.
Answer: Real mode, Protected mode.
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
. 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
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
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.
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
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
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
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
Q10. Consider the following memory map using the partition model, with Blue
representing memory in use and White representing free memory.
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
Q1. Match the following
a. Inode 1) The pid is assigned to a process
b. New state 2)Never exits
c. Trapframe 3)Stores metadata
d. init 4) For restarting a process after a context switch
a-4, b-2, c-3, d-1
a-3, b-4, c-2, d-1
a-4, b-1, c-2, d-3
a-3, b-1, c-4, d-2
Answer: a-3, b-1, c-4, d-2
Q2. We have n number of fork system calls, denoted as nXfork(). What is the total
number of process created?
n
2^n
2^(n-1)
(2^n) – 1
Answer: 2^n
Q3. State True/ False
The process whose parent exited before the child is an orphan process. Can a
process can be Zombie and Orphan at the same time.
True
False
Answer: False
Q4. What is the output of the following program for any value of a
u =x+5
x=u+5
x=u+10
u=x+10
Answer: u =x+5
Q5. Which of the below statement is false.
Init is the first process created using booting
Init process is a daemon process.
Init process have process identifier as 1
None of these
Answer: None of these
Q6. A student have written a program and used pid = fork() function call in it. The
pid returned by the fork was 5119. Which of the following is true about the
process invoking fork?
Process is a parent process with pid = 5119
Process is a child process. Its Parent’s pid is 5119
The process is a parent process. Its Child’s pid is 5119
Process is a child process with pid = 5119
Answer: The process is a parent process. Its Child’s pid is 5119
Q7. Which of the following is false?
Process : Contains code+data+heap+stack+process state
Program : One program can be used to create many processes
Process : Process is not a unique isolated entity
Program : Code + Static and Global data
Answer: Process : Process is not a unique isolated entity
Q8. The state transition that occurs due to the scanf system call in the program is
______.
NEW -> READY
READY -> RUNNING
RUNNING -> BLOCKED
BLOCKED -> READY
Answer: RUNNING -> BLOCKED
Q9. Which one of the following is the property of Operating system that helps to
prevent attacks?
i)Rings
ii) a separate stack for the kernel
iii)Virtual memory
iv) Shared Libraries
i
i, ii
i, ii, iii
i, ii, iii, iv
Answer: i, ii
Q10. State True or False.
1. If the parent and the child process share the same page table. Does this mean
they share the same page frames in the RAM?
2. COW creates a copy of the shared pages if it changes. All further changes are
made in this new page.
True, False
False, True
False, False
True, True
Answer: True, True
Q11. Match the following
a. Init.d 1) Created when system call occurs
b. Zombie 2) The %eax register is cleared when this is created
c. Child process 3) Created by kernel while booting
d. Trapframe 4) Allows a parent process to read the status of child
a-1, b-2, c-3, d-4
a-3, b-4, c-2, d-1
a-2, b-1, c-4, d-3
a-4, b-3, c-1, d-2
Answer: a-3, b-4, c-2, d-1
Q12. State True/False
In memory mapping, the entire kernel is mapped into process’ address space,
which helps the user process to easily access the kernel data.
True
False
Answer: False
Q13. Arrange the following in order
a. Change state to runnable
b. Copy page directory contents from parent to child process
c. Copy the trapframe from the parent process
d. Change state to embryo
a, c, b, d
c, d, a, b
d, b, c, a
a, c, b, d
Answer: d, b, c, a
Q14. wait() system call inside the parent process returns the status of the child.
What does it returns when it is called inside the child?
Returns -1 , when it is not the parent of any other process
Returns its own process id
Returns the exit status of the parent currently exited.
None of these.
Answer: Returns -1 , when it is not the parent of any other process
Q15. State True/False
execlp() system call replaces the child process with a new program file, but the
process ID will not change.
True
False
Answer: True
Q1) int main(){
int i, n;
for(i=1;i<n; i++){
if (fork() == 0)
printf(“OS”);
printf(“NPTEL”);
Number of times OS and NPTEL printed ?
a. 2^n and 2^n
b. 2^(n-1) and 2^(n-1)
c. 2^(n-1)-1 and 2^(n-1)
d. 2^n and 2^(n-1)
Answer: c. 2^(n-1)-1 and 2^(n-1)
Q2) State True or False.
A program to compute the sum of first 5,000 numbers can be divided into 4 sub
parts and executed on 4 CPUs using either fork or threads. The reason why we
prefer fork is because large portions of the data/code between the 4 sub-parts are
very similar and need not be duplicated.
a. True
b.False
Answer: a. True
Q3) Match the following :
1.NEW A. Waiting for an i/o
2.READY B. Currently Executing
3.RUNNING C. Process is being created
4.SLEEPING D. waiting to be picked up by scheduler
a. 1-A, 2-D, 3-B, 4-C
b. 1-C, 2-B, 3-D, 4-A
c. 1-A, 2-C, 3-D, 4-B
d. 1-C, 2-D, 3-B, 4-A
Answer: d. 1-C, 2-D, 3-B, 4-A
Q4) State True or False for a process currently in RUNNING state. A software
interrupt will result in the change to ring 1.
a. True
b. False
Answer: b. False
Q5) State True or False. In the absence of system calls, a user process can never
dynamically allocate memory.
a. True
b. False
Answer: a. True
Q6) The wait() system call inside the parent process returns the pid of an exiting
child process. Which of the following best fits when wait is called inside the child
process?
a. Returns -1, when the child is not the parent of any other process
b. Returns its own process id.
c. Returns the exit status of the parent currently exited.
d. Such a call is not feasible and is likely to crash the process.
Answer: a. Returns -1, when the child is not the parent of any other process
Q7) A student has written a program and used pid = fork() function call in it. The
pid returned by the fork was 5129. Which of the following is true about the
process invoking fork?
a. Process is a parent process with pid=5129
b. Process is a child process. Its Parent’s pid is 5129
c. The process is a parent process. Its Child’s pid is 5129
d. Process is a child process with pid = 5129
Answer: c. The process is a parent process. Its Child’s pid is 5129
Q8) State True/False
When the child process state is set to Zombie, all page directories and the kernel
are also deallocated.
a. True
b. False
Answer: b. False
Q9) 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: d. Context of the process is useful to restart the process after some
time.
Q10) What is the output in the parent process? int main() { int a=0, pid; pid =
fork(); if(pid == 0){ a= a – 10; printf(“u = %d\n”, a); } else{ a= a + 10; printf(“x = %d\
n”,a); } }
a. U = -10
b. X = 10
c. x=0
d. U = 10
Answer: b. X = 10
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
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
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
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
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 5 Answers
Q1. The data structure best suitable for implementing Round Robin Scheduling is
Stack
Queue
List
Array
Answer: Queue
Q2. What does Turn around time mean ?
Time from the process enters the ready queue to the time it starts execution.
The difference between the arrival time and the completion time of the process.
Time taken from start to completion of I/O
Time a process waits in the ready queue.
Answer: The difference between the arrival time and the completion time of the
process.
Q3. a) O(n) scheduler 1)has 2 run queues to prevent starvation
b) O(1) scheduler 2)Set based on priority of the process
c) Time Slice of a process 3)is based on average sleeping time
d) Dynamic Priority 4) Not scalable to large number of processes
a-3, b-1 c-4, d-2
a-3, b-4,c-1, d-3
a-4, b-1, c-2, d-3
a-4, b-3, c-2, d -1
Answer: a-4, b-1, c-2, d-3
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q4. Preemption is
forced deallocation of the CPU from a program which is executing on the CPU.
release of CPU by the program after completing its task.
forced allocation of CPU by a program to itself.
a program terminating itself due to detection of an error.
Answer: forced deallocation of the CPU from a program which is executing on the
CPU.
Q5. Which of the following scheduling algorithms is not preemptive?
FCFS
Round robin
SRTF
Ideal Fair scheduling
Answer: FCFS
Q6. State if the following statement is True or False.
A system can have more than one scheduling algorithm at a time
True
False
Answer: True
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q7. Shortest Remaining Time first algorithm is not practical
a. Its time complexity is huge, which makes it unsuitable for real systems
b. It requires knowledge of the burst time, which is not easy to predict
True,True
True,False
False,True
False,False
Answer: False,True
Q8. What is the Schedule length of the following process.(used FCFS scheduling)
10
16
19
20
Answer: 20
Q9. With respect to the table given above, which of the following is False?
The order of execution is same in FCFS and SRTF
The average waiting time is same for FCFS and SJF
The CPU idle time is 2 units
None of these
Answer: None of these
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q10. Consider a set of process A, B, C, D arriving in the same order at time zero
in the ready queue. Their burst times are 4, 1, 8, 1 respectively. Using Round
Robin scheduling, with time slice of 1 unit. What is the time at which process A
completes execution?
4
5
9
12
Answer: 9
Q11. Consider three process P1, P2, and P3 with arrival time (0, 1, 3) and burst
time (6 ,5,4) respectively, what is the order of completion in SJF and RR
scheduling with time slice of 2 units
SJF: P1 P3 P2 RR: P1 P2 P3
SJF: P1 P2 P3 RR: P1 P2 P3
SJF: P1 P2 P3 RR: P2 P1 P3
SJF: P1 P3 P2 RR: P1 P3 P2
Answer: SJF: P1 P3 P2 RR: P1 P3 P2
Q12. Let the base priority of a system be 130 and the nice value provided is -10.
What is the time slice that the process gets in the O(1) scheduling algorithm?
100
200
300
400
Answer: 100
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q13. Consider 3 Process, arriving at time zero, with total execution time of 40, 50,
60 ms respectively. Each process spends the first 40% of execution time doing
I/O operation and the next 60% time for computations. The scheduler uses FCFS
scheduling. Assuming that all I/O operations are overlapped. How much time in
ms the CPU is idle?
16 ms
24ms
60ms
None of these
Answer: 16ms
Q14. From the data given in Question 13, what is the average turn around time?
32 ms
48 ms
52 ms
72 ms
Answer: 52 ms
Q15. A process is provided with a bonus of 4 in the O(1) scheduling algorithm.
The dynamic priority of the process ________.
Answer: 121
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
More Weeks of Introduction to Operating Systems: Click here
More Nptel Courses: Click here
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Course Name: Introduction To Operating Systems
Link of course: Click here
Q1)The average turnaround time with the shortest remaining time first (SRTF) and
shortest job first (SJF) scheduling for the seven processes listed in the table is
___________
a. 10 and 13.4
b. 12 and 14.5
c. 11 and 13.4
d. 12 and 13.4
Answer: c. 11 and 13.4
Q2) Consider the context switching overhead of 1 unit. What is the context
switching overhead while using SRTF and SJF scheduling for the seven
processes listed in the table above. Include the context switching to load the first
process?
a. 10 and 6
b. 11 and 7
c. 11 and 6
d. 10 and 7
Answer: b. 11 and 7
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q3) For the processes listed in the table above, the schedule length is
_____________ with a FCFS scheduling scheme
Answer: 29
Consider 3 processes that start simultaneously. Each process from start to finish
takes 40, 50, and 60 ms respectively. Of this, the first 20% of the time is spent
waiting for IO events and the next 80% time for computation
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q4) The scheduler uses FCFS scheduling. Assuming that all I/O operations are
overlapped. How much time in milli-seconds is the CPU idle?
a. 8 ms
b. 16 ms
c. 18 ms
d. 40 ms
Answer: c. 18 ms
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q5) From the data given above, which of the following is the average turn around
time considering only the time when a process is either running or in the ready
queue?
a. 42 ms
b. 62 ms
c. 72 ms
d. 82 ms
Answer: c. 72 ms
Q6) For the data given above, the schedule length is _____________ assuming
SRTF scheduling algorithm
Answer: 120
Q7) Shortest Remaining Time first algorithm is not practical
Its time complexity is huge, which makes it unsuitable for real systems
It requires knowledge of the burst time, which can be easily predicted
a. True,True
b. True,False
c. False,True
d. False,False
Answer: b. True,False
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Consider three process P1, P2, and P3 with arrival time (0, 1, 3) and burst time
(6 ,5,4) respectively, what is the order of completion in SJF and RR scheduling
with time slice of 2 units
Q8) Order of completion in SJF scheduling
a. SJF: P2 P3 P1
b. SJF: P1 P2 P3
c. SJF: P1 P2 P3
d. SJF: P1 P3 P2
Answer: a. SJF: P2 P3 P1
Q9) Order of Completion in RR scheduling
a. RR: P1 P2 P3
b. RR: P1 P2 P3
c. RR: P2 P1 P3
d. RR: P1 P3 P2
Answer: d. RR: P1 P3 P2
These are Introduction to Operating Systems NPTEL Assignment 5 Answers
Q10) Professor X suggests a method to alleviate starvation in scheduling
algorithms. Under the new scheme, processes get a priority number.
The priority of the process is considered by the scheduling algorithm when
scheduling. The new scheme will alleviate starvation
a. True
b. False
Answer: a. True
These are Introduction to Operating Systems NPTEL
Assignment 6 Answers
Q1. Consider the following statements:
i) if(count==0)
ii) add %eax,%ebx
i is atomic , ii is non-atomic
i is non-atomic , ii is non-atomic
i is non-atomic , ii is atomic
Both are atomic
Answer: i is non-atomic , ii is atomic
Q2. Which of the following condition could occur due to lack of synchronization?
Inconsistency
Loss of data
Deadlock
All of these
Answer: All of these
Q3. Return value of xchg instruction is_____________
Old value
New value
1 if operation succeeds and 0 if operation fails
None of the above
Answer: Old value
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q4. By using intel hardware xchg instruction, ensures that
The critical section is deadlock free
Solution is starvation free
Process enters CS in FIFO order
More than one process enters critical section at same time
Which of the above statement is TRUE?
a only
a and b
b and c
d only
Answer: a only
Q5. Your friend wants to design synchronization primitives and tells you that he
would be better off by strictly ensuring that the processes alternate the critical
section. Your response would be:
That might not satisfy the “progress” requirement
That might not satisfy the “mutual exclusion” requirement
That might not satisfy the “bounded wait” requirement
I guess that would suffice.
Answer: That might not satisfy the “progress” requirement
Q6. State True/False
Bakery algorithm ensures that no process is starved.
True
False
Answer: True
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q7. State True/ False
Message passing is slow compared to shared memory and more error prone.
True
False
Answer: False
Q8. Inter process communication with message passing, the shared memory is in
User space
Kernel space
Virtual memory
None of these
Answer: Kernel space
Q9. In a certain application, the initial value of a counting semaphore s is 10. The
following operations were completed on the semaphore in the given order 5P,
20P, 2V, 18P, 5V, 10P, 1V. The new value of counting semaphore is ______ ?
Answer: -35
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q10. If the value of a counting semaphore s = 4, then the maximum number of
requests for the critical section before it blocks is _____?
0
1
2
4
Answer: 4
Q11. State True/False
It is possible to share the messages even without attaching the shared memory
with the address space of calling process.
True
False
Answer: False
Q12. The variable turn can have values 0 or 1
Void Process (i)
while(1)
//Non-critical section
While (turn!=i);
// Critical section
turn = j;
The above code does not provide
Mutual exclusion
Progress
Bounded wait
None of these
Answer: Progress
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q13. Test and Set instruction, which provides hardware synchronization does not
guarantee ________.
Mutual exclusion
Progress
Bounded wait
None of these
Answer: Bounded wait
Q14. Peterson’s solution is a synchronization mechanism for maximum
of _____ processes.
Answer: 2
Q15. Atomic operations like test&set ensure that
They are executed in a single cycle
They can be executed in multiple cycles,no other memory instruction is executed while
this instruction is executing
They can be executed in multiple cycles,but no other memory instruction to the same
variable is executed while this instruction is executing
No other instructions execute in the background while this instruction is being executed
Answer: They can be executed in multiple cycles,but no other memory instruction
to the same variable is executed while this instruction is executing
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
More Weeks of Introduction to Operating Systems: Click here
More Nptel Courses: Click here
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Course Name: Introduction To Operating Systems
Link of course: Click here
Q1) Consider the following code, comprising of a swap 1 function which is
atomic.
a. Mutual exclusion
b. Progress
c. Bounded wait
d. The code snippet solves the synchronization problem
Answer: The code snippet solves the synchronization problem
Q2) In the bakery algorithm for synchronization, if two process have the same
token, then the process with lower process number enters the critical section
a. True
b. False
Answer: a. True
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q3) Peterson’s solution is a synchronization mechanism works for maximum of
processes.
Answer: 2
Q4) If the value of a counting semaphore s = 5, then the maximum number of
requests for the critical section before it blocks is ________ ?
Answer: 5
Q5) Context switch cannot happen while a process executing critical section.
a. True
b. False
Answer: a. True
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q6) Consider a program, which spawns 10 threads to find out the sum of all
elements in a shared array of 100.Each thread i, takes elements A[i] to A[(10*)-1]
and computes a local sun and eventually adds Isum[i] to a shared variable tot
sum. Which of the following needs to be placed inside a critical section ?
a. Reading array values
b. Adding to tot_sum
c. Both of the above
d. None of the above
Answer: c. Both of the above
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q7) When a process exiting a critical section calls wakeup(), all the contending
processes wake up at once. This is called _______ and _______ can be used to
solve this problem.
a. Thundering herd problem, Process queue
b. Lost wakeup,Process queue
c. Thundering herd, Semaphores
d. Lost wakeup,Semaphores
Answer: c. Thundering herd, Semaphores
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q8) In a certain application, the initial value of a counting semaphore s is 20. The
following operations were completed on the semaphore in the given order 5P,
20P, 2V, 15P, 5V, 10P, 1V. The new value of counting semaphore is?
Answer: -22
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q9) Consider the notation nP and mQ to indicate n operations and m up
operations on a semaph respectively. For an application using a counti 5
semaphore, the following sequence of c is obtained : 5P, 2V, 10P, 5V, 4P. The
value of the semaphore at the end of these operations is -7. What is the initial
value of the semaphore?
Answer: 5
These are Introduction to Operating Systems NPTEL Assignment 6 Answers
Q10) If the value of a current value of a counting semaphore s = -2, what does this
imply?
a. The number of processes that can enter the critical section is 2
b. The number of processes blocked from entering the critical section is 2
c. Total number of processes that can critical section and remains in blocked state is 2
d. None of the above
Answer: b. The number of processes blocked from entering the critical section is
2
These are Introduction to Operating Systems NPTEL
Assignment 7 Answers
Q1. State true or false.
A program to compute the sum of first 10,000 numbers can be divided into 4 sub
parts and executed on 4 CPUs using either fork or threads. The reason why we
prefer threads is because large portions of the data/code between the 4 sub-parts
are very similar and need not be duplicated.
true
false.
Answer: true
Q2. Which of the following is false about User threads?
User threads can switch fast since it does not involve kernel.
User threads are lightweight since they do not require system calls.
Kernel is not aware of the behavior of every user threads i.e. if it is blocking or runnable.
None of these
Answer: None of these
Q3. Suppose we want to synchronize two concurrent process P and Q using
binary semaphore S and T.
Process P: Process Q:
while(1){ while(1){
W: Y:
print ‘0’; print ‘1’;
print ‘0’; print ‘1’;
X: Z:
}
Synchronization statements can be inserted only at points W,X,Y,Z. Which of the
following can lead to an output starting with ‘00110011’?
W : P(S) X : V(S) Y : P(T) Z: V(T) and initially S = T= 1
W : P(S) X : V(T) Y : P(T) Z: V(S) and initially S = 1 and T= 0
W : P(S) X : V(T) Y : P(T) Z: V(S) and initially S = T= 1
W : P(S) X : V(S) Y : P(T) Z: V(T) and initially S = 1 and T= 0
Answer: W : P(S) X : V(T) Y : P(T) Z: V(S) and initially S = 1 and T= 0
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q4. Each process Pi where i = 1 … 9 is given as follows
pi: Repeat p10: Repeat
P(Mutex) V(Mutex)
// Critical section //critical section
V(mutex) V(mutex)
What is the largest number of process that can be inside the critical section
1
2
3
None of these
Answer: None of these
Q5. Which of the following is not valid for deadlock prevention scheme?
Release all resource before requesting a new resource
Number all resources uniquely and never request a lower numbered resource than the
last one requested
Never request a resource after releasing any resource
Request and allocate all required resource before execution.
Answer: Never request a resource after releasing any resource
Q6. An OS implements a policy that requires a process to release all resources
before making a request for another resource. Which of the following is true
based on above statement?
Both starvation and deadlock can occur
Starvation can occur but deadlock cannot occur
Starvation cannot occur, but deadlock can occur
Neither starvation nor deadlock occur.
Answer: Starvation can occur but deadlock cannot occur
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q7. State True/ False
The following resource allocation leads to deadlock
True
False
Answer: False
Q8. Consider a situation with the dining philosopher’s problem having 5
philosophers. What is the minimum number of forks required to prevent a
deadlock?
5
6
10
None of these
Answer: 6
Q9. State True/False
In dining philosopher problem (with N philosophers), all the even numbered
philosophers takes the left fork first and then the right fork and all the odd
numbered philosopher takes the right fork first and then the left fork. This
arrangement will prevent deadlock.
True
False
Answer: True
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q10. State true or false.
a. Deadlock detection is possible using the allocation and request matrices alone.
b. A way to recover from deadlock is to take away the resource from one of the
processes or to kill the process itself.
c. Banker’s algorithm is used to detect deadlocks by analyzing the unsafe states.
True, True, False
False, True, True
True, False, True
False, True, False
Answer: True, True, False
Q11. Which one of the following is FALSE?
User level threads are not scheduled by the kernel.
When a user level thread is blocked, all other threads of its process are blocked.
Context switching between user level threads is faster than context switching between
kernel level threads.
Kernel level threads cannot share the code segment
Answer: Kernel level threads cannot share the code segment
Q12. Consider a system has 3 process P1, P2, P3. Process P1 needs 20 units of
resource R, P2 needs 15 units of R and P3 needs 5 unit of R. What is the
maximum unit of resource R that leads to deadlock?
3
20
35
37
Answer: 37
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q13. A system has 5 process and 3 resources (A, B, C). The maximum count of
resources are (10, 5, 7). Consider the following table of resource allocation.
State True/False
The above resource allocation leads to deadlock
True
False
Answer: False
Q14. Which one these is a safe sequence in Question 13?
P1, P3, P4 , P0, P2 only
P2, P4, P3, P1, P0 only
Both a and b
None are safe sequences
Answer: P1, P3, P4 , P0, P2 only
Q15. In a non-multiprogramming OS, a deadlock could occur
When two processes share the same resource
Can never happen
When two processes run at the same time, waiting for resources held by each other
When an interrupt occurs
Answer: Can never happen
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
More Weeks of Introduction to Operating Systems: Click here
More Nptel Courses: Click here
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Course Name: Introduction To Operating Systems
Link of course: Click here
Consider a system with the above resource allocation. Answer the question 1 and 2
based on this graph.
Q1) The safe sequence of execution for the process in the above figure is
a. p3, p1, p2, p4
b. p2, p1, p4, p3
c. p3, p1, p4, p2
d. Deadlock occurs
Answer: b. p2, p1, p4, p3
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q2) Consider a situation with the dining philosopher’s problem having n
philosophers. What is the minimum number of forks required to prevent a
deadlock?
a. n-1
b. n
c. n+1
d. 2n
Answer: c. n+1
A system has 5 process and 3 resources (A, B, C). The maximum count of resources
are (10, 5, 7). Consider the following table of resource allocation.
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q3) The above allocation result in unsafe state of the process.
a. True
b. False
Answer: b. False
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q4) Consider P1 has made a request of (1,0,2), then what will be a safe sequence?
a. P1, P2, P3, P4, P0
b. P1, P3, P0, P4, P2
c. P1, P3, P4, P0, P2
d. Unsafe sequence
Answer: c. P1, P3, P4, P0, P2
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q5) Consider a system with 6 processes, where each process needs 2 copies of
Resource R. The maximum units of R required to cause deadlock is _________.
Answer: 6
Q6) Consider a system with 6 processes, where each process needs 2 copies of
Resource R.The minimum units of R for deadlock free is ________.
Answer: 7
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Each process Pi where i = 1 … 9 is given as follows
pi: Repeat p10 : Repeat
P(Mutex) V(Mutex)
// Critical section //critical section
V(mutex) V(mutex)
Q7) What is the largest number of processes that can be inside the critical
section
a. 10
b. 0
c. 3
d. None of these
Answer: a. 10
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q8) Consider a system has 3 process P1, P2, and P3. Process P1 needs 11 units
of resource R; Process P2 needs 21 units of R and Process P3 needs 16 unit of R.
What is the maximum unit of resource R that leads to deadlock?
Answer: 45
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q9) Which of the following is false about User User threads?
a. User threads can switch fast since it does involve kernel.
b. User threads are lightweight since they do not require system calls.
c. Kernel is not aware of the behavior of every user threads i.e. if it is blocking or
runnable.
d. None of these
Answer: d. None of these
These are Introduction to Operating Systems NPTEL Assignment 7 Answers
Q10) Suppose we want to synchronize two concurrent processes P and Q using
binary semaphores S and T.
Synchronization statements can be inserted only at points W,X,Y,Z. Which of the
following can lead to an output starting with ‘00110011’?
a. W : P(S) X : V(S) Y : P(T) Z : V(T) and initially S = T = 1
b. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = 1 and T=0
c. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = T = 1
d. W : P(S) X : V(S) Y : P(T) Z : V(T) and initially S = 1 and T = 0
Answer: b. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = 1 and T=0
These are Introduction to Operating Systems NPTEL
Assignment 8 Answers
Q1. Suppose a source code has buffer overflow vulnerabilities. Which of the
following can cause buffer overflow vulnerabilities
scanf(“%s”,…)
strcpy(destination,source)
send command used for network connection
Only A
B and C
A and B
All of the above
Answer: All of the above
Q2. State True/False
The non executable stack helps to prevent buffer overflow attack, but the
overhead for making a stack as non executable stack is more than that of
canaries.
True
False
Answer: False
Q3. Arrange the following, based on the order the parameters are pushed into the
stack
Return address is pushed
The function call parameters
Previous frame pointers
Local variables are allocated
a, b, c, d
b, c, d, a
b, a , c, d
a, c, d, b
Answer: b, a , c, d
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q4. User X has found that s source code has a buffer overflow vulnerability
caused by strcpy instruction. He then used strncpy in place of strcpy to prevent
buffer overflow vulnerabilities. Which of the following is True
Buffer overflow attack will not occur in this source code
Buffer overflow vulnerabilities caused due to strcpy is avoided to some extend since it
do the bound check
This will not make any change in the source code
None of these
Answer: Buffer overflow vulnerabilities caused due to strcpy is avoided to some
extend since it do the bound check
Q5. State True/False
The number of gadgets present in the implementation depends on the number of
C3 instruction in the machine code
True
False
Answer: False
Q6. Match the following
Gadget 1) pseudo random number which detect the buffer overflow
Canaries 2) Short sequence of instruction ends with return
Shellcode 3) Execute inside the stack
ASLR 4) Specific address location
a-4, b-3, c-2, d-1
a-2, b-1, c-4, d-3
a-1, b-2, c-4, d-3
a-2, b-1 c-3, d-4
Answer: a-2, b-1 c-3, d-4
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q7. ASLR randomizes
The size of all arrays, thereby making it difficult to perform buffer overflows
All instructions in the program
Positions of the stack, heap, and libraries
Position of all variables in the stack
Answer: Positions of the stack, heap, and libraries
Q8. Match the following:
Secrecy 1)Limit the resource usage
Integrity 2)Unauthorized modification
Availability 3)Unauthorized disclosure
a-1, b-2, c-3
a-2, b-3, c-1
a-3, b-2, c-1
None of these
Answer: a-3, b-2, c-1
Q9. Consider the following commands in a system that supports discretionary
access control.
Which one of the following statements is TRUE?
There is no leakage of rights due to these commands
A leakage may occur when a user with write permissions, executes ADD_READ
command
A leakage may occur when a user with write permissions, executes ADD_DELETE
command
Only A is correct
Only B is correct
Only C is correct
Both B and C is correct
Answer: Only C is correct
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q10. Suppose in a system you have 2000 files and 4 user, who has access rights
on these files. Which on of the following will be the best method to implement
access control ?
Using an authorization table
Using a capability based implementation
Using access control lists
Any of the above would techniques would work well
Answer: Any of the above would techniques would work well
Q11. Which of the following is False for the Information flow policies
Information can only flow from one security class to another is less secure
Information can flow from a lower class to a higher class is less secure
Combine information from a lower class with a higher class will result in a higher class is
less secured
Combine information from one class with another information from another class will
result in same class is more secure
Answer: Information can only flow from one security class to another is less
secure
Q12. State True/False
In mandatory access control, information from top secret object will not flow to
secret and vice versa.
True
False
Answer: False
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q13. A user X with secret clearance decides to transfer information to a third
party Y. And Y tries to make changes in the confidential class. This breach of
information can be prevented by _____.
Implementing access control matrix
Implementing Bell-laPadula model
Implementing the Biba Model
None of the above
Answer: Implementing Bell-laPadula model
Q14. Using a Biba model, a user X can read a file Y and can write a file Z. Which of
the following is TRUE?
X has clearance Confidential, Y is a Top Secret file and Z is a confidential file
X has secret Confidential, Y is a Unclassified File and Z is a confidential file
X has secret Confidential, Y is a secret file and Z is a confidential file
A and C are TRUE
B and C are TRUE
A and B are TRUE
Only A is TRUE
Answer: A and C are TRUE
Q15. In a company, there are 4 levels of employees: Top management, group-
leaders, team-leaders, and staff. The top management takes feedback from all
leaders employees and then creates new policy document from the company. The
new document should be classified ____.
A top management document
A team-leader document
A staff document
A public document
Answer: A team-leader document
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Course Name: Introduction To Operating Systems
Link of course: Click here
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q1) ASLR randomizes the position of all variables in the stack and thereby
making it difficult to perform buffer overflows.
a. True
b. False
Answer: a. True
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q2) Match the following
a)Gadget 1) pseudo random number which detects buffer overflow
b)Canaries 2) Short sequence of instructions ending in a return
c)Shellcode 3) May execute in the stack if the NX bit is disabled
d)ASLR 4) helps prevent ROP attacks
a. a-4, b-3, c-2, d-1
b. a-2, b-1, c-4, d-3
c. a-1, b-2, c-4, d-3
d. a-2, b-1 c-3, d-4
Answer: c. a-1, b-2, c-4, d-3
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q3) How does the NX bit prevent buffer overflow attacks?
a. It prevents buffers from overflowing
b. It prevents certain code from executing in data segments
c. It prevents the return address in the stack being replaced by an arbitrary location
d. All of the above
Answer: d. All of the above
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q4) An ROP attack can potentially be detected at run-time by
a. Canaries
b. The number of return statements executed in the processor
c. The number of return statements present in the executable
d. By a non-executable stack
Answer: c. The number of return statements present in the executable
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q5) In the Bell-Lapadula model, information from top secret object will not flow to
secret clearance.
a. True
b. False
Answer: b. False
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q6) A user X with secret clearance decides to transfer information to a third party
Y and Y tries to make changes in the confidential class.
This breach of information can be prevented by _________________.
a. Implementing access control matrix
b. Implementing Bell-laPadula model
c. Implementing the Biba Model
d. None of the above
Answer: d. None of the above
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q7) Programmer X has found that the source code has a buffer overflow
vulnerability caused by strcpy instruction. He then used strncpy in place of
strcpy to prevent buffer overflow vulnerabilities. Which of the following is True?
a. Buffer overflow vulnerabilities caused due to strcpy is avoided due to bounds check
b. This will not make any changes in the source code
c. Buffer overflow attack will not occur in this source code
d. None of these
Answer: d. None of these
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q8) Consider the following commands in a system that supports discretionary
access control.
Which one of the following statements is TRUE?
A.There is no leakage of rights due to these commands
B.A leakage may occur when an owner of an object, executes CONFERwrite
command.
C.A leakage may occur when a user with write permissions, executes ADD_READ
command
a. Only A is correct
b. Only B is correct
c. Only C is correct
d. Both B and C is correct
Answer: b. Only B is correct
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q9) Your project manager asks you to ensure that a particular source code is free
from buffer overflow vulnerabilities. Which of the following would you need to
look out for.
a. scanf in the code
b. strcpy in the code
c. For loops that manipulate arrays
d. All of the above
Answer: b. strcpy in the code
These are Introduction to Operating Systems NPTEL Assignment 8 Answers
Q10) Arrange the following, based on the order parameters are pushed onto the
stack
a) Return address is pushed
b)The function call parameters
c)Previous frame pointers
d)Local variables are allocated
a) a, b, c, d
b) b, c, d, a
c) b, a , c, d
d) a, c, d, b
Answer: b) b, c, d, a