
Define a file as data or a program on hard disk and explain block division, contiguous versus non-contiguous allocation, internal fragmentation, and the file system’s role in efficient disk access.
Explore file attributes such as name, type, location, size, protection, and timestamps to simplify access, route files to the correct software, and enforce access rights as metadata.
Grasp the difference between logical block numbers and physical block numbers on hard disks, and that data transfers occur in 512-byte blocks rather than individual bytes.
The create system call splits the file into 512-byte blocks, places them on the hard disk with contiguous allocation, and updates the directory with the file name and first-block location.
Map a logical byte to its logical block using floor division by a 512-byte block in contiguous allocation, then locate the physical block from the first block.
Explore how the open system call checks the system wide open file table, loads the directory entry when needed, and creates per-process table entries.
Explain how read and write system calls access files through open, using system-wide and per-process open file tables to map logical bytes to disk blocks.
Explore file operations such as creating, reading, writing, and repositioning to support sequential and random access, and learn how deletion and truncation affect data and metadata.
Contiguous allocation places all file blocks in contiguous disk blocks, making it simple to implement. Compared with non-contiguous allocation, it offers faster reads and easier random access.
Clarify the difference between contiguous and non-contiguous file allocation on a hard disk, noting that all files use one method, and that the file system decides which method to use.
Explore the size declaration problem in contiguous file allocation, where predefining exact disk blocks limits file growth and prevents seamless expansion.
Explore how contiguous allocation causes external fragmentation and holes that prevent allocation despite free space, and see how non-contiguous allocation can overcome this problem.
Examine the internal fragmentation of contiguous file allocation, where last-block waste occurs when file size isn’t a multiple of the disk block, and why non-contiguous allocation cannot fix it.
Explore linked list allocation for non-contiguous file blocks, using pointers at each block to link the next block and store the first block address in the directory to maintain continuity.
Explore the advantages of non-contiguous allocation, including no size declaration problem and no external fragmentation, via linked list allocation with pointers to grow files.
Examine the disadvantages of linked list allocation, highlighting non-contiguous blocks causing slow reads and seeks, pointer overhead, and persistent internal fragmentation when file sizes differ from block size.
Determine the pointer size per block as the ceiling of log2(n) bits, where n is the number of disk blocks; eight blocks need three bits.
the fat allocation method uses a file allocation table stored in ram to map each disk block to the next, enabling fast random access for non-contiguous file blocks.
Fat allocation mirrors linked list advantages, fixes size declaration and external fragmentation issues of contiguous allocation, and offers random access, but only overcomes one linked list disadvantage while others persist.
Calculate the file allocation table size as m entries times log2(m) bits, where m is the number of disk blocks; convert to bytes by dividing by 8.
Calculate the fat file system's fat size by deriving number of blocks from a 100×10^6 byte disk with 10^3 byte blocks and multiplying by 4 bytes per entry.
Explore indexed allocation as an alternative to maintaining a single table by using a per-file index that maps each file block to its disk block, enabling direct random access.
Demonstrates index allocation, using an index block to map file blocks to disk blocks for random access, and explains RAM efficiency versus FAT allocation, including inode concept.
Explore how indexed allocation handles index blocks spilling over, addressing internal fragmentation when index fits or exceeds a disk block, by chaining blocks with pointers in a linked list fashion.
Understand how multi level index extends the index across multiple disk blocks, using index of index and directory references to access any file block.
Merge linked list and multi-level index techniques into a hybrid scheme where a super node holds an index block with direct, single, double, and triple indirect pointers to data blocks.
Relate block size and index entry size to index entries per block, and show direct pointers reach one block while indirect pointers yield x, x^2, and x^3 blocks.
Analyze how an inode with 10 direct pointers and single, double, and triple indirect pointers yields 16 gigabytes of data in 1 kb blocks with 256 index entries per block.
solve an inode addressing problem by summing eight direct blocks, a single indirect block (16 data blocks), and a double indirect block (256 data blocks) with 128-byte blocks, totaling 35 kb.
Discover free space management with bitmap and linked list to track free disk blocks in RAM, allocate blocks to files, and delete from the free list efficiently.
Explore disk scheduling and why the cpu is faster than io, showing how ordering disk io among multiple processes affects total io time, and compare first-come-first-served with least-io-time strategies.
Explore the hard disk structure, including platters, surfaces, tracks, and cylinders, and how read/write heads access blocks. Learn seek time, rotational latency, and data transfer time.
Analyze how the order of processing disk requests changes total track movements and seek time, and compare two disk scheduling algorithms to identify the most efficient approach.
Learn how track movements relate to cylinder movements: join tracks across all surfaces to form a cylinder, and the disk rotates, all read/write heads move together while only one reads.
Explore first come first serve disk scheduling, which processes I/O requests in arrival order to avoid starvation, illustrated by a cylinder queue example starting at 100.
Explore fcfs disk scheduling with a practical example, showing requests served in their arrival order and calculating 421 cylinder movements and 421 nanoseconds of seek time.
The lecture explains shortest seek time first algorithm with a head at 100 and requests 23, 89, 132, 42, 187, illustrating the smallest movement and a total 273 cylinder movements.
SSTF, a priority-based disk scheduling algorithm, can cause starvation by always favoring requests closer to the current head position, potentially starving requests at farther cylinders.
FCFS and SSTF are not very popular these days because their seek times can become very high, whereas SCAN and LOOK offer lower seek time.
Learn the SCAN disk scheduling algorithm, its elevator-like, one-way-then-back approach, and CSCAN, LOOK, and CLOOK variants. The example starts at head 53 on a 0–199 cylinder disk, totaling 331 movements.
Explain the circular SCAN (C-SCAN) disk scheduling algorithm, starting at cylinder 53 and moving to 199, then 0, returning without servicing on the way, to achieve uniform waiting times.
Explore why circular C-SCAN wraps around from the outer cylinder to zero without servicing requests, then resumes in ascending order, and thus behaves like a circle.
Explain the Look disk scheduling algorithm, starting at cylinder 53, looking ahead to satisfy requests in one direction, then reverse, and compare its seek time to scan and circular look.
Learn the C-LOOK disk scheduling algorithm, a circular LOOK that combines LOOK and C-SCAN, starting at cylinder 53 and moving in one direction to the outermost request.
Solve a problem on the C-LOOK algorithm by calculating total head movement for a disk with cylinders 0-199, starting at head 63 and servicing requests 10, 11, 38, 47.
Apply the LOOK algorithm to a disk scheduling problem, starting at cylinder 63 and turning after servicing initial requests, comparing movements with circular LOOK and C-LOOK.
Apply the C-SCAN algorithm to a disk scheduling problem, starting at cylinder 63, moving to 199, then wrapping to 0 to service remaining requests for a total of 382 movements.
Explore solving a disk scheduling problem with the scan scheduling algorithm, computing read/write head movements from cylinder 63 to 199 and back to zero, tallying total movements.
Welcome to the course Operating systems Part 4 : File Systems & Threads
Mastering the concepts of Operating Systems is very important to get started with Computer Science because Operating System is the program which is responsible for the ease with which we are able to use computers today to solve our problems by writing application programs like Google Chrome. The concepts which we are going to study is going to give a very good understanding of File Systems and Threads - one of the advanced topics of Computer Science. But believe me I made it as simpler as possible in this course. Lot of examples has been discussed just to strenghten the understanding of concepts. Also the topics are covered in a pace where even an ordinary student can understand everything.
Without using Operating Systems ,it is extremely difficult to communicate with the hardware devices of our computer. Every computer today has an Operating System installed in it. Through this course you will not only master file systems and threads in Operating Systems and also feel the real beauty of computer science.
In this course ,every concept of Operating Systems is taught in an easy-to-understand manner such that anybody who has covered my Operating Systems Part 1 and Part 2 course will be able to understand.
Come and join me, I assure you that you will have the best learning experience of not just Operating Systems but also the core of Computer Science in a different dimension.