Summary

These notes cover various aspects of operating systems, including topics like deadlock detection, file systems, and memory management. The document includes lecture materials from various slides, tutorial assignments, and self-study materials.

Full Transcript

Questions: DEFINITIONS/TERMS, APPLICATION/CALCULATION, GENERALISATION Material Covered: Lectures: From Lecture 8, slide 8.32 (Deadlock Detection) to Lecture 15, slide 15.13 (Client-Server Model) inclusive. Tutorials: From Tutorial 6 to Tutorial 10 (inclusive), and all supplementary material that w...

Questions: DEFINITIONS/TERMS, APPLICATION/CALCULATION, GENERALISATION Material Covered: Lectures: From Lecture 8, slide 8.32 (Deadlock Detection) to Lecture 15, slide 15.13 (Client-Server Model) inclusive. Tutorials: From Tutorial 6 to Tutorial 10 (inclusive), and all supplementary material that was delivered with them (e.g., Journaling File Systems). Self-Study Assignments: From Assignment 4 to Assignment 6 (inclusive) THINGS TO LOOK UP AND UNDERSTAND: NFS Mounting, Data/(Metadata) Journaling, Demand Paging, Deadlocks, Detection Algorithm, Intel Architectures, LRU Algorithm, FIFO algorithm, Page and Frame replacement algorithm, RAID, Storage Device Management, C-SCAN, Disk Attachment, Nonvolatile Memory Devices, Mass Storage Structure, Power Management, I/O Subsystems, Graph Directories, WAFL, Free Space Management, Linked Allocation, File Systems Layers, DEFINITIONS/TERMS: Root Partition: contains the OS, other partitions can hold other OSes, other file systems Domain Name System (DNS): Provides host-name-to-network address translations Network Information Service (NIS): provide username, password, userID, etc. Common Internet File System (CIFS): Used with user auth to create network logins File Session: Series of accesses between file open and closed Sun Network File System (NFS): Implementation and specification of a software system accessing remote files across LANS Virtual File System (VFS) layer: distinguishes local files from remote ones Journaling: Before overwriting on-disk structures, write note on the disk, describing what you’re doing. Writing this note is the “write ahead”. Journal write: write the contents of the transaction to the log Journal commit: write the transaction commit block Checkpoint: write the contents of the update to their locations. File control block (FCB): storage structure consisting of information about a file Device drivers: manage I/O devices at the I/O control layer Mount table: storing file system mounts, mount points, filesystem types System-wide open-file table: contains a copy of the FCB of each file and other info Per-process open-file table: contains pointers to appropriate entries in system-wide open-file table as well as other info Collisions: situations where two file names hash to the same location Buffer cache: separate section of main memory for frequently used blocks Free-behind and read-ahead: techniques to optimize sequential access Page cache: caches pages rather than disk blocks using virtual memory techniques and addresses File Attributes: - Name – only information kept in human-readable form - Identifier – unique tag (number) identifies file within file system - Type – needed for systems that support different types - Location – pointer to file location on device - Size – current file size - Protection – controls who can do reading, writing, executing - Time, date, and user identification – data for protection, security, and usage monitoring File Operations: - Create - Write – at write pointer location - Read – at read pointer location - Reposition within file - seek - Delete - Truncate - Open (Fi) – search the directory structure on disk for entry Fi, and - move the content of entry to memory - Close (Fi) – move the content of entry Fi in memory to directory - structure on disk Open-file table: tracks open files File-open count: counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it Shared lock: similar to reader lock – several processes can acquire concurrently Exclusive lock: similar to writer lock Transfer rate: is rate at which data flow between drive and computer Positioning time (random-access time): is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency) Head crash: results from disk head making contact with the disk surface Access Latency = Average access time = average seek time + average latency RAM drives: present as raw block devices, commonly file system formatted Error-correction code (ECC): not only detects, but can correct some errors Mean time to repair: exposure time when another failure could cause data loss Mean time to data loss: based on above factors RAID (redundant array of inexpensive disks): multiple disk drives provides reliability via redundancy Mirroring or shadowing (RAID 1): keeps duplicate of each disk Striped mirrors (RAID 1+0) or mirrored stripes (RAID 0+1): provides high performance and high reliability Block interleaved parity (RAID 4, 5, 6): uses much less redundancy Virtual memory: separation of user logical memory from physical memory Virtual address space: logical view of how process is stored in memory Lazy swapper: never swaps a page into memory unless page will be needed Copy-on-Write (COW): allows both parent and child processes to initially share the same pages in memory Lease Frequently Used (LFU) Algorithm: Replaces page with smallest count Most Frequently Used (MFU) Algorithm: Based on the argument that the page with the smallest count, was probably just brought in and has yet to be used Global replacement: process selects a replacement frame from the set of all frames; one process can take a frame from another Local replacement: each process selects from only its own set of allocated frames page address extension (PAE): allowing 32-bit apps access to more than 4GB of memory space Resource Type: - Available: A vector of length m indicates the number of available resources of each type - Allocation: An n x m matrix defines the number of resources of each type currently allocated to each thread. - Request: An n x m matrix indicates the current request of each thread. If Request [i][j] = k, then thread Ti is requesting k more instances of resource type R TUTORIALS / STUDY ASSIGNMENTS: A4: - FIFO: - In FIFO the producer can give multiple words before they are processed - Read, write, sleep - Rendezvous: - Waits for the producer to give a word - Futex, and Close, Rendezvous has longer strace log - Max queue size in place - uses many mutexes - pipefd A5: - ioctl: system call that maniupulates the device parameters of files - used to change physical to virtual address - sync, echo, buf A6: - docker.io T6: - memory allocation schemes that have internal fragmentation: Fixed partitioning, paging - why memory compaction cannot be performed if absolute address (binding) is used in the code: The code and data can’t be moved in the memory. Compaction requires moving code and data.’ T7: - LRU: LEAST RECENTLY USED - Second Chance: SKIPS IF RECENCY BIT - FIFO: First in first out Help CPU utilisation: - Decrease the degree of multiprogramming - Install more main memory disk scheduling discipline - No improvement under light loads Key Concepts: “Turnaround time” in scheduling. Major and minor numbers used in special (device) files. Mandatory vs. Discretionary Access Control “Bare metal” hypervisor Four necessary conditions for a deadlock: mutual exclusion, no preemption, hold and wait and circular set Demand Paging Banker’s Algorithm

Use Quizgecko on...
Browser
Browser