KODIAK, Alaska — The morning after more than 40,000 Coast Guard members missed their first paycheck, and the federal government’s shutdown stretched into its fourth week, Eleanor King placed an empty jar next to her diner’s cash register.

In scribbled black marker, a sign on the jar, written in all capital letters, read: Donation Coast Guard. By 9 a.m. on Wednesday, nearly an hour before a rainy winter sunrise, the jar held $120 — money with which patrons were effectively buying meals for members of the maritime force.

While the shutdown has affected hundreds of thousands of federal workers across the United States, halting paychecks and furloughing those who have been deemed nonessential personnel, it has brought a particular chill to Kodiak, a small town of 6,300 on an isolated island in the Gulf of Alaska.

Roughly a quarter of the island’s population is either an employee or dependent family member of the Coast Guard, which has now had to scale back some of its operations in one of the world’s most dangerous waterways.