|
A bit more than 2:1 as the anchoring point of the cable on the upper right also moves up relative to the lower pulley, but not as much as the upper pulley.
|
|
|
|
|
Not 2:1. The upper wheel and the anchor point do not move upward at the same distance. The difference is because they are along the lever which means the lift will be a function of the distance from the fulcrum and the angle through which the lever moves. That is just the pulleys alone. You also have to take the total length of the lever into account to get the total mechanical advantage.
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
OK, I'll have a stab (retired aero engineer, if I get this horribly wrong my excuse is that I have been going down the pub for the last 10 years): assuming some approximate dimensions for simplicity
location: Lift pt pulley 2 pulley 1 cable att pivot
distance from pivot: 1 3/4 1/2 1/4 0
fixed/moves: m m f m f
If the lifting lever rises by 1 unit, then the weight rises by the sum of the cable extensions:
* cable att: cable extends by 1/4
* p1 has no effect as it is fixed
* p2 cable extends 3/4 * 2 = 1.5 (this is a pulley effect - cable must extend on both sides of pulley)
So total cable lift is 1.75, ie force at lift point = 1.75 * weight.
|
|
|
|
|
I'm writing my first Linux application using threads, and I'm discovering how much Linux thread management is dumb wrt Windows.
First, threads are actually miniprocesses, they can't even return the pid of their parent process because they are by all purposes separate. Well mate, if I wanted a process I would have forkinged...
Second, there is no critical section, which is only natural given point 1. So every mutex is a kernel mode transition.
Third, apparently threads continuously poll mutexes isntead of going in WAIT. To use a proper thread wait you'd need a condition variable AND a mutex. No reason at all.
After years of development under Windows, targetting mostly XP (2002 tech), I feel as if I traveled in the past. Like that episode with Scotty...
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Can anyone with Linux experience confirm this? It sounds like pure shite. What do they do for POSIX threads? For the functions added to std::atomic_flag [^] in C++20?
|
|
|
|
|
No experience of Linux, but a quick scan of Wikipedia seems to back this up:
the primary abstraction known by the kernel is still a process, and new threads are created with the clone() system call
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
1. UNIX, which Linux effectively is, was designed long before Windows.
2. Why does it matter?
|
|
|
|
|
If he's porting a design where the threads think they're running under the same process, whose id they will all return, that design will have to be reworked.
If threads actually remap memory in the way that processes do, context switching between threads would be far more expensive. OP works on embedded systems where this could be unacceptable.
Having to drop into kernel mode to acquire or release a mutex is another overhead. If threads poll a mutex, that's about as idiotic as it gets if it's truly a spinlock. Having to introduce a condition variable (which has problems of its own) to avoid this would be yet another non-portable overhead.
I would bet that somewhere, someone implemented lightweight threads on Linux. The change may have been rejected by a collection of bozos, in which case it might be available as a variant from some vendor.
|
|
|
|
|
I'm shocked at this. I have done a huge amount of multi-threaded stuff under Windows which was fairly easy to do, coordinating the threads, etc. I happened to not have done any of this under Linux so I never realized how hard this would be. I'll stick to Windows a little longer I think.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
One thing I noticed pretty soon is the lack of a wakeable sleep. I used to pace my threads with wakeable Sleeps, so that I had instant response when I needed it and ensured a periodical run if anything went wrong.
Also asynchronous I/O requires a lot more boilerplate code wrt the magnificient Win32 API. Yes, they are harder to learn, but they make writing async I/O code a breeze.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Totally off the top of my head, but Linux, like it's UNIX parent, seems to try to make "everything" look the same. Making it a process, although involving addition overhead in your coding may give it some advantages. If he parent keeps track, as well it should, it keeps working.
What abilities does a process have, or avail itself of, that would not be available if the subprocess were as in Windows. For example, and I don't know why one would do it except to stop a train wreck, one can access a process and stop it uniquely even from outside the application.
Usually, Linux is based upon enabling. What can you do now that you couldn't before (and since you couldn't you'd not think about doing it).
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I think you simply need to learn more about Linux threads. It's not worse, it's just different.
|
|
|
|
|
If the descriptions in this thread are accurate, it's different and worse, at least if you care about portability and performance.
|
|
|
|
|
Definitely. So far I'm using just the pthread library to keep thnigs basic enough to not run into issues when I will deploy the component on the board it will run into (very basic Poky build).
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
If you google for "linux parent pid" you will find that you can indeed get the parent pid. Programmatically Speaking: Find parent pid given a pid[^]
The Windows concept of Critical Section "protects code". One can easily get accustomed to this view, but in fact you never need to "protect code", what you need to protect is resources (memory, file handles, etc). Linux has something called spin-locks, which are lightweight mutexes. Kernel Locking Techniques | Linux Journal[^]
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
I've only heard of spinlocks being used in SMP systems while waiting for another processor to finish using shared memory. The memory might be used, for example, to avoid the overhead of the IP stack during interprocessor messaging. It's a reasonable design if the spinning is always brief, because the spinning processor is literally twiddling its thumbs while waiting.
|
|
|
|
|
megaadam wrote: If you google for "linux parent pid" you will find that you can indeed get the parent pid. Programmatically Speaking: Find parent pid given a pid[^] Documentation states that getppid returns the controller thread pid, which is an additional thread by Linux created the first time a thread for a process is created. Now, I don't need that info now but I find it a flaw in the architecture of a thread - indeed the same documentation specifies that a thread is just a process which overshares. The fact is, if I wanted a process, I would have used a process. I'm used to an entirely different concept of thread and it baffles and irks me.
megaadam wrote: Linux has something called spin-locks, which are lightweight mutexes. Busy forms of waiting are useful in some cases but often they are wasteful. I felt the lack of true spinlocks in older Windows (being forced to target XP or even 2K sucked big time) when I was doing user-mode hardware management, but I don't want to use a system where there are only spinlocks.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Every press article I have read about Windows 11 (mainly by people who can't spell 'PC' but want to jump on the bandwagon) has gone on about TPM and centralised taskbars, but none have said what versions of W11 there will be. So, my question is ... will there be a W11 Home and a W11 Pro or just a single W11 generic version?
I have just bought a new PC (prev one is too old for latest W10 updates) with W10 Home on it and I have had an Amazon 'based on your recent views ...' message for a cheap W10 Pro license. So if W11 is likely to be a free upgrade from W10 and has a W11 Pro variant, it would probably be best to upgrade my new PC to W10 Pro to get W11 Pro when it comes out. If there isn't a W11 Pro, then it would be best to stick with W10 Home (no risky upgrade, no charge for new license) and get the generic W11 instead.
Also, I don't get the need for TPM. I cannot imagine a thief is going to take the effort to dismantle a PC just to steal the drive knowing it would be unreadable, when it would be quicker and easier to steal the whole PC which has the bonus that the drive remains readable.
|
|
|
|
|
jsc42 wrote: Also, I don't get the need for TPM. I cannot imagine a thief is going to take the effort to dismantle a PC just to steal the drive knowing it would be unreadable Too often POS and bank workstation drives are dumped without any physical destruction of the contents, exposing tons of potentially sensible data. Also corporate espionage is a thing, especially when outsourcing and consultancy are widely used.
jsc42 wrote: will there be a W11 Home and a W11 Pro or just a single W11 generic version? I ing hope they ditch the versioning for the OS, it creates the worst compatibility issues with no reason at all.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Versions?
Versions=$
You can't join a system with Home version to a domain. Businesses need domains.
So, to do away with versions, they can make the new version the price of the Pro version or they can make it the price of Home. Hmm, what to do with the Workstation version?
Any bets?
I think a bigger question would be about any new licensing for running in a VM.
>64
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
Yes, but also businesses have usually discounted and bulk prices (small business most often than not don't have domains at all anyway and use the Home edition), and maintaining more versions has a higher cost thant maintaining one.
I can understand a Server version, but Home and Pro should be unified.
I still have nightmares with the horrible Win7 version hell: Starter, Basic, Home, Pro, Ultimate and a couple of others. The compatibility issues I had are the stuff successful horrors are made of.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
|
Dan Neely wrote: Home is making an MS account mandatory, and will prevent any internetless install as a result. WTAF??? They are practically begging to have their vulnerabilities ethically exposed and exploited, purely as a proof of concept.
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I'm still undecided if that, or threatening to block any computers more than about 3 years old from upgrading is the most ing stupid thing they've done.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|