1. A device comprising an operating system to run processes and a middleware layer operable to launch applications, wherein an application launched by the middleware layer is run using one or more processes in the operating system, the operating system having a user layer and a kernel wherein the processes run in the user layer of the operating system and interact with other processes running in the user layer through the kernel, the interaction being in response to calls to the kernel made by the processes, the device further comprising: one or more policy files defining policies for interaction of processes with the kernel of the device; and a monitor configured to monitor interaction of a process with the kernel to link or associate defined policies to the process, and to read code defined in the policy file or files linked or associated to the process.