Chapter 8. Disks and Filesystems. Ordinary Files u What is a file? –a container for ordered data –persistent (stays around) and accessible by name u Unix.

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
Chapter 4 : File Systems What is a file system?
A Guide to Unix Using Linux Fourth Edition
Allocation Methods - Contiguous
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
File System Interface CSCI 444/544 Operating Systems Fall 2008.
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Ceng Operating Systems
Operating Systems File Systems (Select parts of Ch 6)
The UNIX File System.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Guide To UNIX Using Linux Third Edition
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Guide To UNIX Using Linux Fourth Edition
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Chapter 3. The Unix Filesystem. Files and Directories (1) u What is a file? –a container for ordered data –persistent (stays around) and accessible by.
Manage Directories and Files in Linux
Linux Filesystem Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Unix Basics Chapter 4.
RjpSystem Level Programming Operating Systems 1 Having fun withy the Unix Operating System Praxis Week 7 Rob Pooley.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
How Hardware and Software Work Together
Chapter Two Exploring the UNIX File System and File Security.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Chapter 2 (Cont.) The Unix Way Essential System Administration, 3rd Edition.
Chapter 5 File Management File System Implementation.
Chapter 16 - File Systems –Persistent storage: storage that will continue to exist after a program that uses or creates it completes. –Sometimes called.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
Files & File system. A Possible File System Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Disk & File System Management Disk Allocation Free Space Management Directory Structure Naming Disk Scheduling Protection CSE 331 Operating Systems Design.
Solutions for the First Quiz COSC 6360 Spring 2014.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Annotated by B. Hirsbrunner File Systems Chapter Files 5.2 Directories 5.3 File System Implementation 5.4 Security 5.5 Protection Mechanism 5.6 Overview.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
THE FILE SYSTEM Files long-term storage RAM short-term storage Programs, data, and text are all stored in files, which is stored on.
Chapter 6 File Systems. Essential requirements 1. Store very large amount of information 2. Must survive the termination of processes persistent 3. Concurrent.
File system In computing, a file system is a method of storing and organizing computer files and the data they contain to make it easy to find and access.
Linux Architecture Overview.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
UNIX Filesystem and Hierarchy AfNOG 2008 Workshop May Rabat, Morocco.
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
Chapter 11: File System Implementation
UBUNTU INSTALLATION
Chapter 12: File System Implementation
Proc File System Sadi Evren SEKER.
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
UNIX Filesystem and Hierarchy
Exploring the UNIX File System and File Security
File Structure 2018, Spring Pusan National University Joon-Seok Kim
Operating Systems Lecture 4.
Software - Operating Systems
Department of Computer Science
Operating System Concepts
Operating System Concepts
Chapter 12: File-System Implementation CSS503 Systems Programming
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

Chapter 8. Disks and Filesystems

Ordinary Files u What is a file? –a container for ordered data –persistent (stays around) and accessible by name u Unix files –regular Unix files are pretty simple v essentially a sequence of bytes –Unix files are identified by a name in a directory v this name is actually used to resolve the hard disk name/number, the cylinder number, the track number, the sector, the block number –you see none of this v it allows the file to be accessed

Files, Directories, Devices u Unix files come in other flavors as well, such as –Directories v a file containing pointers to other files v equivalent of a “folder” on a Mac or Windows –Links v a pointer to another file v used like the file it points to v similar to “shortcuts” in Windows, but better –Devices v access a device (like a soundcard, or mouse, or...) like it is a file

Figure 3-3 A Directory Hierarchy

System Directories u Some standard directories and files in a typical Unix system –/the root –/binBINaries (executables) used to start system –/sbinSystem BINaries for Superuser –/libLIBraries used for startup –/devDEVices (peripherals) hardware interfaces –/etcunique settings for system, config, passwds –/usrBiggest filesystem, sys tools, X, apps –/tmptemp storage, good to separate partition

Typical System Directory Contents –/usr USeR stuff –/usr/bin BINaries again –/usr/includeinclude files for compilers –/usr/libLIBraries of functions etc. –/usr/locallocal stuff for apps installed later –/usr/local/binlocal BINaries –/usr/local/liblocal LIBraries for apps –/usr/X11R6X window stuff –/usr/sbinsysadmin stuff –/usr/tmpplace for more TeMPorary files –/var VARiable stuff—mail, print jobs, logfiles –/var/mailthe mail spool –/var/logsecurity info VERY IMPORTANT

The /proc filesystem u /proc is a virtual directory. in RAM rather than in HDD. u /proc contains info about your system’s state. amount of free memory processes running external devices plugged in remaing battery power if you are working in a laptop u You can, though, navigate around it with cd command and list its contents with ls command or view some of its file contents with cat command

The /proc file system  Numbers are directories representing each of the running process on the system and contain all info related to it. terra$ ls /proc/480/ auxv cwd exe maps mounts stat status wchan cmdline environ fd mem root statm task For example: cmdline contains the command the process started with mem contains the amount of memory this process holds . /proc contains information about the hardware of the system cat /proc/meminfo contains information about memory state more /proc/ioports gives all the information about the availability of I/O ports on the system and the hardware device assigned to each.

Figure 3-8 Inodes Each file on the disk has an inode which keeps information about the file, it’s address, etc