Find auto parts and accessories at bargain prices, car, truck, motorcycle, SUV, RV and much more.

Locks & Hardware

In computer science, a lock is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. Locks are one way of enforcing concurrency control policies. more...

Home
ATV Parts
Apparel & Merchandise
Automotive Tools
Aviation Parts
Boat Parts
Car & Truck Parts
Air Conditioning and Heat
Air Intake & Fuel Delivery
Brakes
Charging & Starting Systems
Computer, Chip, Cruise...
Cooling System
Decals, Emblems, & Detailing
Emission System
Engines & Components
Exhaust
Exterior
Air Dams
Antennas
Body Kits
Bras
Bug Shields
Bumpers
Car Cover
Doors & Door Handles
Fenders
Grilles
Hoods
Locks & Hardware
Mirrors
Mouldings & Trim
Nerf Bars & Running Boards
Other
Racks
Snow Plows & Parts
Splash Guards / Mud Flaps
Spoilers & Wings
Sunroof, Convertible &...
Tailgates & Liftgates
Towing & Hauling
Truck Bed Accessories
Trunk Lids & Parts
Windshield Wiper System
Filters
Gaskets
Gauges
Glass
Ignition System
Interior
Lighting & Lamps
Other Parts
Safety & Security
Salvage Parts Cars
Suspension & Steering
Transmission & Drivetrain
Turbos, Nitrous,...
Wheels, Tires & Parts
Car Audio, Video
Manuals & Literature
Motorcycle Parts
Other Vehicle Parts
Personal Watercraft Parts
Racing Parts
Services & Installation
Snowmobile Parts
Vintage Car & Truck Parts
Wholesale Lots

Types

Generally, locks are advisory locks, where each thread cooperates by acquiring the lock before accessing the corresponding data. Some systems also implement mandatory locks, where attempting unauthorized access to a locked resource will force an exception in the entity attempting to make the access.

A (binary) semaphore is the simplest type of lock. In terms of access to the data, no distinction is made between shared (read only) or exclusive (read and write) modes. Other schemes provide for a shared mode, where several threads can acquire a shared lock for read-only access to the data. Other modes such as exclusive, intend-to-exclude and intend-to-upgrade are also widely implemented.

Independent of the type of lock chosen above, locks can be classified by what happens when the lock strategy prevents progress of a thread. Most locking designs block the execution of the thread requesting the lock until it is allowed to access the locked resource. A spinlock is a lock where the thread simply waits ("spins") until the lock becomes available. It is very efficient if threads are only likely to be blocked for a short period of time, as it avoids the overhead of operating system process re-scheduling. It is wasteful if the lock is held for a long period of time.

Implementation

Locks typically require hardware support for efficient implementation. This usually takes the form of one or more atomic instructions such as "test-and-set", "fetch-and-add" or "compare-and-swap". These instructions allow a single process to test if the lock is free, and if free, acquire the lock in a single atomic operation.

Uniprocessor architectures have the option of using uninterruptable sequences of instructions, using special instructions or instruction prefixes to disable interrupts temporarily, but this technique does not work for multiprocessor shared-memory machines. Proper support for locks in a multiprocessor environment can require quite complex hardware and/or software support, with substantial synchronization issues.

The reason an atomic operation is required is because of concurrency, where more than one task executes the same logic. For example, consider the following C code:

The above example does not guarantee that the task has the lock, since more than one task can be testing the lock at the same time. Since both tasks will detect that the lock is free, both tasks will attempt to set the lock, not knowing that the other task is also setting the lock. Dekker's or Peterson's algorithm are possible substitutes if atomic locking operations are not available.

Read more at Wikipedia.org


99 00 01 02 03 04 Ford Mustang Door Lock Actuator Right $22.95 1992 Ford Bronco Or Explorer Cylinder & Key Set $24.99
F100 F250 F350 Ranger 1980 Thru 1998 Door Hinge Pins $4.99 Suburban Blazer C K Chevelle Nova Malibu Camaro Door $2.99
1938,39,40,41?? Chrysler, Dodge, Plymouth door lock Nr $0.01 Suicide Door Hidden Hinge Autoloc Small Latch Kit $199.00
porsche 914 front hood springs $39.14 Jaguar Xj6 Consol Headlight Switch 1988-94 Xj40 $0.99
Mitsubishi Front Hood Latch Assembly New Oem New $6.25 Hood Latch Releace Bracket 94 95 96 Impala Ss Caprice $7.99
Hood Latch Releace Assy 94 95 96 Impala Ss Caprice $7.99 1993 - 2002 Camaro Firebird Rear Hatch Latch Ls1 Lt1 $12.99
Ford F150 F250 F350 Truck Door Lock Actuator Pair Set $38.95 Range Rover Classic Clock $24.95
Jaguar Xj6 Chrome Dual Fuel Filler Caps (2) w/Key $24.95 Mustang Door Trunk Lock Set & Key 1983-1987-1993 Nd1 $24.99
Volvo S40 Trunk Lock Set $3.00 Nrg Innovations Black Carbon Fiber Hood Lock Pins+Keys $49.99
Jeep Grand Wagoneer coolant overflow tank bottle $9.87 Brackets Windshield Frame To Hood Yj Wrangler Jeep $9.99
70 71 Torino Hood Latch Assembly - Fairlane/Ranchero $9.99 1970 71 72 Pontiac Trans Am Firebird Hood Latch & Handl $9.99
64 65 66 Ford Thunderbird Trunk Lock Latch Post Cover $4.99 Jdm Badge Leaf Beginner Prelude Del Sol Turbo Boost Nos $5.99
Jdm Badge Leaf Beginner Subaru Wrx Sti Impreza Legacy $5.99 Aerocatch Hood Lock Honda Acura Toyota Scion Mazda Jdm $88.00
Jdm Badge Leaf Beginner Integra Accord H22 B18 B20 Crx $5.99 Idatalink Ads-Dl Universal Door Lock Multi Series New $24.99
Carbon Fiber Hood Pin Lock Accord Prelude 90-93 92-96 $2.99 1963-1991 Jeep Grand Wagoneer New! 2 pc Door Lock Set! $44.95
Geo Tracker Left Door Latch 88-94 Two Door $14.99 Universal Black Carbon Fiber Racing Hood Lock Pin+Key $9.99
Jdm Black Carbon Fiber Racing Hood Lock Pikc With Keys $9.99 83 88 Monte Carlo Ss Grand National new lock set $39.99
Carbon Fiber Hood Jdm Hood Lock Pin Black With Keys $9.99 85 Grand Wagoneer 360 engine wiring harness & ignition $48.87
Grand Wagoneer 360 engine power steering pump bracket $38.87 70 71 72 73 Camaro Nos Trunk Lock Bezel and Gasket $59.99
Master Lock #377 Universal Coupler Lock fits 1-7/8 & 2" $10.00 Jeep Grand Wagoneer radiator $38.87
88 89 90 91 - 93 Ford Mustang Power Door Lock Actuator $20.95 Gmc S15 Suburban Tahoe Yukon Power Door Lock Actuator $29.95
Alpha Lock Car Model Al700C Brand New $74.99 2007 Gm Chevrolet Aveo Left Door Lock Cylinder And Keys $5.99
Oldsmobile Olds Cutlass 442 H/O W-30 Hood Latch Release $9.99 69 Oldsmobile Olds Cutlass 442 H/O W-30 Rare Trim Clips $9.99
Porsche Power Steering Reservoir 924 928 944 968(78-95) $29.50
Click to see more Locks & Hardware items
Prices current as of last update, 11/19/08 1:55am.


Home Contact Resources Exchange Links eBay