Unit 5
Unit 5
Engineering &Technology
CH Rama Satya
Assistant Professor
Email: [email protected]
Disadvantages
- It suffers from external fragmentation
- Allocation and deallocation of memory is complex
Base = 30004
Limit = 12090
Range= 42094
• Example: Suppose the user process's size is 10KB and is a standard hard disk where swapping has a data
transfer rate of 40kB. Now we will calculate how long it will take to transfer from main memory to
secondary memory.
Dynamic loading
- it is a routine of a program which is not loaded until the program calls it. All routines should be contained on
disk in a relocatable load format. The main program will be loaded into memory and will be executed. Dynamic
loading also provides better memory space utilization.
Dynamic linking
- Linking is a method that helps OS to collect and merge various modules of code and data into a single
executable file. The file can be loaded into memory and executed. OS can link system-level libraries into a
program that combines the libraries at load time. In Dynamic linking method, libraries are linked at execution
time, so program code size can remain small.
Department of Computer Science & Engineering, VNRVJIET, Hyderabad April 6, 2025 10
compaction
compaction
Compaction
Non contiguous MMT
TO overcome fragmentation
NCMMT
Paging
Multi level paging
Inverted paging
Segmented paging
Need of paging
logical address can not directly access the physical address.
Terminology
1. Logical address: the address generated by CPU (virtual)
2. Physical address: resides with memory(real/actual)
3. PAS: set of physical addresses corresponds to the LA
4. LAS: set of logical addresses generated by program
No of frames in PAS=PAS/FS
Page table
- it is a data structure
- it is used to map the page number to the frame number where the page is stored
- it contains page table entries, index F.No BKI
i. frame No (essential entry)
0 i
ii. Book keeping information (optional)
• Page tables are stored in main memory 1 v
• Each process is having its own page table Page
number 2
Pg no F.No
TLB
Limit Base
1000 1400
400 3600
400 4300
1100 3200
1000 4700
Segment table
Degree of multiprogramming
- The no. of programs that can
Be executed simultaneously
In a memory.
Thrashing
if the no. of page faults is equal to the number of referred pages.
FCFS:
In FCFS, the requests are addressed in the order they arrive in the disk queue.
• Every request gets a fair chance
• No indefinite postponement
Advantages
• Average Response Time decreases
• Throughput increases
Disadvantages
• Overhead to calculate seek time in advance
• Can cause Starvation for a request if it has higher seek time as compared to incoming requests
• High variance of response time
RAID
RAID Levels
Magnetic in nature
Characteristically uses a “moving head disk” mechanism to read and write data
Improvement in disk technologies is still very impressive BUT only in the capacity / cost area.