Questions tagged [synchronization]
Synchronization refers to using controls to maintain a coherent representation, either a group of processes running the same program (process synchronization), or representations of data (data synchronization).
12,481
questions
0
votes
0
answers
9
views
Process Synchronization and failure of Peterson's Method
Peterson's solution may fail in modern architectures due to a features introduced known as reordering. It just means if two instructions are independent then the processor can execute
them in any ...
0
votes
0
answers
6
views
dynamic Appointment scheduler
I have two sheets called "Scheduler" and "2018".
My dynamic date is in m3 of Scheduler and I want to type appointment descriptions in m4:m40 and sync the information on 2018 in ...
0
votes
1
answer
81
views
Is std::shared_ptr assignment atomic? [duplicate]
In the context of C++ shared pointers, imagine two threads, t1 and t2, both engaged in assigning values to a shared pointer (s1). If t1 assigns the value 2, and in close succession, t2 endeavors to ...
-2
votes
0
answers
8
views
Implementing Centralized Updates in a Multi-Client Web Environment with PHP and SQL, Inspired by WordPress
Hello Stack Overflow community,
I hope this message finds you well. I'm currently facing a challenge with database synchronization in my project and could use some expert advice to find a proper ...
2
votes
0
answers
27
views
Synchronizing strings between threads with mutexes
I'm doing an exercise for an exam, which asks me to create 2 processes (parent and child), each one must create N threads (N is provided by user) and a file (also the filename is provided by user). ...
-2
votes
0
answers
17
views
How to solve synchronisation/race condition problems using zookeeper in spring boot Application?
Facing multiple synchronization/race condition issue in my company spring boot microservice project that runs on multiple instances and I got to know that zookeeper solved race condition problems but ...
0
votes
0
answers
40
views
How do you easily sync up lyrics to a song audio file?
I have this song: more specifically, Last Name by Carrie Underwood. I have the audio of the song and the lyrics for it, but what is the best possible way to get the timestamps of when each lyric is ...
0
votes
0
answers
4
views
Openthread network synchronisation
I'm in the process of setting up an OpenThread network of 20 nodes that need to be synchronised to within 200us for sophisticated power measurements. I'm using the EFR32xG24 Explorer Kit for this ...
0
votes
0
answers
25
views
Exclude an entire OU when GCDS does a sync
In Google Cloud Directory Sync Config-Manager, I am trying to exclude the Schools that are not of particular interest by doing the following regex pattern under Org-Units-->Exclusion Rules
OU=...
0
votes
0
answers
42
views
scala cats, deal with race condition
i'm lookning for solution to eleminate race condition in my code.
Basically i have a write and read functions. These functions are called in a stream, of values.
Stream itself is going through ...
0
votes
1
answer
39
views
ObjectOutputStream stops working without error message
I am currently working on a video transmission program involving a client sender, a server receiver, and multiple client receivers. The sender sends video frames every 75ms to the server, which then ...
-1
votes
1
answer
31
views
Is optimization to move block inside both the block of a if-else branch correct?
Warning(Pseudocode)
Suppose we have a kernel :
def kernel(array):
a = get_global_id(0)
if a > 1:
array[0] = 10
barrier(LOCAL_MEM_FENCE)
Is it wrong for the code to get optimized ...
0
votes
2
answers
87
views
How to wait in main thread for subthreads to be complete and vice versa?
In C++, I had an update function that would iterate through an array of cubes, applying physics, then draw:
Update()
{
for each cube in cubes:
{
DoPhysics(cube)
}
Draw()
}
I ...
0
votes
0
answers
42
views
Process/Processor Synchronization without special instructions
My understanding is mutex in multi-core systems basically depend on being able to do an atomic compare + update operation. This consists of simultaneously checking the value of a flag and updating it ...
0
votes
1
answer
34
views
ajax await async:false Difference
First of all, I am not good at English, so please understand if my writing is weird.
We found two ways when converting from ajax asynchronous calls to synchronization.
async: false
await
It shows ...
1
vote
1
answer
33
views
Java use synchronized and volatile when manipulating multiple properties and locking on a lock object
I need to manipulate multiple properties in Java while keeping them in sync.
Is this code correct (from my understanding this is):
class X {
private final Object lockObject = new Object();
...
-2
votes
0
answers
65
views
Multi-threading with odd numbers
I'm practicing using multi-threading in Java using a command line, but I've been stuck for a while. Here is what I have so far:
public class MultithreadPractice {
// Shared counters for criteria ...
1
vote
0
answers
72
views
Is it safe to synchronize access to non-Sync data using only a separate atomic variable?
Suppose I write my own mutex class, containing data of some arbitrary type T and an AtomicBool with which I intend to synchronize access to the data:
struct MyMutex<T> {
in_use: AtomicBool,
...
1
vote
1
answer
44
views
How to read multiple files in parallel
I would like to read multiple files in parallel, but I get a deadlock.
package main
import (
"bufio"
"os"
"strings"
)
func main() {
var dirname = "....
0
votes
1
answer
35
views
Clickhouse cluster replicas sync completion time issue
I'm trying to remove about 50 milliong of 40 billions rows table (one specific day based on event_date column) , I'm using lightweight delete with "where" clause and "where" has no ...
0
votes
1
answer
51
views
useState() function not updating values and useEffect() alternative not working
I'm having a problem with the useState hook, which is whenever I call the setSate, it doesn't change the value of the state. This porblem I'm getting it in a custom SearchBar I created, where, ...
0
votes
0
answers
26
views
Why doesn't Mongo Replica Node sync compeletly?
I had 3 node mongodb replicaSet cluster (V=6.0.5), One of nodes crashed, now I have a rs with 2 members,
and i'm trying to join 3rd node. My data size is around 3TB on each node (2TB collection data,...
0
votes
1
answer
26
views
Unison: fatal error failure reading from the standard input
When calling a unison command from crontab it produces this error: "Fatal error: failure reading from the standard input (End of file)". Example crontab line:
*/5 * * * * USER test -e /var/...
0
votes
1
answer
29
views
Not able understand tryLock method while executing program
I was learning Java concurrency and trying ReentrantLock class methods. While trying tryLock() method and running sample program, it's not working as it should. By definition if lock is available, ...
-2
votes
2
answers
63
views
Synchronization in Java: Threads Created but Not Executed Synchronously? [closed]
I have a Java code snippet that involves creating multiple threads to execute a method, but I'm having trouble understanding the synchronization aspect of it. Here's the code:
public class ...
0
votes
0
answers
13
views
Process Synchronization and Atomic Instructions
According to the book " Operating Systems Concepts ", ninth edition , page 210, we have the following statement :
Many modern computer systems therefore provide special hardware
...
0
votes
0
answers
9
views
sync tabular model from single server to the two different servers at same time
I have one SSAS tabular model on one server and want to sync the same to more than one server at same time will it impact any thing on the speed or performance.
currently the tabular model is getting ...
2
votes
1
answer
55
views
Flutter, implement a method within a certain time
How can I implement a method within a certain time, if the time is out, cancel the method
for example,
if I have a method that may take 5 seconds to be implemented completely, and I want it to be ...
0
votes
0
answers
115
views
SwiftData relationships
Second attempt for this question, hopefully this one will be a little clearer than the first one.
I am designing an offline-first app that needs to download and keep a set of data locally on the ...
0
votes
0
answers
29
views
How do i fix, bad object refs/remotes/origin/master?
git pull --tags origin master
fatal: bad object refs/remotes/origin/master
please help me fix, i've trying to commit been trying to commit ans sync my changes
commit and sync, after working on few ...
0
votes
0
answers
15
views
PhpStorm + Git + 3 VPS + many files sync
I have a project in PhpStorm. I have 3 VPS running (one for remote dev, one for local dev, another for production).
There are over 30K files in a project it take hours to sync, mostly PHP hangs. So, ...
0
votes
1
answer
118
views
Sync Excel and GoogleSheet
I have a script to sync an excel file with a google sheet:
It works fine, but when I run it and the sheetname(s) already exist, then I get an error.
How can I fix this: Override or delete al existing ...
0
votes
0
answers
49
views
Real-Time Synchronization Issue in Microsoft Teams Tab App - Issue with Live Share SDK
I'm working on a Microsoft Teams Tab App using the 'Teams Toolkit' extension in Visual Studio Code. The app functions as a questionnaire that allows the meeting organizer to share questions, answer ...
0
votes
2
answers
45
views
How to solve a sync problme with several fetch?
I am doing several fecth.
let var1 = []
let var2 = []
await dateArray?.map((day) => {
for (const o of myFirstList) {
for (const d of mySecondList) {
const resp = fetch(url-...
1
vote
1
answer
26
views
MySQL trigger after update with composite primary key is failing
I want to save changes into my remote table for synchronization with an Android application.
The table with the data is defined as:
CREATE TABLE `lh_psalm_join` (
`groupFK` int(11) NOT NULL,
`...
0
votes
1
answer
44
views
How to remove SQL Server transaction replication errors without restarting the full process. we have around 1 billion
We have setup transaction replication on around 40 tables. Which works fine for small tables except the large ones.
We have around 1 billion rows in a table and the replication takes a lot of time. ...
0
votes
0
answers
23
views
What options do I have in 2023 to sync my React application with the backend with minimum code?
I need to build a backend + frontend application with three layers:
Database layer where I store users, their projects and project-related items
API layer with CRUD methods used by frontend ...
0
votes
1
answer
28
views
UPPAAL - force transition with synchro doesn't work
Totally stuck on it.
Basically, I have heater, temp sensor and process that simulates rise of temperature.
I want heater to transite to "disabled" state when temp is above some value. It can ...
0
votes
1
answer
88
views
How to manage thread synchronization in C++ for threads which need access to two different resources from a pool of resources
This program simulates multiple threads accessing different resources.
I have a pool of resources, in my case an array of bools : bool res[6] = {1, 1, 1, 1, 1, 1};
I also have 6 different threads that ...
0
votes
1
answer
26
views
I want to upload my current VS Code settings to sync, without inheriting old settings
How can I ensure that my current Visual Studio Code settings are uploaded to synchronization without retaining any previous configurations? Additionally, I would like to know how to delete the old ...
0
votes
1
answer
54
views
sync.Cond not woking properly with multiple goroutines
I am trying to print in multiple go routines only when sync.Cond does Broadcasts but the go routines are deadlocking. Is there any way the below code can be improved and are there any ways to identify ...
0
votes
0
answers
11
views
Logging different results in javascript [duplicate]
I am debugging some code in my React application and something has caught my attention.
When I log a value (that I am editing), the overall view of the log says: false. When I open the object in the ...
0
votes
2
answers
66
views
C++ Synchronization across processes
I have an exe written in C++ whose code has an if/else loop. If loop checks for files from a directory and if its empty, it generates the files in that directory. Else loop (if there are files in ...
0
votes
0
answers
37
views
How to Sync Data in New Column with Filtered Data From Another Sheet
https://docs.google.com/spreadsheets/d/1hbQu0HmG_S_P-G8-e0XTDrKrKNg46P0_zEEPRL9738g/edit#gid=0
Hi, above link is my sample of google sheet. In sheet "MASTER LIST" I have all of item list ...
0
votes
0
answers
19
views
named eventwaithandle autoreset even not work in Task.Run but works with thread
In c# I create use a EventWaitHandle to create a named autorest event the is initially not signaled.
If the EventWaithandle instance is used thread method handler called by using task.Run the WaitOne ...
-1
votes
1
answer
69
views
How to detect which client pressed a button first on a webpage?
Context
I'm trying to create a trivia website that can detect which user pressed a button first; my idea is that the first user who clicks the button gets to answer the trivia question. I don't really ...
0
votes
0
answers
26
views
Can pipenv sync --dev only install the package version specified in [dev-packages]?
I have the numpy package specified in my Pipfile as follows:
[packages]
numpy = "==1.19.5"
[dev-packages]
numpy = "*"
I'd like pipenv sync --dev to only install the package ...
0
votes
1
answer
43
views
How to track BackBlaze pre-signed file upload references consistently in postgresql
I have encountered a problem when storing files to BackBlaze using pre-signed URLs and tracking the uploaded file references in PostgreSQL. The primary issue I faced is that BackBlaze doesn't have ...
1
vote
1
answer
39
views
Is there a Vulkan command equivalent to the synchronization guarantees from separate commandbuffers in the same queue submit?
I have a Vulkan backend for my renderer that uses multiple command buffers -- some for uploads, one per raster pass, one per compute pass, etc.
I'd like to take more advantage of Vulkan's ...
0
votes
0
answers
20
views
Add values of an array comming from a form in a pivot table
my database is
a teacher has many classes for a number of hours and a class has mant teachers for a number oh hours.
my pivot table looks like
class_id, teacher_id , nbHours
I don't know how to insert ...