Sponsored Content
Top Forums Programming how to write application for 32 com port Post 302129632 by amitpansuria on Wednesday 1st of August 2007 12:07:59 AM
Old 08-01-2007
Quote:
Originally Posted by porter
There are three basic options.

1. Write a single application and run 32 copies of it (this is the same way getty works)

2. Write a single-threaded application and use 'select' to determine which port is ready to read or write from.

3. Write a multi-threaded application and use either a thread per port, or two threads per port (one for reading, one for writing).

I would recommend option 1 as it's the easiest to write and test.

Option 2 is a more portable solution than 3 as you can avoid multithreading race conditions and synchronisation issues.
thx very much for replying me.
now in my application ,
data may come simultaneously in any port.
i mean data may come on more than one ports at a time and as soon as data come i m going to extract the packet and send that packet to another
port.
i think option 3 is better for me. but i m confuse here that if i use
two thread per port then there are 32 ports and i need to fire 64 threads.
is it good solution.
some one tell me that if u use 64 threads then your application become hand
please give me correct direction because its very important to make a correct design before writing the code.
Regards,
Amit
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

which port to write my server application?

I want to write a server application that would accept HTTP requests from client. The server would be on a machine that has no connection to the INTERNET. The clients that would be posting their HTTP requests would be doing so through webbrowser .Thus it would be sort of intranet application.... (0 Replies)
Discussion started by: rraajjiibb
0 Replies

2. IP Networking

How can I check what port addresses used the application

Hello Mentors! I am a new here in the furom, i hope somebody can understand my problem. Basically we have an application here called unigraphics and being installed per station and the setup is look like this. 1. installed unigraphics UGNX3 version on every station 2. some are installed in... (1 Reply)
Discussion started by: eykyn17
1 Replies

3. UNIX for Dummies Questions & Answers

What application is using the port

Hello im using sunos im trying to lock down application that taking my port when Im doing "netstat -in | grep 8080" Is gives me the indication that the port is taken but no indication who is taken the port. How can I find out who is taking my port? Thanks allot (7 Replies)
Discussion started by: umen
7 Replies

4. Linux

MQ application port 1414

Hi All, I have two MQ (port) 1414 established (going out) $ netstat -an | grep 1414 tcp 0 0 0.0.0.0:1414 0.0.0.0:* LISTEN tcp 0 0 20.76.1.1:32855 142.8.1.3:1414 ESTABLISHED tcp 0 0... (2 Replies)
Discussion started by: itik
2 Replies

5. Shell Programming and Scripting

command to know the application running of the port

Hi, is there any command to findout that which application is using the particular port. or whether any port is occupied with the specfic process id ? (4 Replies)
Discussion started by: mail2sant
4 Replies

6. Programming

Write own decryption application

Hi , I need some help as I dont know where to start. I need to create a unix decryption application. The information I have been given is this so far: the specification of the encryption process is: NET 2 Cryptography classes. RijndaelManaged encryption algorithm ... (13 Replies)
Discussion started by: caciing_help
13 Replies

7. Programming

unable to send read and write serial port

hey frns pls help me out !! i hav a code of c that i have to include in my project. i am using a device (geomeda) that has unix based OS. it also support SIM card for connecting to server . I need to send SMS to user from this device.. below code is not working .. i am unable to send sms and the... (7 Replies)
Discussion started by: yashwantkumar
7 Replies

8. HP-UX

how to check remote server port listening from application.

Hi, I have an application running on HP-UX, from this application I need to findout if the port number. lets say 7890,7891, 7892 are listening on the remote server running on HP-UX. Is there any way of doing it using "system()" function or any other? I noticed that nmap, netcat are not... (0 Replies)
Discussion started by: einsteinBrain
0 Replies

9. UNIX for Advanced & Expert Users

How to write if condition in shell script for application server?

Hi all, I have a code to create folder in application server through shell script and i want to create if conditional based folder folder=$HOME/test/sample/whatever if ; then echo "$folder already exists, not created." else mkdir -p "$folder" > /dev/null 2>&1 ... (7 Replies)
Discussion started by: Boost
7 Replies

10. Shell Programming and Scripting

Help Generate new port base on the last port but not in used by other application

Hi Expert, Anybody can figure it out on how to generate new port base on my last port let say my last port var1=124 and increment for new port 125,126 but this new two ports need to look at first if this port is not in used by any service, if the port is in used add 1 to new port and if in used... (6 Replies)
Discussion started by: lxdorney
6 Replies
CZ(4)							   BSD Kernel Interfaces Manual 						     CZ(4)

NAME
cz -- Cyclades-Z series multi-port serial adapter device driver SYNOPSIS
cz* at pci? dev ? function ? DESCRIPTION
The cz device driver supports the Cyclades-Z series of multi-port serial adapters. The Cyclades-Z is an intelligent serial controller com- prising: o PLX9060ES PCI bus interface o Xilinx XC5204 FPGA o IDT R3052 MIPS CPU The MIPS CPU runs firmware provided by the device driver. Communication with the MIPS is performed by modifying data structures located in board local RAM or host RAM. The Cyclades-Z comes in three basic flavors: o Cyclades-8Zo rev. 1 -- This is an older 8-port board with no FPGA. The serial ports are provided by an octopus cable. o Cyclades-8Zo rev. 2 -- This is the newer 8-port board. The serial ports are provided by an octopus cable. o Cyclades-Ze -- This is the expandable version of the Cyclades-Z. It uses an HD-50 SCSI cable to connect the board to a 1U rack mountable serial expansion box. Each box has 16 RJ45 serial ports, and up to 4 boxes may be chained together, for a total of 64 ports. Boxes 3 and 4 require their own external power supply, otherwise the firmware will refuse to start (as it cannot communi- cate with the UARTs in those boxes). The Cyclades-Z has several features to improve performance under high serial I/O load: o The board may operate in interrupt-driven mode or polled mode to reduce interrupt load. o Each channel has a large input and output buffer. o Each channel may be programmed to generate an interrupt based on reception of a specific character, e.g. a PPP End-Of-Frame charac- ter. o The MIPS CPU on the board performs all flow-control handling. FILES
/dev/ttyCZnnnn -- dial-in (normal) TTY device /dev/dtyCZnnnn -- dial-out TTY device SEE ALSO
pci(4), termios(4), tty(4) HISTORY
The cz driver first appeared in NetBSD 1.5. AUTHORS
The cz driver was written by Jason R. Thorpe <thorpej@zembu.com> and Bill Studenmund <wrstuden@zembu.com> of Zembu Labs, Inc. BUGS
The cz driver does not currently implement communication via host RAM. While this may improve performance by reducing the number of PCI mem- ory space read/write cycles, it is not straightforward to implement with the current bus_dma(9) API. Interrupt mode has not been tested. There is no support for reading or writing the EEPROM connected to the PLX PCI bus controller. BSD
May 17, 2000 BSD
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy