Presentation is loading. Please wait.

Presentation is loading. Please wait.

Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.

Similar presentations


Presentation on theme: "Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007."— Presentation transcript:

1 Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007

2 Today’s Schedule Memory Management - Chapter 4  Segmentation Multics & Intel Pentium – Segmentation & Paging Input/Output  Device Types  Goals of I/O Devices for O/S  Layers of I/O s/w System

3 Objectives You will be able to describe: Advantages of Segmentation for Memory management Types of I/O Devices Goals of I/O Software from O/S view Layers of I/O s/w and what happens in each

4 What is Segmentation? Having two or more separate virtual address spaces  Provide several independent address spaces called segments  Each segment goes from 0 to some max  Segments can have varying lengths  Length can change during execution  Programmer will now have to specify the segment number Can now use one segment for shared libraries

5 Segmentation One-dimensional address space with growing tables One table may bump into another

6 Segmentation – Logical View Allows each table to grow or shrink, independently

7 Segmentation vs Paging? Paging is incidental Page-data is heterogeneous Statically Sized Segments are intentional Segment data is homogenous Dynamically Sized

8 Pure Segmentation Segment size varies and changes External Fragmentation  Also called “Checkerboarding”  Swapping large segments for small  Resolution: Compaction

9 Implementation of Pure Segmentation Removal of the checkerboarding by compaction

10 MULTICS Implementation Similar to Multi-Level Paging  Address contains Segment # for table  Segment table holds Segment Descriptors  Descriptor contains page table location  Standard Page Table Has 2 18 segments  2 16 Pages With 36-bit entries  2 34 Total Pages

11 Segmentation with Paging: MULTICS Descriptor segment points to page tables Segment descriptor – numbers are field lengths

12 Segmentation with Paging: MULTICS A 34-bit MULTICS virtual address

13 Segmentation with Paging: MULTICS Conversion of a 2-part MULTICS address into a main memory address

14 Input & Output Device types Block Device  Stores fixed size block  Independently addressable  disks Character Devices  Stream of characters  No seek operation, not addressable  Keyboard, printer, n/w interface

15 I/O Hardware Some typical device, network, and data base rates

16 Device Controllers I/O devices have components:  mechanical component  electronic component The electronic component is the device controller  may be able to handle multiple devices Controller's tasks  convert serial bit stream to block of bytes  perform error correction as necessary  make available to main memory

17 Goals of I/O Software Device independence  programs can access any I/O device  without specifying device in advance · (floppy, hard drive, or CD-ROM) Uniform naming  name of a file or device a string or an integer  not depending on which machine Error handling  handle as close to the hardware as possible

18 Goals of I/O Software (cont’d) Synchronous vs. asynchronous transfers  blocked transfers vs. interrupt-driven Buffering  data coming off a device cannot be stored in final destination Sharable vs. dedicated devices  disks are sharable  tape drives would not be

19 I/O Software Layers Layers of the I/O Software System

20 Interrupt Handlers Interrupt handlers are best hidden  have driver starting an I/O operation block until interrupt notifies of completion Interrupt procedure does its task  then unblocks driver that started it

21 Device Drivers Logical position of device drivers is shown here Communications between drivers and device controllers goes over the bus

22 Device-Independent I/O Software Functions of the device-independent I/O software Uniform interfacing for device drivers Buffering Error reporting Allocating and releasing dedicated devices Providing a device-independent block size

23 Device-Independent I/O Software (a) Without a standard driver interface (b) With a standard driver interface

24 Device-Independent I/O Software (a) Unbuffered input (b) Buffering in user space (c) Buffering in the kernel followed by copying to user space (d) Double buffering in the kernel

25 Summary User-Space I/O Software Layers of the I/O system and the main functions of each layer

26 Summary Advantages of Segmentation for Memory management Types of I/O Devices Goals of I/O Software from O/S view Layers of I/O s/w and what happens in each

27 Thursday, April 5 Read Chapter 5  5.1.1 & 5.1.2 I/O Devices  5.2.1 Goals of I/O in O/S  5.3.1 to 5.3.3  5.4 Disks


Download ppt "Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007."

Similar presentations


Ads by Google