Chapter 2: The Linux System Part 5

Slides:



Advertisements
Similar presentations
Lecture 101 Lecture 10: Kernel Modules and Device Drivers ECE 412: Microcomputer Laboratory.
Advertisements

Operating System Structures
Linux History First written by Linus Torvalds, a Finnish student, in – Version 0.01 did not support networking and ran only on compatible.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 I/O Management in Representative Operating Systems.
Operating Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
Input and output (IO) systems Last week we considered the memory management layer of the operating system. This week we will look at another layer of the.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
Chapter 1 : The Linux System Part 1 Lecture 1 10/21/
CE Operating Systems Lecture 3 Overview of OS functions and structure.
An Introduction to Device Drivers Ted Baker  Andy Wang COP 5641 / CIS 4930.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 5.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
Introduction to Operating Systems Concepts
Chapter 13: I/O Systems.
Chapter 3: Windows7 Part 5.
I/O Management.
Module 3: Operating-System Structures
Introduction to Kernel
Operating System (013022) Dr. H. Iwidat
Chapter 2: The Linux System Part 4
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Operating System Review
Chapter 12: File System Implementation
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Chapter 12: Mass-Storage Structure
Operating System Structure
Operating System I/O System Monday, August 11, 2008.
Chapter 18: The Linux System
CS703 - Advanced Operating Systems
KERNEL ARCHITECTURE.
Chapter 3: Windows7 Part 4.
Introduction to the Kernel and Device Drivers
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Chapter 14 Based on the slides supporting the text
Operating System Review
An Introduction to Device Drivers
CSCI 315 Operating Systems Design
Chapter 3: Windows7 Part 5.
Chapter 2: The Linux System Part 2
Chapter 3: Windows7 Part 3.
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Chapter 2: The Linux System Part 1
I/O Systems I/O Hardware Application I/O Interface
Operating Systems Chapter 5: Input/Output Management
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Chapter 1 Introduction to Operating System Part 5
Multithreaded Programming
Chapter 2: Operating-System Structures
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2: Operating-System Structures
Preventing Privilege Escalation
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Components of a Linux System
Presentation transcript:

Chapter 2: The Linux System Part 5

Chapter 2: The Linux System Linux History Design Principles Kernel Modules Process Management Scheduling Memory Management File Systems Input and Output Interprocess Communication Network Structure Security

File Systems

File Systems File systems: Systems that controls how the computer stores files on disk and how it retrieves them. Linux retains UNIX’s standard file-system model. In UNIX, a file does not have to be an object stored on disk or fetched over a network from a remote file server. Rather, UNIX files can be anything capable of handling the input or output of a stream of data. Device drivers can appear as files, and interprocesscommunication channels or network connections also look like files to the user.

The Linux Ext2fs File System The standard on-disk file system used by Linux is called second extended file system (ext2fs). Ext2fs uses a mechanism for locating data blocks belonging to a specific file. Ext2fs does not use fragments; it performs its allocations in smaller units The default block size on ext2fs is 1Kb, although 2Kb and 4Kb blocks are also supported Ext2fs uses allocation policies designed to place logically adjacent blocks of a file into physically adjacent blocks on disk, so that it can submit an I/O request for several disk blocks as a single operation

The Linux Ext2fs File System The ext2fs allocation policy comes in two parts. An ext2fs file system is partitioned into multiple block groups. ext2fs uses the concept of cylinder groups, where each group corresponds to a single cylinder of a physical disk. However, modern disk-drive technology packs sectors onto the disk at different densities, and thus with different cylinder sizes, depending on how far the disk head is from the center of the disk. Therefore, fixed-sized cylinder groups do not necessarily correspond to the disk’s geometry

Ext2fs Block-Allocation Policies

Input and Output

Input and Output Linux splits all devices into three classes: Block devices Character devices Network devices

Input and Output Block device: is one with which the driver communicates by sending fixed-sized blocks of data. may be accessed randomly. Example: hard disk and floppy disk, CD-ROMs, flash memory and USB cameras .

Input and Output Character device: is one with which the driver communicates by sending or receiving single characters (Bytes). only accessed serially. Example: serial port, parallel port , mice , keyboards and sound cards.

Input and Output Network device: Are dealt with differently from block and character devices. Users cannot directly transfer data to network devices; instead, they must communicate indirectly by opening a connection to the kernel’s networking subsystem.

Device-Driver Block Structure

Interprocess Communication

Interprocess Communication The standard Linux mechanism for informing a process that an event has occurred is the signal. Signals can be sent from any process to any other process. There is a limited number of signals, and they cannot carry information: Only the fact that a signal occurred is available to a process. Whenever a process wants to wait for some event to complete, it places itself on a wait queue associated with that event. The Linux kernel does not use signals to communicate with processes with are running in kernel mode, rather, communication within the kernel is accomplished via scheduling states and wait.queue structures.

Passing Data Between Processes The pipe mechanism allows a child process to inherit a communication channel to its parent, data written to one end of the pipe can be read a the other. Shared memory offers an extremely fast way of communicating; any data written by one process to a shared memory region can be read immediately by any other process that has mapped that region into its address space. To obtain synchronization, however, shared memory must be used in conjunction with another Interprocess-communication mechanism.

Network Structure

Network Structure Networking is a key area of functionality for Linux. It supports the standard Internet protocols for UNIX to UNIX communications It also implements protocols native to nonUNIX operating systems, in particular, protocols used on PC networks, such as Appletalk and IPX Internally, networking in the Linux kernel is implemented by three layers of software: The socket interface Protocol drivers Network device drivers

Network Structure (Cont.) The socket interface Receives all network requests and send them to protocol driver. Protocol drivers Create new packet Rewrite packet Reassembly or fragment packet Remove packet Decide which socket or device will send the packet Network device drivers Forward packet to suitable host

Network Structure (Cont.) The most important set of protocols in the Linux networking system is the internet protocol suite It implements routing between different hosts anywhere on the network

Security

Security The security concerns can be classified in two groups: Authentication: Making sure that nobody can access the system without first proving that she has entry rights Access control: Providing a mechanism for checking whether a user has the right to access a certain object and preventing access to objects as required. The pluggable authentication modules (PAM) system is available under Linux. PAM is based on a shared library that can be used by any system component that needs to authenticate users. Access control under UNIX systems, including Linux, is performed through the use of unique numeric identifiers (uid and gid).