pagingvssegmentation-featureimg

Similarities And Differences between Paging and Segmentation.

Hello Friends, In this blog post I am going to explain to you an interesting and importing topic which is to find out the similarities and differences between paging and segmentation. As we know these both are the schemes for managing the memory with reference to the operating system. Now we will see how these schemes help in managing the memory.

Similarities between paging and segmentation:

Both paging and segmentation are the schemes for memory management.

In a paging scheme, the operating system must maintain a page table for each process showing which frame each page occupies. Similarly in the segmentation operating system must maintain a segment table for each process showing the base address and length of each segment.

In a paging scheme, the operating system must must maintain a free frame list. Similarly, in segmentation, the operating system must maintain a list of free holes in the main memory.

In a paging scheme, the processor uses page number and offset to calculate the absolute address. Similarly in segmentation processor uses segment number and offset to calculate absolute address.

In a paging scheme, all the pages of a process must be in main memory to run, unless overlays are used. Similarly in segmentation, all the segments of a process must be in the main memory for the process to run unless overlays are used.

Differences between paging and segmentation:

In a paging scheme, the main memory is partitioned into small fixed-sized chunks called frames. Whereas in segmentation main memory is not partitioned.

In a paging scheme, the program broken into pages by the compiler or memory management system. Whereas in segmentation program segments specified by the programmer to the compiler.

Paging suffers from internal fragmentation within frames. Whereas no internal fragmentation happens in segmentation.

NO external fragmentation occurs in paging. Whereas segmentation suffers from external fragmentation.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about similarities and differences between paging and segmentation.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

file-organization

File Organization

Hello Friends, In this blog post I am going to explain to you about file organization. file organization refers to the manner in which the records of a file are arranged on secondary storage. The most popular file organization schemes are as follows.

Types of file organization:

Sequential: Records are placed in physical order. The next record is the one that physically follows the previous records. This organization is natural for files stored on magnetic tape, an inherently sequential medium.

Disk files may also be sequentially organized, but for various reasons, records in a sequential disk file are not necessarily stored contiguously.

Direct: Records are directly(randomly) accessed by their physical addresses on a direct access storage device(DASD). The application user places the records on the DASD is any order appropriate for a particular application.

Direct files require that the application user be familiar with the detailed physical organization of the DASDs upon which the files are stored. Hashing techniques are useful in locating data in a direct access file.

Indexed sequential: Records are arranged in a logical sequence according to a key contained in each record. The system maintains an index containing the physical addresses of certain principal records.

Indexed sequential records may be accessed sequentially in key order, or they may be accessed directly, by a search through the system-created index. Indexed sequential files are normally stored on disk.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about file organization schemes in an operating system.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

types-of-file-operatons

Types Of File Operations

Hello friends, In this blog post I am going to explain to you about file operations, as you all know that files are used to store the data information and this information can be retrieved with allowed permission when needed.

Each operating system has a system calls to make basic operations on files like the creation of the file, reading from a file, writing to file, etc. The following are some basic operations on the file.

Creating file operations: this operation is used to create a file. It requires two basic steps. first is to find the space for file in file system and next is to make an entry in the directory for this file. This entry includes the name, size, location of the file.

Reading from file operations: The system call that performs read operation requires two attributes – one is the file name and the other is block, where information is kept after reading.

Writing to file operations: The system call that performs write operation into a file, requires two attributes – one is file name in which data is to be written and other is information that is to be written.

Repositioning within file operations: A file is repositioned from one location to a new location by just reading file entry in directory and modifying location attribute with a new value. This operation does not require actual I/O.

Deleting file operations: In this operation, file entry is erased from the directory and all the space allocated to file is also released.

Truncating file operations: In this operation, only the contents of files are erased and all other attributes of the file remain unchanged except file size.

Open file operations: Before performing operation on a file , a process must open it. The purpose of the open file is to permit the system to read the attributes and list of disk addresses into the main memory for rapid access on later calls.

Close file operations: To free the internal table space, when all the accesses have finished, the file should be closed.

Append file operations: This operation is used to add data to the end of the file. Some system that provides a minimal set of system call do not generally have append, but some other systems provide multiple ways of doing the same thing, and this system sometimes have append.

Seek operations: Seek file operations are used to locate a location where to take the data. One common approach is a system call, which is used to seek the file pointer from a specific place in the file.

Rename operations: Rename operation is used to change the name of the existing file.

Set attributes operations: Some attributes of files are user-settable and can be changed after the file has been created. This system call makes that possible.

Get attributes operations: Get attributes operations are used to return the current value of attributes to the caller program or user.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about types of file operations.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!



linker-feature-img

What is Linker? Why is it required?

Hello Friends, in this blog post I am going to let you know about the linker in a programming language. You will know what this all about and why is it used in the execution of a program.

Generally, a modular approach is used to develop reasonably sized software. In this approach, the software is divided into a number of smaller subprograms called modules and separate source programs are written for each module of the software. It is easier to develop, test and debug smaller programs.

Each source program file can be modified and compiled independently of another source program file to create a corresponding object program file.

linker_content-img

A linker is a program that is used to properly combine all the object program files(Modules) of the software and to convert them into the final executable program, which is called a load module.

it means that a linker takes object program files(Modules), and fits them together to assemble them into the program’s final executable form.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about linker in a programming language.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

cache-feature

What is the use of Cache Memory 2019?

Hello Friends, in this blog post I am going to explain to you the cache memory, which is related to programming. We will cover the use and working procedure of cache memory.

It is very simple to understand the concept of cache memory, you can easily learn this with the help few real-life examples related to the cache memory. if we take a real-life banking example, when we go to bank then we usually get withdrawal and deposit voucher on the desk as they are most frequently used whole day in the bank, so if bank will assign a resource for doing this then it will be a burden on bank in terms of time and money both.

Whereas NEFT voucher is not kept usually at the common desk in the bank as they are rarely used in a whole day.

So in the similar fashion of programming, if the active portion of program and data are placed in fast small memory, the average memory access time can be reduced, thus reducing the total execution time of the program. Such a fast small memory is called cache memory.

it is placed between the CPU and main memory, as shown in fig 1 below. The cache memory access time is less than the access time of the memory. by a factor of 5 to 10. The cache is the fastest component in the memory hierarchy and approaches the speed of CPU components.

cache-content

The fundamental idea of the organization is that by keeping the most frequently accessed instructions and data in the fast cache memory, the average memory access time will approach the access time of the cache.

Although the cache is only a small fraction of the size of the main memory, a large fraction of memory requests will be found in the fast cache memory because of the locality of reference property of programs.

The basic operation of the cache is as follows. When the CPU needs to access memory, the cache is examined. If the word is found in the cache, it is read from the fast memory. If the word addressed by the CPU is not found in the cache, the main memory is accessed to read the word. A block of words containing the just one accessed is then transferred from the main memory to cache memory.

The block size may vary from one word to 16 words adjacent to the one just accessed. In this way, some data are transferred to cache so that future references to memory find the required words in the fast cache memory.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about the cache memory.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

overlay-feature

Overlay advantages and disadvantages in programs?

Many years ago people were first confronted with programs that were too big to fit in the available memory. The solution to this problem is usually adopted was to split the program into pieces, and they are also called as overlays.

Overlay() would start running first. When it was done, it would call another overlay, the idea of the overlay is to keep only those instructions and data in memory that are needed at the given time.

When other instructions are needed, they are loaded into the space occupied previously by instructions that are no longer needed. Some overlay system was highly complex, allowing multiple overlays in memory at once.

The overlays were kept on the disk and swapped in and out memory by the operating system, dynamically as needed.

As an example, consider a two-pass assembler. during pass1, it constructs a symbol table, then during pass2, it generates machine language code. we may be able3 to partition such an assembler into pass1 code, pass2 code, the symbol table, and common support routines used by both pass1 and pass2.

Assume that the size of these components are as follows-

Pass1 70KB
Pass2 80KB
Symbol table \20KB
Common routines 30KB

We need 200KB of memory to load everything at once. If there is only 150KB available, we can not run over the process. However, notice that pass 1 and pass2 do not need to be in memory at the same time.

We thus define two overlays- overlay A is a symbol table, common routines, and pass1, and overlay B is the symbol table, common routines, and pass2.

Overlay A needs only 120 KB and overlay B needs 130 KB as shown in Fig1 below. we can now run over assembler in the 150KB of memory. It will load somewhat faster because fewer data need to be transferred before execution starts. But, it will run somewhat slower, due to the extra I/O to read the code for overlay B over the code for overlay A.

overlay-content
Overlays

The code for overlay A and overlay B are kept on disk as absolute memory images and are read by the overlay driver as needed. special relocation and linking algorithms are needed to construct the overlays.

The programmer, on the other hand, must design and program the overlay structure properly. This task can be a major undertaking, requiring complete knowledge of the structure of the program, its code, and its data structures.

Since by definition the program is large – small programs do not need to be overlaid -obtaining a sufficient understanding of the program may be difficult. for these reasons, the use of overlay is currently limited to a microcomputer and other systems that have a limited amount of memory.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

FAT32-feature-img

FAT32 Advantages and Disadvantages?

Hello Friends, In this blog post I am going to let you know about the advantages and disadvantages of the FAT32 file system.

As we know that FAT32 is a file system that you would have seen in the study of the operating system. it is more like a traditional DBMS system where the information is stored in the form of hierarchy.

FAT32 Advantages:

The boot sector is automatically backed up at a specified location on the volume, so FAT32 volumes are less susceptible to single points of failure than FAT16 volumes.

FAT32 is best for cross-compatibility with other platforms. FAT32 is more robust. FAT32 also reduces the resources necessary for the computer to operate.

FAT32 uses small clusters, so it allocates disk space more efficiently than FAT16. Depending on the size of your files, FAT32 creates the potential for tens and even hundreds of megabytes of additional free disk space on larger volumes compared to FAT16.

The root folder of the FAT32 drive is an ordinary cluster chain and can be located anywhere on the volume. For this reason, FAT32 does not restrict the number of entries in the root folder.

FAT32 can automatically use the backup copy of the file allocation table instead of the default copy(with FAT16, only a disk repair tool such as Chkdsk can implement backup.

Disadvantages of the FAT32 file system:

More than one identical copy of FAT is maintained for protection.

There is no built-in file system security or compression scheme with FAT32.

The largest FAT32 volume that windows 2000 can format is 32GB.

FAT32 volumes are not directly accessible from an operating system other than windows 95 OSR2 and windows98.

If you have a startup failure, you can not start the computer by using MS-DOS or windows 95(excluding version OSR2 and later) bootable floppy disk.

In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP.

Hope! you would have enjoyed this post about the advantages and disadvantages of the FAT32 file system.

Please feel free to give your important feedbacks in the comment section below.

Have a great time! Sayonara!

disk_scheduling

What Is Disk Scheduling In Hindi? disk scheduling क्या होती है?

हेलो दोस्तों आज के इस ब्लॉग में मै आपको disk scheduling के बारे में बताने वाला हूँ | हो सकता है आपने इसे ऑपरेटिंग सिस्टम विषय के अन्तर्गत पढ़ा हो| multiprogrammed computing सिस्टम में जहाँ पर कई सारे प्रोग्राम एक साथ execute होते है, और यहाँ पर कई सारी processes ऐसी हो सकती है जो की disk रिकॉर्ड को read एवं write करने के लिए request कर रही हो |

और कभी कभी ऐसा होता है कि इन प्रोसेसेज कि request बहुत फास्टर होती है इन्हे सर्विस करने कि स्पीड से, इस बजह से कई बार प्रत्येक डिवाइस के लिए एक waiting queues build हो जाती है |

वैसे आमतौर पर जो request पहले आती है उसे पहले सर्विस किया जाता है | इसके बाबजूद हमें disk scheduling कि जरुरत क्यों पड़ती है ?

कुछ computing सिस्टम इन requests को सामान्यतः फर्स्ट के फर्स्ट सर्वे के बेसिस पर सर्विस करते है| कहने का मतलब जो रिक्वेस्ट पहले आती है, उसे पहले सर्विस दी जाती है, अथवा पूरी तरह से execute होने के लिए रिसोर्स मिलता है |

FCFS एक बहुत ही साफ़ सुथरी प्रक्रिया है रिक्वेस्ट को सर्वे करने के लिए, लेकिन जब request के आने कि दर ज्यादा हो जाती है तब FCFS का उपयोग एक लम्बा वेटिंग टाइम क्रिएट कर देता है जहाँ पर रिक्वेस्ट को एकलम्बा इंतज़ार करना पड़ता है अपने से आगे वाली एक लम्बी request ख़तम होने का, जबकि उसके बाद वाली रिक्वेस्ट बहुत कम execution टाइम कि होती है |

इसलिए FCFS scheduling में generate होने वाली इस समस्या से निजात पाने के लिए हम requests को कुछ अलग तरीके से सर्विस करते है, और इस प्रोसेस को हम disk scheduling कहते है|

इस disk scheduling प्रक्रिया के अंतर्गत हम pending process का बहुत बारीकी से अध्ययन करते है और ऐसी processes को सर्विस देने के लिए सबसे उत्तम विकल्प खोजते है|

disk scheduling के अंतर्गत, डिस्क scheduler सबसे पहले सभी processes के मध्य positional relationship का पता लगाते है इसके बाद इस आधार पर सर्विस queue को रिकॉर्ड किया जाता है, जिससे कि सभी request एक minimum mechanical motion के साथ सर्विस हो सके |

सबसे ज्यादा यूज होने वाली disk scheduling policies निम्नलिखित है |

  • FCFS(first come first serve) disk scheduling.
  • SSTF(shortest seek time first) disk scheduling.
  • SCAN disk scheduling.
  • Circular SCAN(C-SCAN) disk scheduling.
  • LOOK disk scheduling.
  • C-LOOK disk scheduling.

इस ब्लॉग को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट ‘Disc Scheduling‘ को खूब एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|

आपका समय शुभ हो|

deadlock-distributed-feature

Deadlock in the distributed operating system in Hindi? डैडलॉक क्या होता है?

हेलो दोस्तों, आज के इस ब्लॉग में मै आपको डिस्ट्रिब्यूटेड ऑपरेटिंग सिस्टम में होने वाले Deadlock के बारे में बताने जा रहा हूँ | डिस्ट्रिब्यूटेड सिस्टम में deadlock कुछ उसी प्रकार होता है, जैसा कि सिंगल प्रोसेसर सिस्टम में होता है | बस इसमें सबसे बड़ी दिक्कत जो होती है, वो ये होती है कि, इन्हे अवॉयड, prevent और detect करना कठिन होता है | और अगर हमें डेडलॉक के बारे में पता भी चल जाता है तो इसे cure करना बड़ा मुश्किल होता है, क्योकि साडी relevant इनफार्मेशन कई मशीनो में फ़ैल चुकी होती है |

सबसे पहले जो लोग Deadlock नहीं समझते वो समझते वो समझ ले कि डेडलॉक आखिर होता क्या है ?

इस Deadlock को हम बहुत ही सिंपल example से समझते है| deadlock उत्पन्न होता है डिपेंडेंसी के कारण, अगर आप को किसी काम को करने के लिए किसी वस्तु या औजार कि जरुरत है और वो वस्तु और औज़ार किसी और के पास हो तो फिर इस सिचुएशन को deadlock बोलेंगे, क्योकि यहाँ आप का काम एक रिसोर्स पर देपेंद कर गया है जो कि किसी और के पास है | जिस तरह नए घर के निर्माण के समय जब तक छत के लैंटर के लिए बेस नहीं बनता तब तक लाइट वाला लाइट के पाइप नहीं बिछा पता| इस तरह से लाइट वाला depend हो जाता है कारीगर पर|

कुछ लोग इस डिस्ट्रिब्यूटेड Deadlock को दो भागो में बाँट कर देखते है | एक है communication deadlock एंड सेकंड इस resource Deadlock . कम्युनिकेशन Deadlock होने का सिनेरियो देखते है, जब कोई प्रोसेस A प्रोसेस B को मैसेज सेंड करने कि कोशिश कर रही और प्रोसेस B प्रोसेस C को मैसेज भेजने कि कोशिश कर रही है और प्रोसेस C प्रोसेस A को मैसेज भेजने की कोशिश कर रही है | और इस कारण से यहाँ deadlock की सिचुएशन क्रिएट हो जाती है |

और एक resource Deadlock तब होता है जब कोई कुछ प्रोसेसेज किसी I/O डिवाइस , फाइल्स , लॉक्स या अन्य कोई और रिसोर्सेज को यूज करने के लिए लड़ती रहती है |

Deadlock को हैंडल करने के लिए 4 रणनीति निम्नलिख्ति है |

The ostrich algorithm (Ignore the problem )
Detection (allow deadlock to occur, detect them, try to recover)
Prebention (statically make deadlock structurally impossible)
Avoidance(Avoid deadlock by allocating resource carefully)

ये चारो strategies potentially applicable है डिस्ट्रिब्यूटेड सिस्टम के लिए | ऑस्ट्रिच अल्गोरिथम जितनी सिंगल प्रोसेसर सिस्टम के लिए पॉपुलर और अच्छी है उतनी ही वो डिस्ट्रिब्यूटेड सिस्टम के लिए पॉपुलर और अच्छी है | डिस्ट्रिब्यूटेड सिस्टम में प्रोग्रामिंग, ऑफिस ऑटोमेशन, प्रोसेस कंट्रोल और कई सारी एप्लीकेशन में इसका यूज होता है|

Deadlock detection और रिकवरी भी काफी पॉपुलर है | क्योकि prevention अथवा avoidance काफी कठिन पड़ जाते है | deadlock prevention भी पॉसिबल है पर यह सिंगल प्रोसेसर सिस्टम की तुलना में डिस्ट्रिब्यूटेड सस्टम में ज्यादा कठिन होता है | deadlock avoidance का डिस्ट्रिब्यूटेड सिस्टम मेम कभी यूज नहीं किया जाता, यहाँ तक कि इसे सिंगल प्रोसेसर सिस्टम में भी यूज नहीं किया जाता|

इस ब्लॉग को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट ‘deadlock in distributed operating system in hindi‘ को खूब एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|

आपका समय शुभ हो|

word-number-truncate-feature

Remove unwanted characters in word file in Hindi? वर्ड(Word) फाइल के एक कॉलम में दिए गए नंबर्स के शुरू के कुछ नंबर्स को हटाना ?

हेलो दोस्तों, आज के इस ब्लॉग में मै आपको एक बहुत ही रोचक चीज़ बताने जा रहा हूँ, जिसका उपयोग आप word फाइल में नंबर्स को truncate करने के लिए कर सकते हो. वैसे इस चीज़ को करने के लिए और भी तरीके हो सकते है, पर अभी मै आपको बहुत ही सिंपल तरीका बताने जा रहा हूँ, जिसका उपयोग आप बिना किसी फार्मूला के कर सकते हो|

मान लीजिये की आप के पास वर्ड(Word File) फाइल में एक टेबल बानी हुई है | और इस टेबल में एक कॉलम आईडी एंटर करने के लिए हो, और आपकी आईडी टोटल 16 डिजिट की हो, और अब आप इस 16 डिजिट की आईडी में से शुरू के 4 डिजिट हटाना चाहते है, जो की हर कॉलम के लिए कॉमन है, जिससे की वो आईडी 12 डिजिट की बन जाये |

कहने का मतलब आपको 16 अंको के दिए नंबर में से शुरू के 4 नंबर हटाने है using word file, पर कैसे?

इसके लिए या तो आप फार्मूला का उपयोग कर सकते है using your word file | या फिर आप नीचे दिए प्रोसीजर को फॉलो कर सकते है |

यह एक बहुत ही आसान प्रक्रिया है, बस आप निचे दिए हुए नियमो का क्रमशः पालन करिये |

सबसे पहले आप उस कॉलम को सेलेक्ट करिये जिसके आगे के 4 डिजिट काटना है| और इसके बाद आप Replace ऑप्शन को सेलेक्ट करिये जैसा की निचे दिए इमेज में दिखाया गया है |

word1
Numbers selection to be truncated
word2
Replace Process

इसके बाद आप पहले कॉलम में पहले 4 नंबर enter करिये जो की सभी दिए गए नंबर्स में कॉमन है और आप इन्हे ही हटाना चाहते है | See the above image for the same.

अब जैसा कि हमारा उद्देश्य है कि हमें सिर्फ ये 4 नंबर्स हटाने है और इनके स्थान पर कुछ भी नहीं रखना है| तो इसके लिए हम दूसरे कॉलम में कुछ में नहीं करेंगे और उसे ऐसे ही छोड़ देंगे, जैसा कि above दिए हुए चित्र में दिखाया गया है|

इसके बाद जैसे ही हम enter प्रेस करते है, वैसे ही हम पाते है कि सभी नंबर्स में से शुरू के 4 नंबर्स मिट गए है | और अब उस कॉलम में सिर्फ 12 डिजिट के नंबर्स बचे है, जैसा कि आप निचे दिए हुए चित्र में देख सकते है |

word3
Result

इस प्रोसेस का एक फायदा यह भी है कि अगर आप एक्सेल में 16 या 17 डिजिट का नंबर इन्सर्ट नहीं कर पा रहे हो कॉपी और पेस्ट के द्वारा तब आप ऐसे नंबर्स को पहले वर्ड(Word File) फाइल में स्टोर कर सकते हो और बाद में उसे इसी प्रोसेस से शार्ट कर सकते हो, उसमे से कुछ कॉमन नंबर हटा कर और बाद में सरे नंबर्स को एक साथ excel शीट में पेस्ट कर सकते हो|

इस ब्लॉग को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट ‘Remove unwanted characters or numbers from a large string of number or character in word file’ को खूब एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|

आपका समय शुभ हो|