Documente Academic
Documente Profesional
Documente Cultură
System Structure
Program development
z Editors, debuggers, frameworks
Program execution
z Initialization, scheduling
Access to I/O devices
z Uniform interface, hides details
Controlled access to files
z Authorization, sharing, caching
System access
z Protection, authorization, resolve conflicts
Error detection and response
z Hardware errors: memory error or device failure
z Software errors: arithmetic errors, access forbidden memory
locations, allocation errors
Operating System Concepts
OS as a Resource Manager
OS for time-sharing
Computer-system operation
z One or more CPUs, device controllers connect through
common bus providing access to shared memory
z Concurrent execution of CPUs and devices competing for
memory cycles
Operating System Concepts
Computer-System Operation
Main memory – only large storage media that the CPU can access
directly.
Secondary storage – extension of main memory that provides large
nonvolatile storage capacity.
Magnetic disks – rigid metal or glass platters covered with
magnetic recording material
z Disk surface is logically divided into tracks, which are
subdivided into sectors.
z The disk controller determines the logical interaction between
the device and the computer.
Operating System Concepts
Storage Hierarchy
(Note that the system-call names used throughout this text are
generic)
Operating System Concepts
API – System Call – OS Relationship
Write()
Write()
Implementation
of Write()
Operating System Concepts
Standard C Library Example
C program invoking printf() library call, which calls write() system call
Operating System Concepts
Simple Structure
Process Management
Memory Management
Storage Management
Protection and Security
Distributed Systems
Processes …
Operating System Concepts
Process Concept
Address space
z Child duplicate of parent
z Child has a program loaded into it
UNIX examples
z fork system call creates new process
z exec system call used after a fork to replace the process’
memory space with a new program
Operating System Concepts
Process Creation
Operating System Concepts
Process Termination
Sockets
Remote Procedure Calls
Remote Method Invocation (Java)
Operating System Concepts
Sockets
Examples
z Windows XP/2000
z Solaris
z Linux
z Tru64 UNIX
z Mac OS X
Operating System Concepts
Multithreading Models
Many-to-One
One-to-One
Many-to-Many
Operating System Concepts
Many-to-One
A pair of base and limit registers define the logical address space
Operating System Concepts
Multiple-partition allocation
z Hole – block of available memory; holes of various size are
scattered throughout memory
z When a process arrives, it is allocated memory from a hole
large enough to accommodate it
z Operating system maintains information about:
a) allocated partitions b) free partitions (hole)
OS OS OS OS
process 8 process 10
File Concept
Access Methods
Directory Structure
File-System Mounting
File Sharing
Protection
Operating System Concepts
File Concept
Types:
z Data
numeric
character
binary
z Program
Operating System Concepts
File Structure
Directory
Files
F1 F2 F4
F3
Fn
Naming problem
Grouping problem
Operating System Concepts
Two-Level Directory
Path name
Can have the same file name for different user
Efficient searching
No grouping capability
Operating System Concepts
Tree-Structured Directories
Operating System Concepts
Tree-Structured Directories (Cont)
Types of access
z Read
z Write
z Execute
z Append
z Delete
z List
Mass-Storage Systems
Operating System Concepts
Overview of Mass Storage Structure
I/O Hardware
Application I/O Interface
Kernel I/O Subsystem
Transforming I/O Requests to Hardware Operations
Streams
Performance
Operating System Concepts
Objectives
Scheduling
z Some I/O request ordering via per-device queue
z Some OSs try fairness
Kernel keeps state info for I/O components, including open file
tables, network connections, character device state