Click here to Skip to main content
15,887,027 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Please confirm... Pin
dandy722-Mar-23 3:30
dandy722-Mar-23 3:30 
GeneralRe: Please confirm... Pin
theoldfool2-Mar-23 7:48
professionaltheoldfool2-Mar-23 7:48 
GeneralRe: Please confirm... Pin
dandy722-Mar-23 12:28
dandy722-Mar-23 12:28 
GeneralRe: Please confirm... Pin
Gerry Schmitz2-Mar-23 4:36
mveGerry Schmitz2-Mar-23 4:36 
GeneralRe: Please confirm... Pin
k50542-Mar-23 6:27
mvek50542-Mar-23 6:27 
GeneralMessage Closed Pin
2-Mar-23 8:16
Member 149687712-Mar-23 8:16 
GeneralRe: Please confirm... Pin
k50542-Mar-23 9:46
mvek50542-Mar-23 9:46 
GeneralRe: Please confirm... Pin
trønderen2-Mar-23 9:44
trønderen2-Mar-23 9:44 
Your code may, directly or indirectly, require access to some common resource that is, for synchronization purposes, locked by some other process, so you have to wait for that other process to release it.

It is not uncommon that processes hold onto their resources for a long time. Ages ago, I was working on an OS (not "*nix-like") that for any write operation required the process to reserve the file system root, i.e. the entire file system. Only a single file write could be active at any one time (!).

In database systems, you frequently see programs locking entire tables (or even the entire database!) while they are doing all their processing, which may take a long time. Some database systems doesn't give you any other option than locking tables, so software ported from systems offering tuple/predicate locking may cause terrible performance with other database systems (until applications are rewritten to do their work without keeping tables locked).

Obviously, the same goes for other system resources. Some software put locks on I/O devices, system data structures (note: 'system' doesn't necessarily mean 'operating system'!) etc. far beyond the actual time they need it.

You may empathize with these developers, "sort of". Only sort of. It is convenient reserving everything you need beforehand, so that you can be sure it is all available, perform all your operations on all your resources, and then release everything. First, you keep your operations code free of any resource management code. Second, you are relieved of the analysis job of determining when you really need the different resources. Third: You avoid the problem of getting halfway in your work, and then having to handle the situation that you have to wait for some resource to become available.

There are lots of code out there that is rather 'uneconomical' in their occupation of common resources. I do suspect that other applications, utilities, demons, servers, whatever ... more commonly is to blame than the OS. If you are competing with others for shared resources, you will have the same competition even if you code in assembler. A purely CPU-consuming application will run at full speed. However, what you believe is a 'purely CPU-consuming application' may at closer inspection turn out to not be.
GeneralThe Solution to COVID Pin
BernardIE53171-Mar-23 12:46
BernardIE53171-Mar-23 12:46 
GeneralRe: The Solution to COVID Pin
dandy723-Mar-23 3:39
dandy723-Mar-23 3:39 
GeneralHow does StarLink work? Pin
Marc Clifton1-Mar-23 11:38
mvaMarc Clifton1-Mar-23 11:38 
GeneralRe: How does StarLink work? Pin
PIEBALDconsult1-Mar-23 12:40
mvePIEBALDconsult1-Mar-23 12:40 
GeneralRe: How does StarLink work? Pin
BernardIE53171-Mar-23 13:25
BernardIE53171-Mar-23 13:25 
GeneralRe: How does StarLink work? Pin
theoldfool2-Mar-23 2:21
professionaltheoldfool2-Mar-23 2:21 
GeneralRe: How does StarLink work? Pin
Single Step Debugger2-Mar-23 2:56
Single Step Debugger2-Mar-23 2:56 
GeneralRe: How does StarLink work? Pin
raddevus1-Mar-23 14:53
mvaraddevus1-Mar-23 14:53 
GeneralDid you see the movie about a database query? Pin
Single Step Debugger1-Mar-23 8:53
Single Step Debugger1-Mar-23 8:53 
GeneralRe: Did you see the movie about a database query? Pin
jmaida1-Mar-23 13:57
jmaida1-Mar-23 13:57 
GeneralRe: Did you see the movie about a database query? Pin
PIEBALDconsult1-Mar-23 14:38
mvePIEBALDconsult1-Mar-23 14:38 
GeneralRe: Did you see the movie about a database query? Pin
megaadam2-Mar-23 0:23
professionalmegaadam2-Mar-23 0:23 
GeneralRe: Did you see the movie about a database query? Pin
DerekT-P2-Mar-23 1:22
professionalDerekT-P2-Mar-23 1:22 
GeneralRe: Did you see the movie about a database query? Pin
theoldfool2-Mar-23 2:18
professionaltheoldfool2-Mar-23 2:18 
GeneralRe: Did you see the movie about a database query? Pin
Slow Eddie2-Mar-23 2:19
professionalSlow Eddie2-Mar-23 2:19 
QuestionWhich degree for front end developer Pin
S Desrosiers1-Mar-23 9:03
S Desrosiers1-Mar-23 9:03 
AnswerRe: Which degree for front end developer Pin
Richard MacCutchan1-Mar-23 9:20
mveRichard MacCutchan1-Mar-23 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.