freebsd open source kernel - open-source

I am beginner. I want install freebsd on VM and test open source world! I want to write a small function and to put it into kernel of OS, and then I want to use it in another program as a system function.
I just installed freebsd11 on VM. I know a command line environment! I should use a GUI? Where is kernel?

FreeBSD is a wonderful beast once you know all its capabilities, if you want to play with jails, ZFS and build your own kernels, probably this already build image can be a good starting point:
https://fabrik.red/post/test/ more info can be found here including scripts about how to create your own images/jails (custom kernel): https://github.com/fabrik-red/images
There is no GUI on the images, and maybe you will never need one, unless you want to use FreeBSD as a desktop, but FreeBSD shines more on headless systems (no GUI).
Update:
For GUI probably you can give a try to trueos.org or you can install your own Xorg, desk environments

Sounds like you should learn a bit more about what the operating system does before trying to modify the kernel. There are lots of resources about the unix kernels. See the developers handbook, https://www.freebsd.org/doc/en/books/developers-handbook/ or just google and you will find many resources.

Related

Running another MSI through visual studio installer

I want to install MySQL installer msi with my setup.(MySQL installer has to install silently. I am using batch file in custom action to do this.)
However, the problem is that MySQL's msi cannot be run from within main setup.msi it gives out 1618 error(Another installation needs to be completed.) I would like to know an easy way around this.
Background info: MySQL installer unpacks the manifest which contains MySQLInstallerConsole.exe it is then called through another cmd command to install MySQL.
So all I am looking to do is to execute MySQL installer so that it unpacks the manifest. Later I would call the MySQLInstallerConsole.exe to install MySQL through custom action.
Just to mention even more possibilities- some my colleagues mentioned (VS bootstrapper, burn):
Just start writing a batch or script for calling the two MSIs after each other.
Always a good starting point maybe, if you have no experience with MSI.
Write your own mini setup.exe bootstrapper with 5 lines of code to do the above.
(To be more concrete in "Third party tools":) Buy InstallShield or Advanced Installer or InstallAware, this are the tools with ready GUIs to do such easy bootstrapping.
I would recommend the second out of them. Starting another MSI are only two clicks. Similar with the other. But there are BIG differences between the three, especially InstallAware is special.
! Mentioned "mini bootstrappers" of those tools are not as powerful as Burn or the others followed:
Buy the ready setup suite SetupFactory which can be used as a bootstrapper for MSIs.
Use the InstallShield "Suite" project type, if you buy the Premium Edition of InstallShield. Costs big bucks, but has a friendly user interface. I was successful using it before some years, but I had to work around a handful of bugs as always with IS (but I guess you will discover bugs with most tools. Way it is.)
There (again) Burn would come in handy, you could fix potential bugs or behaviours on your own here ...
Only it could take you more time in the beginning.
... Of course there may be more.
There isn't an easy work around. Windows Installer enforces a 1 installation at a time rule through the use of a mutex. You need to create a bootstrapper / chainer to serialize the installation of your packages. Visual Studio Deployment Projects don't support this. I'd suggest looking at Windows Installer XML (WiX) and it's Burn boostrapper / chainer engine.
The documentation is a bit sparse, but in the Visual Studio world the customized bootstrap is the Bootstrap Manifest Generator. The docs start here:
https://msdn.microsoft.com/en-us/library/ms165429.aspx
and there is an old article here:
https://msdn.microsoft.com/en-us/magazine/cc163899.aspx
but it's not clear how much info and support is available since setup projects were removed from setup projects and then restored.

Python3: How do I get a warning that server memory is running out?

I'm writing a program that manages data entered by users. I plan to open a test version to the public and have no idea how many users there may be.
I want my program to test when memory is getting low so that I know when to buy more server space and so that I can automatically restrict data entry when necessary. What's a good way to detect memory shortage? Allocate garbage space temporarily to get the exception? Is there a better way?
This may be best accomplished outside of your application using a performance monitoring tool. Windows Server can be configured to do this for you; see this question. There are other tools out there that help you monitor your servers, and I advise you to use an existing system unless you absolutely have to do this with Python.
If you must absolutely do this using Python, then have a look at the psutil library:
psutil (python system and process utilities) is a cross-platform
library for retrieving information on running processes and system
utilization (CPU, memory, disks, network) in Python. It is useful
mainly for system monitoring, profiling and limiting process resources
and management of running processes. It implements many
functionalities offered by command line tools such as: ps, top, lsof,
netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop,
uptime, pidof, tty, taskset, pmap. It currently supports Linux,
Windows, OSX, FreeBSD and Sun Solaris, both 32-bit and 64-bit
architectures, with Python versions from 2.4 to 3.4. Pypi is also
known to work.
You may combine this with the email package to send the alerts.

Is it possible to write code for gnome and then build it to windows?

I want to write a database program and have it built for a windows machine at work. Is that possible to do without much grinding? (so to speak)
Yes, that should be possible. There's a project to bring GTK+ to windows.
You may need this installer if you happen to run a GTK+-based
application and need GTK+ runtime environment to run it. Note that
this installer does not include any development libraries or headers.
If you want to develop/compile GTK+ applications for Win32, download
the dev packages from Tor Lillqvist's pages (see the Links section).
Note, however, that user experience usually deteriorates, the more cross-platform you are.
Use a cross-platform language like:
Python
Java
.Net (Mono)
Or, if you prefer C++, use the Boost libraries: http://www.boost.org/
From the website:
Boost works on almost any modern operating system, including UNIX and
Windows variants. Follow the Getting Started Guide to download and
install Boost. Popular Linux and Unix distributions such as Fedora,
Debian, and NetBSD include pre-built Boost packages. Boost may also
already be available on your organization's internal web server.
Additionally to SimpleCoder's remarks: If it is a program with an UI, make sure that you use an UI toolkit that also is cross-platform or design it in a way that you can use different UI toolkits with the same business layer (a good pattern would be the MVC Pattern).

GPGPU CUDA debug server

I have access to a server machine, with 3 CUDA enabled GPUs in it, and I would like to use NVidia Parallel Nsight, to remotly debug on the machine.
This works just find.
Now, is it possibble, to start another debug session (possibbly by another developer), on the same machine, but on another GPGPU?
Is it possibble, to do this, if I use gdb on linux?
Thanks,
krisy
Krisy, yes this is possible.
However this case/scenario that you mentioned has not been actively tested internally by the Nsight team yet. I tried this our real quick on a system with a similar setup as the one you mentioned and I was able to debug 2 different instances of CUDA app simulataneously (provided each app runs on a different unique device that is not connected to any output display).
The stability of this is not guaranteed. From what I've tried so far, this worked for me and it should work in theory as well but there were instances where I experienced sluggish behavior on my system.
For other developers who are interested to know more about this, please take a look at: http://forums.nvidia.com/index.php?showtopic=201211

GPU device emulator

I am new to learning CUDA and I was looking around for a good emulator to run my CUDA programs on, since my laptop does not come with a Graphics card.
I have heard of mcuda and gpuocelot but they seem to have terrible and confusing documentation. I have been trying to get them installed for a few hours now but with very little progress.
Does any one know of a decent GPU emulator with good documentation. I am using Ubuntu 10.10
operating system
Thank you,
Gaurish
nvcc has an option to turn on the emulation mode and will run the entire application on your CPU. You don't need to have a CUDA enabled GPU for this, of course.
nvcc -deviceemu my_first_app.cu
I tried for GPUocelot on ubuntu 12.04.
its time consuming job we have to download some folders from "http://gpuocelot.googlecode.com/svn/trunk/ "I hope it will work after downloading these folders using svn.
here is link where you can find all steps to install gpuocelot
http://barefeg.wordpress.com/2012/06/16/how-to-install-gpuocelot-in-ubuntu-12-04