When it combines the libraries at load time the linking is called static

When it combines the libraries at load time the

This preview shows page 13 - 16 out of 22 pages.

level libraries to a program. When it combines the libraries at load time, the linking is called static linking and when this linking is done at the time of execution, it is called as dynamic linking. In static linking, libraries linked at compile time, so program code size becomes bigger whereas in dynamic linking libraries linked at execution time so program code size remains smaller. Logical versus Physical Address Space An address generated by the CPU is a logical address whereas address actually available on memory unit is a physical address.Logical address is also known a Virtual address.Virtual and physical addresses are the same in compile-time and load-time address-binding schemes. Virtual and physical addresses differ in execution-time address-binding scheme. The set of all logical addresses generated by a program is referred to as a logical address space. The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space. Swapping Swapping is a mechanism in which a process can be swapped temporarily out of main memory to a backing store, and then brought back into memory for continued execution. Backing store is a usually a hard disk drive or any other secondary storage which fast in access and large enough to accommodate copies of all memory images for all users. It must be capable of providing direct access to these memory images. Engistan.com | Engineer’s Community 12
Image of page 13
Engistan.com [Operating System Concepts] Memory Allocation Main memory usually has two partitions Low Memory -- Operating system resides in this memory. High Memory -- User processes then held in high memory. Operating system uses the following memory allocation mechanism. S.N. Memory Allocation Description 1 Single-partition allocation In this type of allocation, relocation-register scheme is used to protect user processes from each other, and from changing operating-system code and data. Relocation register contains value of smallest physical address whereas limit register contains range of logical addresses. Each logical address must be less than the limit register. 2 Multiple-partition allocation In this type of allocation, main memory is divided into a number of fixed-sized partitions where each partition should contain only one process. When a partition is free, a process is selected from the input queue and is loaded into the free partition. When the process terminates, the partition becomes available for another process. Engistan.com | Engineer’s Community 13
Image of page 14
Engistan.com [Operating System Concepts] Fragmentation As processes are loaded and removed from memory, the free memory space is broken into little pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering their small size and memory blocks remains unused. This problem is known as Fragmentation. Fragmentation is of two types S.N. Fragmentation Description 1 External fragmentation Total memory space is enough to satisfy a request or to
Image of page 15
Image of page 16

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture