473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

running multiple threads and multiple processes at the same time

Hi,

I currently trying to implement a simulation banking system as part of an
assigment. I must stress i do not want line by line code to complete this,
what i'm really after is a guide to how i would go about doing this.

I need to read a customer from the file customer_list, into a fifo queue,
every Ts time. (where Ts is expressed in seconds).

Whilst this is happening i also need to have 3 tellers, who when a customer
enters the queues, a free teller grabs the customers and processes there
request, which takes Ts time. (as before). If no customer, teller sleeps.

From thinking about this, I have come up what i believe is the best way to
go.

I think i should create one process that runs the customerInsert() routine,
and then three processes one for each teller ( running the Teller() routine)

Now, the problem that i have is i have never coded in C before. I am quite
well versed in Java, however. Therefore my first question is whats the best
way to start coding this? and secondly, how do i code this ?? Is there C
API DOCS like Java has ??

Thanks in advance,

Matt
Nov 14 '05 #1
1 1778
On Tue, 18 May 2004 00:04:25 +0800, "Smegly" <sm****@eftel.net.au>
wrote:
I think i should create one process that runs the customerInsert() routine,
and then three processes one for each teller ( running the Teller() routine)
What for? I'll just do a big loop, each loop is 1 unit of time
(depending on what your question requires). Every loop I do...

Wait, this is very /Off Topic/ here. Try comp.programming or some
newsgroups concerned with algorithms.
Now, the problem that i have is i have never coded in C before. I am quite
well versed in Java, however. Therefore my first question is whats the best
way to start coding this? and secondly, how do i code this ?? Is there C
API DOCS like Java has ??


You want threads and stuff, you must look at your platform specific
newsgroups. Standard portable C (which this newsgroup is concerned)
has no API per se, if you mean it the way Java does (drawing buttons,
widgets and all that stuff). Check the C compiler you are using. There
should be some docs.
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
5
by: Jeremy | last post by:
I have a core VB service that monitors a database, and based on data in the records will execute code to send email notifications. Problem: I don't want my main program code to halt and wait for...
4
by: Gregory Gadow | last post by:
I've cobbled together a PrinterClass that takes a text file and dumps it to a printer. The app using is has multiple threads, all of which need access to a shared instance. Can someone point me to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.