Explain following terms with respect to memory management.
(i) Internal Priority
(ii) External Priority
(iii) Purchase Priority
(iv) Time Slice
(i) Internal priority: It is decided by scheduling algorithms. Their calculations are based on the current state of the process. The following scheduling algorithms are used for that.
(a) Shortest Job First Algorithm: The job whose expected time for completion is less is executed first.
(b) Expected remaining time to complete: It is same as SJF at the beginning but as the process progresses the time will change. At regular intervals operating system calculates the expected remaining time for completion and accordingly priority is determined.
(ii) External Priority: - The user specifies the priority externally at the time of initiating the process. If the user does not specify any priority, operating system assumes a default priority for that. If the job is too urgent, system manager permits the process at a higher priority.
(iii) Purchase Priority: In this priority higher priority processes are charged at a higher rate. The operating system keeps the track of the time used by each process and charges it accordingly.
(iv) Time Slice: Each process is given a certain time for execution. The predetermined time given is called as time slice of the process.