Can you lock your screen on OS X?
Yes set System Preferences->Security->General to require password after screen saver begins

And in System Preferences->Desktop &amp; Screen Saver->Screen Saver hit the hot corners button and choose  one or more of the corners to Start Screen Saver

There are also Dashboard Widgets to help here. I have not used any recently.e.g.
a widget to lock and others to send the mac to sleep.