dfsdwdaefsgrdgfnvhbjmnm,.sagsdgdfgdfgdfgdfgdfgdfgdfgdfgdfgdfgffdgdsfgdsfgfdssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsvmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setsmodule 5-Virtual memory for cao and fuzzy setszzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzfffffffffffffffffffffffffffffffffffffffffffffffggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
Size: 19.07 MB
Language: en
Added: Jul 24, 2024
Slides: 67 pages
Slide Content
Indirection is the ability to reference something using a name, reference, or container instead of the value itself.
Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of the main memory. Virtual Memory is a storage scheme that provides user an illusion of having a very big main memory. This is done by treating a part of secondary memory as the main memory. In this scheme, User can load the bigger size processes than the available main memory by having the illusion that the memory is available to load the process. The size of virtual storage is limited by the addressing scheme of the computer system and the amount of secondary memory is available not by the actual number of the main storage locations.
Virtual Memory
In modern word, virtual memory has become quite common these days. In this scheme, whenever some pages needs to be loaded in the main memory for the execution and the memory is not available for those many pages, then in that case, instead of stopping the pages from entering in the main memory, the OS search for the RAM area that are least used in the recent times or that are not referenced and copy that into the secondary memory to make the space for the new pages in the main memory. Since all this procedure happens automatically, therefore it makes the computer feel like it is having the unlimited RAM.
Advantages of Virtual Memory: The degree of Multiprogramming will be increased. User can run large application with less real RAM. There is no need to buy more memory RAMs. Disadvantages of Virtual Memory: The system becomes slower since swapping takes time. It takes more time in switching between applications. The user will have the lesser hard disk space for its use.
Paging Paging is a method or technique which is used for non-contiguous memory allocation. It is a fixed-size partitioning theme (scheme). In paging, both main memory and secondary memory are divided into equal fixed-size partitions. The partitions of the secondary memory area unit and main memory area unit are known as pages and frames respectively.
Segmentation Segmentation is another non-contiguous memory allocation scheme like paging. like paging, in segmentation, the process isn’t divided indiscriminately into mounted(fixed) size pages. It is a variable-size partitioning theme. Like paging, in segmentation, secondary and main memory are not divided into partitions of equal size. The partitions of secondary memory area units are known as segments. The details concerning every segment are hold in a table known as segmentation table. Segment table contains two main data concerning segment, one is Base, which is the bottom address of the segment and another is Limit, which is the length of the segment.
Virtual Memory - 02 Address Mapping with Paging
Page replacement algorithm 1. First In First Out (FIFO) Example 1: Consider page reference string 1, 3, 0, 3, 5, 6, 3 with 3 page frames.Find the number of page faults. https://www.geeksforgeeks.org/page-replacement-algorithms-in-operating-systems/
2. Least Recently Used Example-3: Consider the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 3 with 4 page frames. Find number of page faults. https://afteracademy.com/blog/what-are-the-page-replacement-algorithms/
Error detection and correcting systems Parity method Cyclic Redundancy Check (CRC) Hamming code
Parity method
2. Cyclic Redundancy Check (CRC) CRC or Cyclic Redundancy Check is a method of detecting accidental changes/errors in the communication channel. CRC uses Generator Polynomial which is available on both sender and receiver side. An example generator polynomial is of the form like x3 + x + 1. This generator polynomial represents key 1011. Another example is x2 + 1 that represents key 101. m : Number of bits in data to be sent from sender side. n : Number of bits in the key obtained from generator polynomial. https://www.javatpoint.com/computer-network-error-detection
Suppose the original data is 11100 and divisor is 1001. CRC Generator A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data as the length of the divisor is 4 and we know that the length of the string 0s to be appended is always one less than the length of the divisor. Now, the string becomes 11100000, and the resultant string is divided by the divisor 1001. The remainder generated from the binary division is known as CRC remainder. The generated value of the CRC remainder is 111. CRC remainder replaces the appended string of 0s at the end of the data unit, and the final string would be 11100111 which is sent across the network.
CRC Checker The functionality of the CRC checker is similar to the CRC generator. When the string 11100111 is received at the receiving end, then CRC checker performs the modulo-2 division. A string is divided by the same divisor, i.e., 1001. In this case, CRC checker generates the remainder of zero. Therefore, the data is accepted.
3. Hamming code Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. It is a technique developed by R.W. Hamming for error correction. Redundant bits – Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer. https://www.geeksforgeeks.org/hamming-code-in-computer-network/
Dr. P. L. Thangkhiew, VIT Chennai The number of redundant bits can be calculated using the following formula: 2^ r ≥ m + r + 1, where, r = redundant bit, m = data bit Suppose the number of data bits is 7, then the number of redundant bits can be calculated using: = 2^4 ≥ 7 + 4 + 1 Thus, the number of redundant bits= 4 Parity bits. A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in the data is even or odd. Parity bits are used for error detection.
Dr. P. L. Thangkhiew, VIT Chennai There are two types of parity bits: Even parity bit: In the case of even parity, for a given set of bits, the number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0. Odd Parity bit – In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.
General Algorithm of Hamming code: Hamming Code is simply the use of extra parity bits to allow the identification of an error. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc ). All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc ). All the other bit positions are marked as data bits. Dr. P. L. Thangkhiew, VIT Chennai
4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least significant position (1, 3, 5, 7, 9, 11, etc ). Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position from the least significant bit (2, 3, 6, 7, 10, 11, etc ). Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third position from the least significant bit (4–7, 12–15, 20–23, etc ). Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth position from the least significant bit bits (8–15, 24–31, 40–47, etc ). e. In general, each parity bit covers all bits where the bitwise AND of the parity position and the bit position is non-zero. Dr. P. L. Thangkhiew, VIT Chennai
5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is odd. 6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
Determining the position of redundant bits – These redundancy bits are placed at positions that correspond to the power of 2. As in the above example: The number of data bits = 7 The number of redundant bits = 4 The total number of bits = 11 The redundant bits are placed at positions corresponding to power of 2- 1, 2, 4, and 8 2^r ≥ m + r + 1
Suppose the data to be transmitted is 1011001, the bits will be placed as follows:
Determining the Parity bits:
Error detection and correction: Suppose in the above example the 6th bit is changed from 0 to 1 during data transmission, then it gives new parity values in the binary number: The bits give the binary number 0110 whose decimal representation is 6. Thus, bit 6 contains an error. To correct the error the 6th bit is changed from 1 to 0.