X Window Syestem
X Window Systems is a network-oriented windowing system. The X server controls the display and is responsible for drawing graphics on the screen. Typical applications are X clients which exchange messages with the X server via the X Window protocol. Application are typically written through high level toolkits such as GTK, Tcl/TK, etc.
Above picture shows application communicating with a X server in a unix environment, typically through a socket. Most of the complexity of X windows is due to the client-server architecture. Design aspect that makes X windows complex and slow are:
- Client and Server have to buffer and format commands and responses as per the X window protocol.
- Synchronus and round-trip requests are inefficient.
- On processors with virtually addressed cache (ARM 9), context switch between application and X server results in cache flush further degrading performance.
MicroXwin
MicroXwin implements graphics processing in the kernel as a load module and provides a character driver interface to the associated X11 library. The main components are:
- X11.ko kernel load module that is accessible via /dev/x11dev.
- Library libX11.so that provides a binary compatible Xlib API.
- Library libXext.so that provides stubs for extensions.
- A set of SNF bitmapped fonts stored in /usr/fonts used by the kernel module.
- Complete user space anti-aliased fonts based on fontconfig and Xft.
The advantages of this design are:
- Low latency and round trip.
- Minimal buffering of requests and responses.
- No context switch overhead and possible cache flushing (ARM 9).
- Graphics data is copied directly from user space to frame buffer by kernel module.
- No changes required for existing applications.