Sponsored Content
Full Discussion: process vs task
Top Forums UNIX for Dummies Questions & Answers process vs task Post 302078552 by Hitori on Sunday 2nd of July 2006 02:18:38 PM
Old 07-02-2006
Multitasking means concurrent execution of programs. A task can be a process or a thread, depending on the operating system
(if you want to learn this question more deeply read Maurice J. Bach, The Design of the Unix Operating System)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

difference between task and process

Hi, what is the difference between a task and a process. what is the difference between multitasking , multiprogrammnig and multiprocessing? Thanks in advance (6 Replies)
Discussion started by: ramyar
6 Replies

2. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies

3. Shell Programming and Scripting

Parse an XML task list to create each task.xml file

I have an task definition listing xml file that contains a list of tasks such as <TASKLIST <TASK definition="Completion date" id="Taskname1" Some other <CODE name="Code12" <Parameter pname="Dog" input="5.6" units="feet" etc /Parameter> <Parameter... (3 Replies)
Discussion started by: MissI
3 Replies

4. Programming

Help with task daemon

believe it or not but this is my first c program (i've worked with java, C#, php though) I am trying to make a daemon that checks if mplayer is running(it's for a projection room) and if it is not then to run mplayer with a file.. So far it's not working and I don't know why Help and comments... (5 Replies)
Discussion started by: james2432
5 Replies

5. Shell Programming and Scripting

Challenging task : script for mailing process completion timing report to users.

Hi all, This is my first post. I am new to unix scripting. My requirement is as follows : We are using a financial backoffice application. Now at the end of day we have send users a status report stating all timings of EOD processes for all countries. I need timings for following... (0 Replies)
Discussion started by: ammbhhar
0 Replies

6. Shell Programming and Scripting

task

Hi all, I'm newbie and stuck here. Thanks for any help. Input(txt file) a b X c d Y e f Z g h W Requested output: a b X Y c d Y X e f Z W g h W Z Please use code tags when posting data and code samples! (10 Replies)
Discussion started by: hernand
10 Replies

7. Shell Programming and Scripting

Task

Hi experts, I have a problem with the below shell task: I need to modify the file creatin a paired row , per each row which matches filter (e.g. number of nonempty columns = 5) Output should look like this: second row is original one from the input, first row(red) is pairing row, it's... (29 Replies)
Discussion started by: hernand
29 Replies

8. Shell Programming and Scripting

Parallelize a task that have for

Dear all, I'm a newbie in programming and I would like to know if it is possible to parallelize the script: for l in {1..1000} do cut -f$l quase2 |tr "\n" "," |sed 's/$/\ /g' |sed '/^$/d' >a_$l.t done I tried: for l in {1..1000} do cut -f$l quase2 |tr "\n" "," |sed 's/$/\ /g' |sed... (7 Replies)
Discussion started by: valente
7 Replies

9. Shell Programming and Scripting

Can Anyone help me..to do my task in simple way..

Hi... I am trying extract data using 2 files.. 1. Data file - DATA.TXT containing data to be extracted 2. Column file - LIST.TXT header column to be extracted output not coming properly.. if the header field name matches with data file header extract data...this actually I wanted ... ... (7 Replies)
Discussion started by: nex_asp
7 Replies

10. Shell Programming and Scripting

Automate a task

Dear All, I am relatively new to UNIX and wanted to accomplish a simple task which should be automated. That's why I need your help. I shall briefly describe what I want. Basically, there is a process (X) (related to a particular software which I am using in my system) which automatically... (5 Replies)
Discussion started by: Samiran Dam
5 Replies
os(3erl)						     Erlang Module Definition							  os(3erl)

NAME
os - Operating System Specific Functions DESCRIPTION
The functions in this module are operating system specific. Careless use of these functions will result in programs that will only run on a specific platform. On the other hand, with careful use these functions can be of help in enabling a program to run on most platforms. EXPORTS
cmd(Command) -> string() Types Command = string() | atom() Executes Command in a command shell of the target OS, captures the standard output of the command and returns this result as a string. This function is a replacement of the previous unix:cmd/1 ; on a Unix platform they are equivalent. Examples: LsOut = os:cmd("ls"), % on unix platform DirOut = os:cmd("dir"), % on Win32 platform Note that in some cases, standard output of a command when called from another program (for example, os:cmd/1 ) may differ, compared to the standard output of the command when called directly from an OS command shell. find_executable(Name) -> Filename | false find_executable(Name, Path) -> Filename | false Types Name = string() Path = string() Filename = string() These two functions look up an executable program given its name and a search path, in the same way as the underlying operating sys- tem. find_executable/1 uses the current execution path (that is, the environment variable PATH on Unix and Windows). Path , if given, should conform to the syntax of execution paths on the operating system. The absolute filename of the executable program Name is returned, or false if the program was not found. getenv() -> [string()] Returns a list of all environment variables. Each environment variable is given as a single string on the format "VarName=Value" , where VarName is the name of the variable and Value its value. getenv(VarName) -> Value | false Types VarName = string() Value = string() Returns the Value of the environment variable VarName , or false if the environment variable is undefined. getpid() -> Value Types Value = string() Returns the process identifier of the current Erlang emulator in the format most commonly used by the operating system environment. Value is returned as a string containing the (usually) numerical identifier for a process. On Unix, this is typically the return value of the getpid() system call. On VxWorks, Value contains the task id (decimal notation) of the Erlang task. On Windows, the process id as returned by the GetCurrentProcessId() system call is used. putenv(VarName, Value) -> true Types VarName = string() Value = string() Sets a new Value for the environment variable VarName . timestamp() -> {MegaSecs, Secs, MicroSecs} Types MegaSecs = Secs = MicroSecs = int() Returns a tuple in the same format as erlang:now/0 . The difference is that this function returns what the operating system thinks (a.k.a. the wall clock time) without any attempts at time correction. The result of two different calls to this function is not guaranteed to be different. The most obvious use for this function is logging. The tuple can be used together with the function calendar:now_to_universal_time/1 or calendar:now_to_local_time/1 to get calendar time. Using the calendar time together with the MicroSecs part of the return tuple from this function allows you to log timestamps in high resolution and consistent with the time in the rest of the operating system. Example of code formatting a string in the format "DD Mon YYYY HH:MM:SS.mmmmmm", where DD is the day of month, Mon is the textual month name, YYYY is the year, HH:MM:SS is the time and mmmmmm is the microseconds in six positions: -module(print_time). -export([format_utc_timestamp/0]). format_utc_timestamp() -> TS = {_,_,Micro} = os:timestamp(), {{Year,Month,Day},{Hour,Minute,Second}} = calendar:now_to_universal_time(TS), Mstr = element(Month,{"Jan","Feb","Mar","Apr","May","Jun","Jul", "Aug","Sep","Oct","Nov","Dec"}), io_lib:format("~2w ~s ~4w ~2w:~2..0w:~2..0w.~6..0w", [Day,Mstr,Year,Hour,Minute,Second,Micro]). The module above could be used in the following way: 1> io:format("~s~n",[print_time:format_utc_timestamp()]). 29 Apr 2009 9:55:30.051711 type() -> {Osfamily, Osname} | Osfamily Types Osfamily = win32 | unix | vxworks Osname = atom() Returns the Osfamily and, in some cases, Osname of the current operating system. On Unix, Osname will have same value as uname -s returns, but in lower case. For example, on Solaris 1 and 2, it will be sunos . In Windows, Osname will be either nt (on Windows NT), or windows (on Windows 95). On VxWorks the OS family alone is returned, that is vxworks . Note: Think twice before using this function. Use the filename module if you want to inspect or build file names in a portable way. Avoid match- ing on the Osname atom. version() -> {Major, Minor, Release} | VersionString Types Major = Minor = Release = integer() VersionString = string() Returns the operating system version. On most systems, this function returns a tuple, but a string will be returned instead if the system has versions which cannot be expressed as three numbers. Note: Think twice before using this function. If you still need to use it, always call os:type() first. Ericsson AB kernel 2.14.3 os(3erl)
All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy