机制与策略的分离

机制与策略的分离是一项计算机科学的设计准则,强调机制部分(如操作授权和资源分配)不应规定策略部分,即不应限制如何做出操作授权及资源分配的决策。这一原则不仅适用于安全机制(认证与授权),还广泛应用于资源分配问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

机制与策略的分离

在维基百科上的解释是:

The separation of mechanism and policy[1] is a design principle in computer science. It states that mechanisms (those parts of a system implementation that control the authorization of operations and the allocation of resources) should not dictate (or overly restrict) the policies according to which decisions are made about which operations to authorize, and which resources to allocate.

This is most commonly discussed in the context of security mechanisms (authentication and authorization), but is actually applicable to a much wider range of resource allocation problems (e.g. CPU scheduling, memory allocation, Quality of Service), and the general question of good object abstraction.

翻译如下:(我的理解)

机制与策略的分离是计算机科学中的一个设计准则。它指的是机制(机制是指一个系统实现中可以控制操作授权和资源分配的部分)不可以规定策略,其中根据这些策略可以决定哪个操作可以被授权,以及那些资源可以分配。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值