if one of the critical section code (linked list) is under
ISR & another one in kernel thread ? How you will
synchronize for this critical section code ?

Answers were Sorted based on User's Feedback



if one of the critical section code (linked list) is under ISR & another one in kernel thread ?..

Answer / nt

In the kernel thread you need to disable interrupts before
critical section code starts and then enable interrupts
just after critical section ends. In this way u will make
sure that either ISR or kernel thread execute critical
section at a time.

Is This Answer Correct ?    12 Yes 0 No

if one of the critical section code (linked list) is under ISR & another one in kernel thread ?..

Answer / rulingminds

For this situation in SMP case spinlocks are used

Is This Answer Correct ?    3 Yes 0 No

if one of the critical section code (linked list) is under ISR & another one in kernel thread ?..

Answer / prasad

As per my knowledge disabling interrupts is fine with
single processor environment, but don't work in multi-
processor environment. Another processor may try to update
the critical section code while one processer is serving
the ISR. So in multi-processor environment it requires more
protected mechanism.

Is This Answer Correct ?    3 Yes 1 No

if one of the critical section code (linked list) is under ISR & another one in kernel thread ?..

Answer / suhas

Why cant we have lock mechanism working here. Assign a lock
to the address space pointed to by the data structure.
Something like monitors or semaphores, why wouldn't that
work fine...instead of disabling interrupts and stuff...

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More Linux System Calls Interview Questions

what is segmentation fault?

11 Answers   AdTel, NetApp,


what are the backup utilites on red hat linux 4.0?

4 Answers   Wipro,


How to give the root permision to users?

3 Answers   Wipro,


what are different ways the context switch happens from user to kernel space or vice-versa ?

0 Answers   Alcatel,


1. Where the History file can be located? 2. How will you harden the server? 3. Diff between Raid 1 and Raid 5? 4. What is the largest disk size can be used in LVM? 5. How will you remove a PV from lvm without any data loss? 6. What is the diff between ext3 and ext2 File system? 7. How we can use resize2fs, what is the purpose? 8. What is the purpose of LVM? Why it is used? 9. If the FS is in read-only mode, so we cannot create any file. How will you fix it? 10. How to create swap partition after OS installation? 11. What is the diff between ssh and telnet? 12. How to find out the dependency required for a package?

3 Answers   IBM,


What are system calls used for process management in linux?

0 Answers  


if root user forget the password how to change it?

4 Answers   Wipro,


what kind of information the linux driver modules (.ko ) files has ?

2 Answers   NetApp,


diff b/w spinlock, seamaphores and mutex and where to use it.

2 Answers   Intel,


What will happen when we invoke a system call and say with an example of invoking a system call ?read? for a device?

3 Answers   NetApp,


how to configure ftp server on redhat linux?

9 Answers   Infosys,


what are the different ways the Linux can swich from User Space to Kernel Space & vice-versa ?

2 Answers   NetApp,


Categories