Hexaware Placement: Sample Questions 1 - 2 of 6

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 1

Edit

Write in Short

Short Answer▾

What is an interrupt?

Explanation

An interrupt is a signal informing a program that an event has occurred. When a program receives an interrupt signal, it takes a specified action (which can be to ignore the signal) . Interrupt signals can cause a program to suspend itself temporarily to service the interrupt. Interrupt signals can come from a variety of sources. Interrupts can also be generated by other devices, such as a printer, to indicate that some event has occurred. These are called hardware interrupts Interrupt signals initiated by programs are called software interrupts. A software interrupt is also called a trap or an exception.

Question 2

Edit

Write in Short

Short Answer▾

Why semaphore is used?

Explanation

In programming, semaphores are a technique for coordinating or synchronizing activities in which multiple processes compete for the same operating system resources. A semaphore is a value in a designated place in operating system (or kernel) storage that each process can check and then change. Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again. Semaphores can be binary (0 or 1) or can have additional values. Typically, a process using semaphores checks the value and then, if it using the resource, changes the value to reflect this so that subsequent semaphore users will know to wait.

Developed by: