Posts

Showing posts from October, 2020

FREE SPACE MANAGEMENT

Image
FREE SPACE MANAGEMENT Introduction: The disk space (or secondary storage) is limited: therefore we must manage the free space of the disk properly. The operating system must be able to identify those physical blocks that are not currently allocating to any file. Most of the operating systems maintain a free space list, which contains the record of all file disk blocks. When a new file is created, the operating system searches the free space list. If free space is available, it is allocated to the new file and the free space list is updated. Similarly, if a file is deleted, then the space allocated to that file is added to the free space list. Some mechanisms have been used to maintain the free list. The most popular and commonly used method to maintain the free space list is as under: Bitmap Method:   The most popular to implement (or maintain) the free space list is the bitmap method. It is also known as a bit vector. Using this scheme, the status of each block is a bit. If a block i

Contiguous Allocation Method

Image
Contiguous Allocation Method  FILE LOCKING: The file locking mechanism provides functionality similar to reader-write locks. A reader-write lock requires specifying the mode of the lock-in their read and write access. When a process wishes to only read shared data, it requests the reader-writer lock in reading mode. Similarly, when a process wishes to modify the shared data. it must request the lock in write mode. File locking enables processes to implement exclusive access to a file. There are three major options for the implementation of the file.  A file can be locked as a whole or only a part of the file can be locked. A file may be locked for reading writing, modifying appending, etc. Most of the system provides both read and write locks. If a file is locked by a process for reading, then other processes can only read data from the file but the process cannot write new data into it (i,e write access by other process is defined) Similarly, if a file is locked by a process for writi

Types of Data Access Methods

Image
Types of  Data Access Methods  ACCESS Methods The information of records is stored in a file. Logical structuring of these records is necessary so that records can be retrieved easily and quickly. The arrangement of these records on secondary storage and the ways of accessing these records are referred to as file organization.  The stored information into files can be accessed by using different ways. But the fundamental method that is commonly used to access information from files are as follows: sequential Access Method Direct Access method  Indexed Access Method  Sequential Access Method The sequential access method is the oldest and simplest access method. In sequential files, records (or information ) are stored in physical order. These records are accessed in the order in a system, one after the other. In other words, read and write operations in a computer network system on sequential files are done in sequential order. Records are reads one by one starting from the beginning of

Types of Files in OS

Image
Types of Files in the  operating system  Introduction: We know that different files store different information. A file may be an executable file, object file, program file, word processing documents, image file, and so on. The execution of different file types is different.  For example:  The execution for an executable file is ''exe" or "com",for text file is 'txt', for document file is 'doc' and so on.  Explanation: The type of file can also be recognized by magic numbers. Each file stored on the disk is divided into different sections. The first section is headed. It contains information about the file. The start of the header is called the magic number, which indicates the type of files  (such as an executable file). For example, the string "GIF8" at the beginning of the file identifies that the file contains the image data and the file extension is GIF. The operating systems rarely use the magic number to recognize the file type. H

what is file management in an operating system?

Image
 what is file management in an operating system? Introduction: File system management is a very important issue in any information system. All the software, application, documents, workbooks, and databases, etc. are stored in a computer network system in the form of different files. Files are created in main memory but are permanently stored on secondary storage media like a hard disk or optical disk. We can store data/ information on secondary storage only in the form of files. Files are created in main memory but are permanently stored on secondary storage media like a hard disk or optical disk etc. We can store any type of data or information on secondary by any of the operating systems. Definition: File system management is an essential part of all operating systems. Every operating system has to provide services to manage files and their associated functions. The part of the operating systems that deals with files are known as the file system or file system manager. WHAT Is File?

Deadlock Recovery Techniques

Image
 Deadlock Recovery Techniques Introduction: The deadlock prevention and deadlock avoidance techniques or strategies solve the deadlock problem in a system by imposing restrictions on processes. Both of these techniques may affect the performance of the system. Another approach may be that we do not use deadlock prevention and avoidance techniques in a system, and allow deadlocks to occur in a system. After the appearance of deadlocks, we can use; An algorithm to detect a deadlock. An algorithm to recover the system from the deadlock. Deadlock detection and recovery is another technique used to handle deadlocks in a system. This technique does not limit resource access or restrict process execution. The requested resources are granted to the required processes whenever possible in a system. In this environment,  The operating system periodically performs algorithms to detect the circular system automatically recovers the deadlock by performing another recovery algorithm. Deadlock Detect

Deadlock Avoidance in OS

Image
 Deadlock Avoidance in OS Deadlock Avoidance introduction: In deadlock prevention, we restrict resource requests to prevent four conditions of deadlocks. Deadlock avoidance is another approach for solving deadlock problems in a computer network system. The term avoidance is a bit confusing. In fact, in this approach better strategies are applied to prevent the occurrence of a deadlock in a system. Deadlock avoidance allows for more concurrency than prevention. With deadlock avoidance, a decision is made dynamically whether the current resource allocation request (if granted) will potentially lead to a deadlock or not on a computer network system. Deadlock Avoidance Technique: In the Deadlock Avoidance technique, the operating system needs additional information about how resources are to be requested to avoid a deadlock. The operating system only accepts those requests of processes to allocate resources that will not lead to deadlock. for this purpose, each request that in making this

Deadlock Handling in OS

Image
  Deadlock Handling in OS Deadlocks introduction: In a computer system, a situated arise when two or more processes attempt to access some resources, but the resources are locked by the other processes, and hence cannot be shared. Each of these processes will keep on waiting for its required resource which is held by some other process. No process will finish ever as each process is in waiting for the state. Such a situation is called a deadlock. In other words,'' a set of different processes is said to be in a deadlock state if every process in the set is waiting for an event that can be caused by another process in the set of a computer network system. Deadlock Example Deadlock may occur in the computer system as well as in daily life activities. Here are some examples of deadlock: A deadlock situation may also arise in the real world. Suppose two trains approach each other from the opposite side on a single track as shown. Each train wishes another one to get back to mack wa

Inter-process Communication in OS Notes

Image
  Interprocess Communication in OS Notes Definition: A set of methods through which data is shared among concurrent processes in the system is known as Inter-process Communication (IPC). Processes of a computer system may be running on one or more computers connected by a network. Multiple processes communicate with each other to share data of any type and resources. Various functions are required for the communication of processes with each other. In multiprogramming systems, some common storage is used where the process can share data. The shared storage may be a region of main memory or it may be a shared file. Fies is the most commonly used mechanism for data sharing between processes. One process can write data in the file while another process can read the data for the same file. Why Inter-Process Communication? Some of the several reasons for providing an environment that allows inter-process communication of any type are, information sharing, computation speedup, modularity, an

What is OSI model in computer network?

Image
What is the OSI model in a computer network? OSI Model Introduction: OSI stands for Open System Interconnection. It is used for designing network architecture. It was designed by the International Standard Organization (ISO) in 1983. It provides a logical framework for any type of data communication through computer networks. This model provides the reference in a system but not the reality. Therefore, the OSI model is also known as the OSI Reference Model. Purpose of OSI Model: The purpose of the OSI model is to open communication between different systems, without requesting changes to the logic of the underlying hardware and software. The OSI model is not a protocol in IP; It is a model of the network system for understanding and designing network architecture. It deals with the open system. An open system is one, which is open to others for the purpose of information exchange. Layers of the OSI Model: OSI model consists of 7 layers. Each layer is responsible for performing a partic