http://weltall.heliohost.org/wordpress/2011/05/14/running-vmware-workstation-player-on-linux-2-6-39-updated/


PDATE5: As it seems many are using still the 7.1.x series of vmware. As vmware didn’t update the kernel sources in there but only for 8.0.0 (I wonder why… maybe marketing reasons), as some have pointed out in the comments, in order to make these patches work you just need to change the version of vmware stated in the patch script to 7.1.5 instead of 7.1.4. Same goes for the player from 3.1.4 to 3.1.5.

UPDATE4: A fix for guest kernel modules is available here

UPDATE3: It seems the patchv3 had a little bug, which prevented, at least,  building on linux 3.0.0-rc1, I’ve replaced the file so if you’ve downloaded the archive before you’ve seen this update please get it again (even more if you had issues with it)

UPDATE2: I’ve added the script which was frequently used for vmware patches in the past (had also to fix it in order to make it handle vmblock) and I’ve also updated the patch to pass the correct variable to kern_path function. vmware2.6.39patchv3.tar

This is an update to the previous post fixing some issues with the patch in the vmblock module (so it doesn’t crash anymore and it initializes properly) and should support building also on previous kernels.

Even though VMware updated their packages to support up to 2.6.38 kernel series the support for linux is still quite lacking as they forgot entirely to support 2.6.39 which was just released.

So, as it seems no one bothered yet according to google and vmware community, in order to overcome this problem I had to put my hands at sources in order to make the modules build and run under this new version of the kernel. So little by little I’ve removed many of remaining things needing the BLK or which used wrongly SPINLOCK defines (we are talking of defines which were discouraged use since some years according to kernel documentation floating around).

The process was quite successful and I could run the VM well.

Attached Files:

  • patch vmware patch for linux 2.6.39 (v2)

    Perfectly working patch for vmware in order to use it with the linux 2.6.39 kernel

  • vmware2.6.39patchv3.tar

    This patch fixes vmware products module kernels in order to run on linux 2.6.39. Changelog from the second patch: -fixed a wrong varriable being passed to kern_path -added a script based on Artem S. Tashkinov's work (it needed to be fixed in order to patch also vmblock)


'' 카테고리의 다른 글

VMWARE workstation 7.1.4 patch for kerenel 3.1  (0) 2013.06.28
NX Client 속도 향상  (0) 2013.04.27
[명령어] 특정유저 프로세스 강제 종료 명령어  (0) 2013.04.08
NX 단축키  (0) 2013.04.05
Eclipse 속도 향상 팁  (0) 2013.03.06
Posted by 라판
TAG vmware

screen

툴/일반 2013.06.14 16:08


http://aperiodic.net/screen/quick_reference

- 스크린에 대한 짤막한 레퍼런스 

screen Quick Reference

Getting in

start a new screen session with session namescreen -S <name>
list running sessions/screensscreen -ls
attach to a running sessionscreen -r
… to session with namescreen -r <name>
the “ultimate attach”screen -dRR (Attaches to a screen session. If the session is attached elsewhere, detaches that other display. If no session exists, creates one. If multiple sessions exist, uses the first one.)
detach a running sessionscreen -d <name>

Escape key

All screen commands are prefixed by an escape key, by default C-a (that's Control-a, sometimes written ^a). To send a literal C-a to the programs in screen, use C-a a.

Getting out

detachC-a d
detach and logout (quick exit)C-a D D
exit screen“C-a : quit” or exit all of the programs in screen.
force-exit screenC-a C-\ (not recommended)

Help

See helpC-a ? (lists keybindings)

The man page is the complete reference, but it's very long.

Window Management

create new windowC-a c
change to last-visited active windowC-a C-a (commonly used to flip-flop between two windows)
change to window by numberC-a <number> (only for windows 0 to 9)
change to window by number or nameC-a ' <number or title>
change to next window in listC-a n or C-a <space>
change to previous window in listC-a p or C-a <backspace>
see window listC-a " (allows you to select a window to change to)
show window barC-a w (if you don't have window bar)
close current windowClose all applications in the current window (including shell)
kill current windowC-a k (not recommended)
kill all windowsC-a \ (not recommended)
rename current windowC-a A

Split screen

split display horizontallyC-a S
split display verticallyC-a | or C-a V (for the vanilla vertical screen patch)
jump to next display regionC-a tab
remove current regionC-a X
remove all regions but the current oneC-a Q

Scripting

send a command to a named sessionscreen -S <name> -X <command>
create a new window and run ping example.comscreen -S <name> -X screen ping example.com
stuff characters into the input buffer
using bash to expand a newline character
(from here )
screen -S <name> [-p <page>] -X stuff $'quit\r'
a full example
# run bash within screen
screen -AmdS bash_shell bash
# run top within that bash session
screen -S bash_shell -p 0 -X stuff $'top\r'
 
# ... some time later
 
# stuff 'q' to tell top to quit
screen -S bash_shell -X stuff 'q'
# stuff 'exit\n' to exit bash session
screen -S bash_shell -X stuff $'exit\r'

Misc

redraw windowC-a C-l
enter copy modeC-a [ or C-a <esc> (also used for viewing scrollback buffer)
pasteC-a ]
monitor window for activityC-a M
monitor window for silenceC-a _
enter digraph (for producing non-ASCII characters)C-a C-v
lock (password protect) displayC-a x
enter screen commandC-a :
quick_reference.txt · Last modified: 2013/05/31 16:24 by 216.46.98.249 · Currently locked by: 15.195.185



' > 일반' 카테고리의 다른 글

screen  (0) 2013.06.14
Launchy  (0) 2013.04.11
FreeNX : VNC을 대신할 RemoteDesktop (번외 eclipse 속도 tip)  (0) 2012.11.08
tightvnc에서 텍스트 복사/붙여놓기  (0) 2012.11.02
Posted by 라판
TAG screen


http://www.alexonlinux.com/pthread-spinlocks


Continuing my previous post, I would like to talk about relatively new feature in glibc and pthreads in particular. I am talking about spinlocks.

Quiet often you want to protect some simple data structures from simultaneous access by two or more threads. As in my previous post, this can even be a simple integer. Using mutexes and semaphores (critical sections if you wish) to protect simple integer is an overkill and here’s why.

Modifying or reading value of a single integer requires quiet often as few as two or three CPU instructions. On the other hand, acquiring semaphore is a huge operation. It involves at least one system call translated into thousands of CPU instructions. Same when releasing the semaphore.

Things are a little better with mutexes, but still far from being perfect. Posix mutexes in Linux implemented using futexes. Futex stands for Fast-Usermode-muTEX. The idea behind futex is not to do system call when locking unlocked futex. Waiting for locked futex would still require system call because this is how processes wait for something in Linux. Yet locking unlocked futex can be done without asking kernel to do things for you. Therefore, locking futex is, at least in some cases, is very fast.

The problem is that in rest of the cases mutex in Linux is slow as semaphore. And as with semaphores, spending thousands of CPU cycles just to protect a single integer is definitely an overkill.

This is exactly the problem spinlocks solve. Spinlock is another synchronization mechanism. It works in the same manner as mutexes. I.e. only one thread can have it locked at the same time. However there’s a difference.

When thread tries to lock locked spinlock, it won’t sleep waiting for the spinlock to get unlocked. It will do busy wait, i.e. spinning in a while loop. This is why its calledspinlock.

Locking spinlock takes only tens of CPU cycles. One important thing with spinlocks is to hold it for short period of time. Don’t be surprised when your program will begin consuming too much CPU, all because one of your threads holds some spinlock for too long. To avoid this, try to avoid executing big chunks of code while holding a spinlock. And by all means avoid doing I/O while holding spinlock.

Now for the easy part.

First, to make things work, you have to include pthread.h. pthread_spin_init() initializes the spinlock. pthread_spin_lock() locks one and pthread_spin_unlock() unlocks it. All as with pthread mutexes. And there are manual pages for each and every one of them of course.


'프로그래밍언어' 카테고리의 다른 글

Spinlock에 대한 좋은 글과 반론들  (0) 2013.06.14
C/C++ reference counting with atomic variables and gcc  (0) 2013.06.14
쉘 프로그래밍  (0) 2013.05.27
JAVA GC에 대한 좋은 글들  (0) 2013.05.02
mutable  (0) 2013.03.26
__attribute__ (packed) : 구조체 정렬  (0) 2013.03.20
Posted by 라판