(1) A question about Operating Systems: a) What are segments in memory managemen
ID: 662338 • Letter: #
Question
(1) A question about Operating Systems:
a) What are segments in memory management, and what are the advantages and disadvantages of a memory architecture that uses only segments? [10 marks] b) What are pages in memory management, and what are the advantages and disadvantages of a single layer of paging in a memory architecture? [10 marks] c) A computer system uses 32 bit addresses and a segmented, paged architecture. The page size ?s 4 KB with a single level of paging and there are 1024 segments per process. i) Using a diagram, show the translation of logical addresses into physical addresses. [15 marks] ii) What is the maximum size of a segment in bytes? d) What do we mean by thrashing in the context of operating systems? Describe the causes, and the observed effects. [10 marks]Explanation / Answer
a.)Memory segmentation is division of computers primary memory into segments.In computer system using segmentation,reference to memory location includes value identifies segmant and an offset within segment.
Each process has its own private address space.The address space intially contains three segments text,data and stack.The text segment is read-only and contains machine instructions of program.The data and stack segments are used for read and write.
Advantage of using segmentation is to divide memory into different linear address.With this programs we can have a address space for this code.One for stack and another for dynamic variables.
The disadvantage for segmentation is fragmentation of memory.In this memory is fragmented due to memory loss.The segments have longer size and can't make into smaller size,it must be fully allocated into memory.
b.) Paging is one of the memory management scheme in which computer stores and retrives data from secondary storage use in memory.In paging memory-management scheme,operating system retrives data from secondary storage in same-size called pages.
The main advantage of using paaging is that it allows physical address.It is also possible to use hard disk that only necessary pages are allocated into memory.
The disadvantage of paging is that it uses only one linear address.For managing this operation are very bad for performance.
d.) Thrashing occurs when a computer virtual memory subsystem is in a constant state of paging.rapidly it exchanges data for memory for data on disk, for exclusion of most applicable level-processing.It causes the performance of computer to degrade or collapse.
Causes:
In virtual memory system thrashing may causes programs insufficiently locality of refernce.if the working set of program or a workload cannot be effectively held in physical memory.In this case swapping it is nothing but thrashing may occur.This is first used during tape operating system to describe sound tapes made when data was written to and read .
Effects:
Global Page Replacement: The paging is applied to all pages of memory regardless of process "owns" them.A page fault is one process may cause a replacement from any type of process in memory.Thus, the size of a partition varies randomly.
Local Page Replacement: The memory is divided into partitions of a predetermined size for each process and paging algorithm is applied independently for each.A process can use pages in partition.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.