Solved

Multi threading in console?????

Posted on 2001-07-04
5
687 Views
Last Modified: 2012-06-22
Hiya there...
We have an application in DOS and we need to port it to linux console, i have few question about it:
First dose the console support multi threading and tasking???

It is important to us (as you know dos dose not support it and we need this support)

Second: what do i need to run minimal linux (somthing like dose, only the OS files and the libs that ill need)
it should be something about ~1mb of OS files
is it possible????

Thanks for any help.
kishk91
0
Comment
Question by:kishk91
5 Comments
 
LVL 3

Expert Comment

by:interiot
Comment Utility
Yes, and Yes.

A linux console program is no different than a linux GUI program, other than the mechanism for communicating with the user.  Console programs support threads, and multiple console programs can be running at once (for instance, several users can telnet in at once and run different programs).

There are many floppy-sized distributions available.  Check out http://directory.google.com/Top/Computers/Software/Operating_Systems/Linux/Distributions/Tiny/.
0
 
LVL 1

Expert Comment

by:edvinkv
Comment Utility
yes. you will have to write x-window code in motif or other x-widnow libarary.
Off late threading is possible in x-windows.

You can get a tool called sun sparc visual workshop which has all the tools and
libraries to code x-window threads.

and there are many micro kernel linuxes available these days. linux has even
been ported into a watch sized computer. just give a search for micro linux on
google.com

Thanks
Edvin.
0
 
LVL 5

Expert Comment

by:garboua
Comment Utility
sure you could have multithread in console mode.  check out pthread, "man pthread" or check it on the web www.humanfactor.com/pthread.
edvinkv
you don't need x-window to run multi thread application.

check out pocket linux, it should install in 2.5 minutes,
http://www.tux.org/pub/distributions/tinylinux/pocket-linux/
0
 

Author Comment

by:kishk91
Comment Utility
Hi thank you all for your answers..

Today we compile our dos based applicatin in GCC... do you think that ill have problem porting it to linux???
i know that linux has GCC too...

And please forgive me for dumb question.. programming in linux is new to me...

1000's thanks
kishk
0
 
LVL 5

Accepted Solution

by:
garboua earned 200 total points
Comment Utility
your code should be fairly clean from compiler's specific, but if it isn't, you will have to change your makefile anyway, you know directory structures and stuff "c:\some\src" and "/view/dosApp/src/"  as you can see the difference between the two.  
now if you dos code was written long ago, meaning folks did not pay attention to software engineering  standards about code being "portable" and not to use  OS specific functions and stuff.
it should port find, with some work from you side, but it should work okay, specially if it is a dos cosole.
Programming in linux in no difference than any platform, you just have to "wing it" :-), no once you get the hang of it, You will like the OS, and its ability to do what you desire.  the OS behave like its native language C, it would do what you tell it, regardless of what your intention were, so be carefull.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now