maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Design (https://talk.maemo.org/forumdisplay.php?f=46)
-   -   [Request] - CLOSE ALL TASKS for N900 (https://talk.maemo.org/showthread.php?t=81855)

immi.shk 2012-01-25 05:46

[Request] - CLOSE ALL TASKS for N900
 
i have noticed sometimes it becomes very difficult to work with N900 even when 5 or 6 applications are working in Parallel... N900 almost freezes sometimes but never Hangs... :)
at that time "End Current Task" in Power Button Menu comes handy but it only ends one task at a time plus i dont know if it ends it smoothly or not(i mean in case microB is downloading a file.. does it stops microb from writing it to disc & then ends it)..

also it feels that N900 ram doesn't gets free after we end all the tasks manually... in windows i used a few commands to clean clipbord after all my multimedia work to Refresh RAM & get a faster PC...


my request is...
is it possible to add a "CLOSE ALL TASKS" command next to "End Current Task" in Power Button Menu... which also Doubles as "Refresh Ram" when all the tasks are Closed
... :)
it would be a really helpful addition to N900 performance

i hope someone might make it possible... :)

regards
immi.shk

droll 2012-01-25 06:02

Re: [Request] - CLOSE ALL TASKS for N900
 
i would make a slight improvement to the suggestion:

1. something that takes a snapshot of all the running tasks (only tasks that show up in the task manager) that the user launched.
2. then user selects something called
a) flush tasks - this removes everything running that is *not* in the snapshot.
b) end all - this removes everything running.

as for refreshing ram, there are better strategies to do this. i suggest we leave this out and put this as a separate script that runs at a scheduled time (say 4am??).

just some suggestions :)

panjgoori 2012-01-25 06:02

Re: [Request] - CLOSE ALL TASKS for N900
 
yeah it will be quite useful. lets wait who will come up with it.

immi.shk 2012-01-25 06:44

Re: [Request] - CLOSE ALL TASKS for N900
 
Quote:

Originally Posted by droll (Post 1155319)
i would make a slight improvement to the suggestion:

1. something that takes a snapshot of all the running tasks (only tasks that show up in the task manager) that the user launched.
2. then user selects something called
a) flush tasks - this removes everything running that is *not* in the snapshot.
b) end all - this removes everything running.

as for refreshing ram, there are better strategies to do this. i suggest we leave this out and put this as a separate script that runs at a scheduled time (say 4am??).

just some suggestions :)


your suggestions are really good.. giving right direction to thread.. & you are right Ram Refresh should be a separate script.... :)

immi.shk 2012-01-25 06:57

Re: [Request] - CLOSE ALL TASKS for N900
 
Quote:

Originally Posted by panjgoori (Post 1155320)
yeah it will be quite useful. lets wait who will come up with it.

thanks for the support... i hope someone might comeup with a better working model then our Expectation... :)

nicholes 2012-01-25 07:26

Re: [Request] - CLOSE ALL TASKS for N900
 
Nice idea!

if i would know how to do this i had starting work on it:)

sulu 2012-01-25 08:19

Re: [Request] - CLOSE ALL TASKS for N900
 
Get tasks started by user:
Code:

ps ux
End task gracefully:
Code:

kill PID
(PID is the process number you get from the ps command)

Kill task:
Code:

kill -9 PID
Clear RAM:
Code:

sync && echo 3 > /proc/sys/vm/drop_caches
(Not very useful though. Unlike under Windows free RAM isn't seen as a good thing in Linux environments. The Linux kernel's assumption is that free RAM is wasted RAM, therefore it will fill the RAM up with cached data ASAP. Frequently clearing the RAM also potentially decreases the lifetime of your eMMC because everything that is not cached data won't be deleted but moved to swap.)

reinob 2012-01-25 08:34

Re: [Request] - CLOSE ALL TASKS for N900
 
Quote:

Originally Posted by immi.shk (Post 1155318)
my request is...
is it possible to add a "CLOSE ALL TASKS" command next to "End Current Task" in Power Button Menu... which also Doubles as "Refresh Ram" when all the tasks are Closed
... :)
it would be a really helpful addition to N900 performance

Define "all tasks". Killing every single process will make your N900 reboot. So now take your time to make a list of processes that should not be killed. Then you can easily write a script to kill all pids not in your list (plus the name to pid mapping).

Plus leave the RAM management to the kernel. He knows it better than you.

reinob 2012-01-25 08:37

Re: [Request] - CLOSE ALL TASKS for N900
 
Quote:

Originally Posted by sulu (Post 1155352)
Get tasks started by user:
Code:

ps ux
End task gracefully:
Code:

kill PID
(PID is the process number you get from the ps command)

Kill task:
Code:

kill -9 PID

You're not using busybox are you? The only supported option is "-w" (wide output). That's also the case with busybox-power.

(try comparing the output of "ps", "ps ux" and "ps abcde" :).

sulu 2012-01-25 09:05

Re: [Request] - CLOSE ALL TASKS for N900
 
Quote:

Originally Posted by reinob (Post 1155363)
You're not using busybox are you?

No, I'm using bash. The commands I posted work on bash, dash, csh and tcsh and I didn't even think about it that busybox might not support such basic things. :o


All times are GMT. The time now is 11:28.

vBulletin® Version 3.8.8