On spectrum sensing, resource allocation, and medium access control in cognitive radio networks