How does I/O ports work in linux kernel