Concepts On Os
Concepts On Os
Concepts On Os
2.Thrashing
It is a phenomenon in virtual memory schemes when the processor spends most of
its time swapping pages, rather than executing instructions. This is due to an inordinate
number of page faults.
Mutual Exclusion: Only one process may use a critical resource at a time.
Hold & Wait: A process may be allocated some resources while waiting for others.
No Pre-emption: No resource can be forcible removed from a process holding it.
Circular Wait: A closed chain of processes exist such that each process holds at least
one resource needed by another process in the chain.
9. cycle stealing
We encounter cycle stealing in the context of Direct Memory Access (DMA).
Either the DMA controller can use the data bus when the CPU does not need it, or it may
force the CPU to temporarily suspend operation. The latter technique is called cycle
stealing. Note that cycle stealing can be done only at specific break points in an
instruction cycle.
10.Busy waiting
The repeated execution of a loop of code while waiting for an event to occur is
called busy-waiting. The CPU is not engaged in any real productive activity during this
period, and the process does not progress toward completion.
13. In the context of memory management, what are placement and replacement
algorithms
Placement algorithms determine where in available real-memory to load a
program. Common methods are first-fit, next-fit, best-fit. Replacement algorithms are
used when memory is full, and one process (or part of a process) needs to be swapped out
to accommodate a new program. The replacement algorithm determines which are the
partitions to be swapped out.
2 Demand- and pre-paging
With demand paging, a page is brought into memory only when a location on that
page is actually referenced during execution. With pre-paging, pages other than the one
demanded by a page fault are brought in. The selection of such pages is done based on
common access patterns, especially for secondary memory devices.