Topics
Operating System
- Basics of Operating System (OS)
- Basics of Operating System (OS)
- Windows NT
- Introduction to GNU/Linux (GNU Not Unix)
- File Systems and Its Types
- File Operations
- Access Methods in Operating System
- Allocation Methods
- Concepts Related to Process Management
- Concepts Related to Memory Management
- Ubuntu is One of the Most Popular GNU/Linux Distributions
- Access and Security Aspects of O.S.
Data Structures
C++ Programming
- Introduction to C++ Programming
- Idea Behind Object-Oriented Programming
- Object-Oriented Programming Approach
- Object-Oriented Terms and Concepts
- Classes and Objects
- Constructors and Destructors
- Functions in C + +
- Arrays in Data Structure
- Pointers in C++
- References in C++
- Strings in C++
- Inheritance
- Virtual Functions and Polymorphism
- Friends in C++
- Operator Overloading and Type Conversions
- Files and Stream
HyperTex Markup Language (HTML)
- Introduction to HyperText Markup Language (HTML)
- HTML Documentation
- Basics of HTML Tags
- Font Tags in HTML
- Lists in HTML
- Tables in HTML
- Images in HTML
- Links in HTML
- HTML Scripts
Basic concepts of Memory Allocation & File Operations
Blocking
Disk systems have a well-defined block size determined by the size of a sector. All disk I/O is in units of one block and all blocks are of same size. In Unix, one block consists of 512 bytes. A file is considered a sequence of blocks. All the basic 1/0 functions operate in blocks. A file of 1949 bytes would be allocated 4 blocks (2048 bytes). The last 99 bytes would be wasted. This is called blocking.
Internal Fragmentation
When a computer allocates memory to a program, sometimes it gives more than the program needs. The leftover space inside the allocated memory is wasted. This is called internal fragmentation.
External Fragmentation
When a computer's memory is broken into many small, separate pieces, it can be difficult to find a big enough piece for a new program. This problem is called external fragmentation.
Free Space Management
The file system maintains a free space list to manage disk space, reusing space from deleted files. It allocates space to new files by updating this list, implemented as a bit map where each bit indicates whether a block is free (0) or allocated (1).
File operations
Following are the file operations:
- Creating a File: Allocate space and add a directory entry with the file's name and location.
- Writing a File: Use a system call to specify the file name and data. Update the write pointer to the next block.
- Reading a File: Specify the file name and memory location. Update the read pointer to the next block.
- Rewinding a File: Reset the current file position to the beginning
- Deleting a File: Release file space and invalidate the directory entry.
Operating systems use a table for open files to avoid constant directory searches.
