The comparison between the internal and external fragmentation
EXTERNAL FRAGMENTATION
|
INTERNAL FRAGMENTATION
|
The external fragmentation occur due to the allocation of the variable sized memory to the processes.
|
The internal fragmentations take place due to the allocation of the fixed sized memory to the processes.
|
The external fragmentations occur due to the removal of certain processes of variable size from the memory of the system.
|
The internal fragmentations take place due to the allocation a process which is smaller in size than the fixed amount of memory and leaves a gap in the memory.
|
For the resolution of the external fragmentation the paging, segmentation and the compaction techniques are applied.
|
The best fit method is used for solving the internal fragmentations.
|
The relocation techniques are used before the running phase of the process starts. The lower most address of the file starts from zero. The object codes are to be adjusted so that the addresses that are appropriate can be used in the runtime.
TIME
|
10
|
11
|
15
|
50
|
85
|
100
|
105
|
120
|
3
|
16
3
|
8
16
3
|
1
8
16
3
|
18
1
8
16
3
|
4
18
1
8
16
3
|
15
4
18
1
8
16
3
|
12
15
4
18
1
8
16
3
|
The order of the pages that are to be replaced are: 3,16,8,1,18,4,15,12.
The status bits are very useful for the implementation of the LRU techniques. The status bit denotes the new entries to the system and also checks in the entries are valid or not. The least recently used entries are removed from the memory.
The order in which the pages would be replaced are: 18,12,8,3,0,16,14,6.
- FCFS
- SJN
- SRT
- Round Robin
Total time taken by a job is known as the turnaround time. The total time that the job has to wait before being executed is known as the total waiting time.
- i) FCFS
A= 11-0=11
B=24-2=22
C=29-5=24
D=30-7=23
E=33-13=20
TOTAL TURNAROUND TIME= (11+22+24+23+20) = 100
AVERAGE TURNAROUND TIME=(100/4)=25
- ii) SJN
A= 20-0=20
B=33-2=31
C=9-5=4
D=1=1
E=4=4
TOTAL TURNAROUND TIME= (20+31+4+1+4)= 60
AVERAGE TURNAROUND TIME=(60/4)=15
iii) SRT
A= 25-15+2-0=12
B=5-2=3
C=11-6-5=0
D=8-7=1
E=33-13=20
TOTAL TURNAROUND TIME= (12+3+0+20)= 35
AVERAGE TURNAROUND TIME=35/4)=8.75
- iv) Round Robin
A= 29-0=29
B=33-2=31
C=21-5=24
D=10-7=3
E=13-13=0
TOTAL TURNAROUND TIME= (29+31+24+3+0)= 87
AVERAGE TURNAROUND TIME=(87/4)=21.75
Bibliography
[1] Moraru, I., Andersen, D.G., Kaminsky, M., Tolia, N., Ranganathan, P. and Binkert, N, November. Consistent, durable, and safe memory management for byte-addressable non volatile main memory. In Proceedings of the First ACM SIGOPS Conference on Timely Results in Operating Systems (p. 1). ACM., 2013.
[2] Sirohi, A., Pratap, A. and Aggarwal, M. Improvised Round Robin (CPU) Scheduling Algorithm. International Journal of Computer Applications, 99(18), pp.40-43., 2014.