In: Computer Science
In Windows system programming, many system resources are represented as kernel objects, each of which is represented as a handle. Discuss with 3 examples how the system programmer can manipulate these handle objects.
In general Kernel object handles are process specific. That is, a process must either create the object or open an existing object to obtain a kernel object handle. In Windows programming , many system represented as a kernel objects, that is handeld by multiple way. We know that each type of kernel object supports its own set of access rights, in this cause For example, event handles can have set or wait access (or both), file handles can have read or write access (or both), and so on.
The windows application creates an event object. The CreateEvent function creates the event object and returns an object handle.After the event object has been created, the application can use the event handle to set or wait on the event. The handle remains valid until the application closes the handle or terminates.
Most kernel objects support multiple handles to a single object. The Windows application in the preceding illustration could obtain additional event object handles by using the OpenEvent function, This method enables an application to have handles with different access rights.For example, Handle 1 might have set and wait access to the event, and Handle 2 might have only wait access.
If
another process knows the event name and has security access to the
object, it can create its own event object handle by using
OpenEvent. The creating application could also
duplicate one of its handles into the same process or into another
process by using the DuplicateHandle function.
Using DMA system programer handel Karnel type of objects, DMA means Direct Memory Access, it can peripheral device control a processor's memory bus directly.DMA permits the peripheral, such as a UART, to transfer data directly to or from memory without having each byte (or word) handled by the processor.Direct Memory Access is useful whenever the CPU cannot keep up with the data transfer rate, or when the CPU needs to perform work while waiting for relatively slow I/O data transfers.DMA is also used for on-chip data transfer in multi-core processors. So this cause easily handeld objects by DMA.