I've often heard the mantra of "separating policy from mechanism", especially in the context of the Unix philosopy. What does this mean and what are some concrete examples of it? When/why is/isn't it a good thing?
Decoupling the mechanism implementations from the policy specifications makes it possible for different applications to use the same mechanism implementations with different policies. This means that those mechanisms are likely to better meet the needs of a wider range of users, for a longer period of time.
Policies are ways to choose which activities to perform. Mechanisms are the implementations that enforce policies, and often depend to some extent on the hardware on which the operating system runs. For instance, a processes may be granted resources using the first come, first serve policy.
Mechanisms determine how something will be done and policies determine what will be done. Policies are changed over time and place to place. Separation of mechanism and policy is important for the flexibility of the system.
Solution(By Examveda Team)Two level implementation is used in operating system to separate mechanism from policy. It uses two different schedulers, one lower-level scheduler which can only select among those processes in memory to run.
It is basically the separation of requirements or business function from technical implementation. The mechanism is the technical implementation. The implementation allows and supports the ability for the business to implement its business policy.
Example: A security mechanism may be set up allow for users to be attached to groups and for users and groups to be attached to permissible actions. The policy specifies who is in the groups and which groups and users will be allowed to perform which actions. It may specify who is allowed to assign users and actions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With