When executing an open operation with a lock, the system requests exclusive access to the file. If the file is not currently open, it is opened successfully. If it is already open by another process, the program is suspended and waits for the file to become available.