1 OPERATING SYSTEM Answer to question number 1 a.The difference in between internal and external fragmentation are provided in the table below: Internal fragmentationExternal fragmentation When a process is allocated more memory than required, few space is left unused and thisiscalledasINTERNAL FRAGMENTATION. After execution of processes when they are swapped out of memory and other smaller processesreplacethem,manysmall noncontiguous(adjacent)blocksof unused spaces are formed which can serve a new request if all of them are put together but as they are not adjacent to each other a new request can't be served and this is known as EXTERNAL FRAGMENTATION For example the internal fragmentation occurs when the division of the memory is done into to fixed sizes. Forexampletheexternalfragmentation occurs when the division of the memory is done into to variable sizes. The possible solution to this is allocation of memory is done dynamically. It can be cured by Compaction, Paging and Segmentation. b.The memory is allocated to a pool and the memory becomes fragmented. The objects would be allocated into the system with the help of the compaction techniques. Basically, taking filled chunks of memory and making them adjacent to one another, address-wise. Similarly with empty chunks of memory, though this is a natural consequence of doing
2 OPERATING SYSTEM the first. The process is usually some form of noticing size of chunk used, and copying it to an earlier memory address, then grabbing the next chunk and repeating the process until a large portion of memory have been moved into these adjacent processes. Then marking the areas as used, and the areas copied from as available. The main disadvantage is that the jobs would be having new addresses and also compaction is a technique that would require a large amount of time and the system would be having a complicated memory management system. The main advantage is that the process can move to a straight forward position during the execution of the system and also the process can grow very easily in the system. Answer to question number 2 a. TIME 103 11163 158163 5018163 851818163 10041818163 105154181816 120121541818 The order in which the page will be replaced: 3, 16,8,1,18,4,15,12. a.The LRU algorithm uses the status bits. It provides the information about the new entries and the validation is also done by this bit. The page replacement order is : 18,12,8,3,0,16,14,6. Answer to question number 3
3 OPERATING SYSTEM a. FCFS SJN SRT Round Robin b.Total time needed by a job to be completed is known as the turnaround time. The total time that the jobs waits before getting executed is known as total waiting time.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
6 OPERATING SYSTEM 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. InProceedings 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.