Solved

Multi threading in console?????

Posted on 2001-07-04
5
704 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Expert Comment

by:interiot
ID: 6253197
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
ID: 6254457
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
ID: 6255733
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
ID: 6262578
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
ID: 6262615
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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