what is computer operating system and its categories, and computer operating systems and platforms pdf free download
FrankRoberts,France,Researcher
Published Date:11-07-2017
Your Website URL(Optional)
Comment
CSE 380
Computer Operating Systems
Instructor: Insup Lee and Dianna Xu
University of Pennsylvania
Fall 2003
Lecture Notes: File Systems
1File Systems
Computer applications need to store and retrieve
information:
need to store large amount of information
need to store information permanently
need to share information
A file is a collection of data records grouped together for
purpose of access control and modification
A file system is software responsible for creating,
destroying, organizing, reading, writing, modifying,
moving, and controlling access to files; and for
management of resources used by files.
2User-Level View
Naming convention
File structures
File types
File access: sequential vs random access
File operations:
system calls (file/directory operations)
Memory-mapped files
Directory structure (single-level vs. two-level vs.
hierarchical
path names
directory operations
3File Naming
Naming convention
number of characters (e.g. limited to 8+3 in MS-DOS)
case sensitive or not, Which chars are allowed
special prefixes/extensions (.txt, .ps, .gif, .mpg, …..)
The family of MS-DOS
Win3.1, Win95, Win98
NT, Win2000 (supports MS-DOS, but have native file
system NTFS)
In Unix, many extensions are just conventions
exceptions are for example compilers
Windows assigns meaning to extensions
4File Naming
Typical file extensions.
5File Structure
Three kinds of files
byte sequence both Unix and Windows
record sequence: when 80-column punch cards were king
tree: data processing on large mainframe
6File Types
Unix
regular files
• ASCII
• binary
directory files
character special files (I/O devices that operate on streams)
block special files (disk I/O)
Every OS must at least recognize its own executables
Unix: header, text and data
magic numbers
7File Types
(a) An executable file (b) An archive
8File Access
Sequential access
read all bytes/records from the beginning
cannot jump around, could rewind or back up
convenient when medium was magnetic tape
Random access
bytes/records read in any order
essential for many applications
read can be …
• move file pointer (seek), then read or …
• read and then move file marker
all modern OS have all files as random access
9File Attributes
File name
Size information (current, limit)
Physical address
File type
ASCII vs binary
Temporary vs Permanent
Access rights: owner, protection (who can access it)
Access type: Sequential/Random
History: Creator, time of last access/modification, other usage
data
Info for managing links
10File Attributes
Possible file attributes
11File Operations
1. Create (creat) 7. Append (write)
2. Delete (unlink) 8. Seek (lseek)
3. Open 9. Get attributes (stat,
lstat, fstat, fcntl)
4. Close
10.Set Attributes (fcntl)
5. Read
11.Rename
6. Write
12Memory Mapped Files
Instead of making a series of system calls that
involve I/O, map files into the address space of a
running process
Just two system calls, map and unmap
File I/O can be done in simple instructions that
address memory as usual
Problems:
files must fit in memory
modifications will not be written to disk until
unmapped
13Memory-Mapped Files
(a) Segmented process before mapping files
into its address space
(b) Process after mapping
existing file abc into one segment
creating new segment for xyz
14Directories
Single-Level Directory Systems
A single level directory system
contains 4 files
owned by 3 different people, A, B, and C
ownerships are shown, not file names
15Two-level Directory Systems
Naming conflicts between different users are eliminated
16Hierarchical Directory Systems
A hierarchical directory system
17Path Names
A UNIX directory tree
18Directory Operations
5. Readdir
1. Create
6. Rename
2. Delete
7. Link
3. Opendir
8. Unlink
4. Closedir
19File System Implementation
Sector 0 is called the Master Boot Record
used to boot the computer
contains partition table at the end
one partition must be marked as active/primary
BIOS (located on the parentboard) reads and
executes MBR (after trying to boot from floppy or CD-
ROM)
MBR locates the active partition and reads in its first
block
Every partitions comes with a boot block
20
Advise:Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.