X Ricardo A. Baratto NCL. Overview System overview X protocol X server Architecture Porting process XFree86 (device drivers)

Slides:



Advertisements
Similar presentations
Chapter 18 Building the user interface. This chapter discusses n Javas graphical user interface. n Swing: an enhancement of a library called the Abstract.
Advertisements

Network II.5 simulator ..
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
1.Obtain laser pointer coordinates 2.Send laser pointer coordinates to laptop through the PS/2 port 3.Pixel Mapping between camera image and laptop screen.
Mehdi Naghavi Spring 1386 Operating Systems Mehdi Naghavi Spring 1386.
Categories of I/O Devices
X Window JianJing Cao (ID #98284). Content Introduction X Window System Function Window Principle How X Window Works Security.
An Overview Of Windows NT System Student: Yifan Yang Student ID:
COURSE: COMPUTER PLATFORMS
LYU0101 Wireless Digital Information System Lam Yee Gordon Yeung Kam Wah Supervisor Prof. Michael Lyu Second semester FYP Presentation 2001~2002.
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
File Management Systems
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
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)
XWN740 X-Windows Configuring and Using X-Windows & Hardware (Chapter 1: Pages 11-19)‏
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
Pertemuan 20 Character oriented terminal
OUTLINE WHAT ? HOW ? WHY ? BLUEPOST Poster and Message Content Specified by the User Displaying the Poster Content on a Monitor Sending Messages to.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
.NET Mobile Application Development Remote Procedure Call.
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 memory.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
CS-334: Computer Architecture
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
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.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Top Level View of Computer Function and Interconnection.
Gary MarsdenSlide 1University of Cape Town Human-Computer Interaction - 3 Programmer Support Gary Marsden ( ) July 2002.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
ROOT Team Meeting October 1 st 2010 GUI thinking and testing ideas OpenGL GUI Root Team meeting 01/10/2010.
Information Processes and Technology Multimedia: Graphics.
Building X Window GUIs with Motif The X Window System: Architecture Applications Sample code Review function (as time permits) … Introduce what it’s like.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
The Linux Operating System C. Blane Adcock Bryan Knehr Kevin Estep Jason Niesz.
EEE440 Computer Architecture
Processes Introduction to Operating Systems: Module 3.
X-WindowsP.K.K.Thambi The X Window System Module 5.
1 © 2005 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Cisco Public Cisco Unity Connection Notification Jane Rygg Core Services.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Week1: Introduction to Computer Networks. Copyright © 2012 Cengage Learning. All rights reserved.2 Objectives 2 Describe basic computer components and.
Resources & Bitmaps Adding clip art to your application.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardware Application I/O Interface
CS703 - Advanced Operating Systems
X Windows.
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Chapter 5: I/O Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
February 16th, 2004 Class Meeting 5
Chapter 13: I/O Systems.
A tutorial on building large-scale services
Module 12: I/O Systems I/O hardwared Application I/O Interface
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

X Ricardo A. Baratto NCL

Overview System overview X protocol X server Architecture Porting process XFree86 (device drivers)

System Overview History Created in 1984 in MIT. X11 released on 1987 (latest R6.6 - April 2001) The system X clients (Xlib) X protocol X server

System Overview (cont...) Features Event Driven Network Transparent Device Independent Policy Independent Extensible

X Protocol Communication Client – Server Object based Asynchronous Types of Messages: Request (Client -> Server) Reply Event (Server -> Client) Error

X Server Does Process Output Process Input Extension Mechanism Doesnt Define User Interface (X Toolkits) Window Management (WM) Each client responsible for its windows (Backing store) Interpret input (Input Methods – Input Server)

X Server (cont…) Manages a Display Screens (physical monitor) Input Devices Everything is a window Cheap, unlimited Tree structure Root window: Complete screen Top-level windows: main app window Parent window clips children

X Server Architecture Layered DIX: Device Independent DDX: Device Dependent Extensions Everything controlled through resources Screens, GCs, windows, pixmaps, regions, colormaps, fonts, cursors Created on demand Used by clients to request operations -> Use ID

Dispatch Loop Heart of X server processing (DIX) Process client requests Send input events Looks like: for(;;) nready = WaitForSomething(…); while(nready--) while(!isItTimeToYield) if(!ReadRequestFromClient(…)) break; (execute request);

Dispatch Loop (cont…) Requests serviced round-robin Execs up to 10 requests from every client Problems Busy client can monopolize server select() not called often enough Busy clients are not managed efficiently select() called too often

Dispatch Loop (cont…) Fix: XFree86 smart scheduler Use time metric, not request-count metric Dedicate time slice to each client Gather many clients on every iteration Poll, dont block Delay yielding Give clients a second chance Prioritize clients Penalize busy, praise user preferred

Screens One for each physical screen ScreenRec structure Defines functions used to handle operations on resources Main communication channel DIX-DDX

Drawables Where drawing takes place Windows Used for display output May have own colormap Pixmaps Off-screen – own depth Used to speed up operations

Graphic Contexts Describe how to draw Colors (fg, bg), fonts, line width, … Normally set up once, used by many Stored in server Requests specify GC, drawable and what to draw

Porting X Server Code layers DIX -> Dev.Independent, dont touch OS -> OS specific DDX -> Graphics Device specific Extensions -> Add features Porting Layer: OS + DDX Porting process: Define functions required by DIX to handle resources

OS Layer Maintain client connections Schedule work to be done for clients Ignore/AttendClient() File and memory management Fonts stored in files Xalloc()/Xrealloc()/Xfree()

WaitForSomething() Input events from user or hardware SetInputCheck() Requests pending from existing clients ReadRequestFromClient() New client Access control -> ClientAuthorized() Create it -> NextAvailableClient()

DDX Layer Input Processing Mouse movement Key presses Key mappings Graphics Display

Graphics Output Pixel based Screen basic data structure Manage all resources Output done on drawables Pixel data format defined by DDX Pixmap format constant across screens XYPixmap -> one bitmap for each plane Zpixmap -> series of pixel values Pixel values interpreted at display time

Output Initialization InitOutput() Process arguments Discover screens AddScreen() Initialize pixmap formats Additional implementation dependent stuff

DDX Drawables Fields Serial number, depth, size and position Procedures to manipulate them Private DDX data Pixmaps Rectangular array of pixel values Reference counted Bitmaps are depth-1

DDX Drawables (cont…) Windows Visible rectangle on screen Border drawn by DDX Create, move, resize Contents drawn by client Expose Events Server may provide backing store Bit gravity (resizing) Clipped by parent and sibbling windows

DDX 2D Graphics Procedures for drawing primitives Lines, arcs, arc filling, text drawing Clients may allow DDX optimizations e.g. Zero-width lines GC defines how to draw primitives May use MI functions Need only define basic Pixblit routines Read/write pixel values & deal with image data

XFree86 Device Drivers Lifes easier Another abstraction layer Most previous procedures already defined Drivers are loadable modules Need not distribute/recompile whole server Module format X specific OS/Architecture independent Additional formats supported (dlopen())

Device Drivers (cont…) Define only device specific routines Discovery of devices (PCI/ISA access) Device Initialization Device Drivers have access to ScreenRec Can redefine resource procedures Optimize for display hardware Sample VGA device driver Provides basic functionality usable by others Interface still unstable