LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2024, 03:56 AM   #1
How_To_Linux
LQ Newbie
 
Registered: Mar 2024
Posts: 25

Rep: Reputation: 0
what is the difference between a computer task and an input output task?


hey quick question,

what is the difference between a computer task and an input output task?

https://en.wikipedia.org/wiki/Task_(computing)

is there any difference at all?

thank you
 
Old 04-12-2024, 04:46 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
would be nice to define what do they mean at all? What is a computer task and what is an input output task?
 
Old 04-12-2024, 06:15 AM   #3
How_To_Linux
LQ Newbie
 
Registered: Mar 2024
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
would be nice to define what do they mean at all? What is a computer task and what is an input output task?
i asked chatgpt and it just gives me it's usual word salad


In the context of computing or programming, a "task" typically refers to a unit of work that needs to be completed by a computer program or system. This could encompass a wide range of activities, such as processing data, performing calculations, handling user interactions, or executing specific instructions.

On the other hand, an "input-output task" specifically refers to tasks that involve taking input from some source (such as a user, a file, or another system), processing that input in some way, and then producing output. Input-output tasks are fundamental in many areas of computing, especially in applications where interaction with users or external systems is involved.

So, while all input-output tasks are tasks, not all tasks necessarily involve input and output operations. The distinction lies in the focus on input and output specifically in input-output tasks.










I/O (Input/Output) refers to the interaction of a computer or computer program with the system's disk and network. Examples of I/O activities include reading/writing data from/to disk, performing HTTP requests, and interacting with databases. These activities are slower compared to accessing RAM or performing computations on the CPU.


















what is an example of a task that isn't an i/o task?
ChatGPT
Certainly! Here's an example of a task that isn't an I/O task:

Computational Task: Suppose you have a program that calculates the factorial of a given number. When a user inputs a number, the program performs a series of mathematical operations (multiplications) to compute the factorial. This process involves pure computation without any input/output operations. The task here is purely computational, as it involves performing mathematical operations on data in memory without interacting with external sources such as files or networks.











what is an example of an i/o task?
ChatGPT
An example of an I/O task is reading data from a file. Here's how it might work:

Suppose you have a program that needs to read a list of names from a text file. The I/O task involves opening the file, reading its contents, and then storing the data in memory for further processing.
 
Old 04-12-2024, 07:16 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Obviously all the word salads of any chatgpt are identical, means nothing, but looks like something useful.
I don't think we really want to discuss the capabilities of a chatgpt.

But what are you looking for?
 
Old 04-12-2024, 07:51 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
Units of work can be compute-bound or I/O-bound. This reflects how long each one will take to complete. One is compute-intensive and is limited by the speed of the microprocessor. The other spends most of its time waiting for I/O, and is limited by the speed of devices.
 
Old 04-12-2024, 08:47 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Might be easier if you used those in a sentence.

This is the first time I’ve ever heard the phrase “input output task”.

Last edited by dugan; 04-12-2024 at 08:51 AM.
 
Old 04-13-2024, 12:37 AM   #7
How_To_Linux
LQ Newbie
 
Registered: Mar 2024
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
But what are you looking for?

a definition on the difference between a computer task and an I/O task
 
Old 04-13-2024, 12:41 AM   #8
How_To_Linux
LQ Newbie
 
Registered: Mar 2024
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sundialsvcs View Post
Units of work can be compute-bound or I/O-bound. This reflects how long each one will take to complete. One is compute-intensive and is limited by the speed of the microprocessor. The other spends most of its time waiting for I/O, and is limited by the speed of devices.
ok so basically a there are two types of tasks a computer can do,

1: a computer task involving only the processor

2: a computer task involving the processor and another device, and that is called an I/O task

and example of a task that just the processor itself can do is mathematical equations, so if you open a calculator on your computer and have it do math, that is the computer doing a "task"

but if you start asking the computer to read a file, or access a cd rom, or a mouse or a keyboard, that is an I/O task because the processor needs to take information from a device (the input) and then process that information, then send that information somewhere else (the output)

and so that is the difference between a task and an I/O task right?
 
Old 04-15-2024, 12:23 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
based on your definition the difference is that a computer task does not do i/o operation.
But that's completely wrong, that's not how a CPU or a computer works.
In short, in general:
For a CPU (or a task?) the world is just an area containing some kind of data - called RAM and contains all the instructions and the variables to work with. Nothing more.
Some part of the RAM is somehow mapped to "other" devices, like tape, disk, screen, network, whatever, when the CPU tries to access those addresses it will actually use that given device (read or write).

There is no task which does not do any i/o operation, that is just pointless. It should read some input data from somewhere to work with and should put the result to somewhere (screen, disk, keyboard, ....). Not to speak about the fact that you need to use i/o to start that task itself, because it is located on a storage, not in the ram initially.
From this point of view the answer is: 1. the simple task does not exist.
 
Old 04-15-2024, 02:52 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
Every now and then, someone comes up with a "truly compute-bound task." For instance, contributing to the calculation of the final digits of "pi," or performing some astronomical calculation. Some enterprising individuals have even incorporated such things into screen savers.

It is "nice" to run a compute-bound process using a command such as nice, which automatically assigns it a lower dispatch priority. This encourages the operating system to "run this task whenever it doesn't have anything better to do." (Which is actually, "almost always.") The compute-bound task really doesn't care, and it "nicely" doesn't want to get in the way of its I/O-bound brethren: unlike the others, it can afford to wait.

However, the kernel "scheduler" is also pretty smart in recognizing the characteristics of each running thread or process, and it will generally subdivide them in this manner regardless of user priority assignments.

Last edited by sundialsvcs; 04-15-2024 at 02:54 PM.
 
Old 04-16-2024, 12:35 PM   #11
murugesandins
Member
 
Registered: Apr 2024
Location: Bangalore Karnataka India
Distribution: CYGWIN_NT
Posts: 46

Rep: Reputation: 0
My reply MAY be out of scope.
I am describing the communication between computer and customer communications.
Code:
Example for computer task:
           I am taking example of a server program listening at port number 80 or 443(secure)
           I have opened an MIS account at post office on 01-Jan-2024
           Each month the program transferring the interest of that MIS amount to my savings account on 1st day of each month.
           Assume that you have opened one MIS account on 31-Jan-2024
           Each month the server program(handling database and security) depositing the interest at the end of each month
           (29th on Feb, 31st on Mar, 30th on Apr...)
Example for an input output task
           I am taking the passbook print after login daily at post office internet banking acccount using https.
           you are going to post office and taking passbook print out using printer which is indirectory taking data from server to printer.

Last edited by murugesandins; 04-16-2024 at 12:36 PM.
 
Old 04-17-2024, 01:42 AM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It's hard to understand your phraseology, but it sounds (to me) like you talking about the difference between a task handled by a computer, and one handled manually (mostly) by a human being. ( ? )

The original qn did sound a lot like asking the difference between an compute-bound task and a task involving I/O to eg disk etc.
Both of these are (ofc) a 'computer' task.
 
Old 04-17-2024, 02:59 AM   #13
___
Member
 
Registered: Apr 2023
Posts: 140
Blog Entries: 1

Rep: Reputation: Disabled
My simplification: There are 4 types of CPU instructions (wiki): move, compute, branch, I/O.

Sidenote: Interrupts (when I/O completes) allow the CPU to continue while I/O (devices<>memory) is happening.

In 1980 Basic language: 1 input x; 2 if x <= 0, goto 1; 3 y = x+1; 4 ... (print or loop etc)

web-research how to write a tiny program in python or bash, to demonstrate this to yourself.

htop

p.s. bash: while true;do ((++i));done # ++i is optional, to actually compute vs. just branch. &top # q fg ^c # or : as null cmds

Last edited by ___; 04-20-2024 at 02:27 AM.
 
Old 04-19-2024, 07:10 AM   #14
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
The simplest compute-bound task, in BASIC, would be: 10 GOTO 10.

But a more-realistic example would be, say, "CGI frame-rendering." This task requires large blocks of very-intensive calculation, such that a CPU which is twice as fast will complete the job in about half the time. (The time required to read or write the completed frames is, in this case, irrelevant.) This is also the reason why modern CPUs have "heat sinks!" (And, why I cannot do certain forms of rendering on my heat-intolerant laptop.)

Most of the things that we do with computers involve only a trivial amount of "computing." Most of the time, they are waiting for an I/O operation to complete. Then, they do just enough "computing" to prepare the next I/O operation, and they wait again. A computer system can efficiently support a large number of these tasks, if the I/O subsystem is "beefy" enough. (Or, if the tasks are using a network.) Your "heat-intolerant laptop" can do this sort of thing all day, "no sweat."

This is the justification for, for example, the "last digits of pi screen-saver." It literally gives your CPU "something to do in the meantime."
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Write a shell script that receives a word, an input file and an output file. The scripts copies all the lines in the input file that contain mandy2112 Linux - Newbie 3 08-18-2016 10:11 AM
[SOLVED] stty: standard input: Input/output error [bash] DoME69 Programming 7 05-22-2015 12:14 AM
Mouse going back and forth between /dev/input/event3 and /dev/input/event4 Linux.tar.gz Linux - Hardware 2 03-05-2011 04:46 PM
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
Repeated "input: AT Translated Set 2 keyboard as /class/input/input" messages AcerKev Mandriva 2 09-16-2007 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration