(a) The hiring of a room by a lodger on a periodic basis within a dwelling unit occupied by the owner may be terminated by either party giving written notice to the other of his or her intention to terminate the hiring, at least as long before the expiration of the term of the hiring as specified in Section 1946.
The notice shall be given in a manner prescribed in Section 1162 of the Code of Civil Procedure or by certified or registered mail, restricted delivery, to the other party, with a return receipt requested.