For example, the SunOS has the clock interrupt at 10 ms intervals, so 100 times per
second the clock generates an interrupt, just like an I/O device.
When the clock interrupts, the hardware shifts to monitor mode automatically, and the instruction stored in
the memory location associated with the clock device ???vectors??? to the OS code that handles ???clock tick processing.???
At every clock tick, the OS will check to see if the time quantum of the executing program has expired, if any
I/O device has ???timed out,??? and if any process priorities need adjustment (some scheduling algorithms use such
time-based adjustments). It will also update the system time-of-day clock to keep it accurate. When the OS
completes its clock tick processing, it will again put the computer in user mode and transfer control of the CPU
to the appropriate user process.
Besides being in the Ready or Running state, a process can also be in the Waiting (or Blocked) state. Some
OSs have more than one waiting state as a way to segregate processes waiting for different conditions, such as
waiting for I/O, waiting for child processes to complete, waiting for memory, etc. The SunOS recognizes five
states: Running, Runnable in Memory (i.
Pages:
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279