Operating System
operatingsystem简介
操作系统(英语:Operating System,简称OS)是管理和控制计算机硬件与软件资源的计算机程序,是直接运行在“裸机”上的最基本的系统软件,任何其他软件都必须在操作系统的支持下才能运行操作系统是管理计算机硬件资源,控制其他程序运行并为用户提供交互操作界面的系统软件的集合。
操作系统是计算机系统的关键组成部分,负责管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本任务操作系统的种类相当多,各种设备安装的操作系统可从简单到复杂,可分为智能卡操作系统、实时操作系统、传感器节点操作系统、嵌入式操作系统、个人计算机操作系统、多处理器操作系统、网络操作系统和大型机操作系统。
[1]按应用领域划分主要有三种:桌面操作系统、服务器操作系统和嵌入式操作系统。
一、桌面操作系统桌面操作系统主要用于个人计算机上。
个人计算机市场从硬件架构上来说主要分为两大阵营,PC机与Mac机,从软件上可主要分为两大类,分别为类Unix操作系统和Windows操作系统:1.Unix和类Unix操作系统:Mac OS X,Linux发行版(如Debian,Ubuntu,Linux Mint,openSUSE,Fedora等);2.微软公司Windows操作系统[2]:Windows 98,Windows XP,Windows Vista,Windows 7,Windows 8,Windows 8.1等。
二、服务器操作系统服务器操作系统一般指的是安装在大型计算机上的操作系统,比如Web服务器、应用服务器和数据库服务器等。
服务器操作系统主要集中在三大类:1.Unix系列:SUNSolaris,IBM-AIX,HP-UX,FreeBSD,OS X Server[3]等;2.Linux系列:Red Hat Linux,CentOS,Debian,Ubuntu Server等;3.Windows系列:Windows NT Server,Windows Server 2003,Windows Server2008,Windows Server 2008 R2等。
操作系统OperatingSystem
操作系统OperatingSystem 在当今数字化的时代,操作系统(Operating System)是计算机系统中最为关键的组成部分之一。
它就像是一位默默工作的幕后英雄,管理着计算机的各种资源,为用户和应用程序提供了一个稳定、高效和友好的运行环境。
那么,究竟什么是操作系统呢?简单来说,操作系统是一种管理计算机硬件与软件资源的程序,它负责控制计算机的运行,协调各个硬件设备之间的工作,同时为用户和应用程序提供服务。
想象一下,如果计算机没有操作系统,就好比一辆没有司机的汽车,虽然具备强大的动力和各种零部件,但却无法有序、安全地行驶。
操作系统的主要功能可以概括为以下几个方面。
首先是进程管理。
在计算机中,多个程序可能会同时运行,操作系统需要合理地分配CPU 时间给这些程序,确保它们能够有序地执行,不会出现混乱和冲突。
这就好比在一个繁忙的十字路口,交通信号灯合理地指挥着车辆的通行,避免拥堵和事故。
其次是内存管理。
计算机的内存是有限的,而操作系统要负责合理地分配和回收内存空间,确保各个程序都能得到足够的内存来运行。
它就像是一个精明的仓库管理员,清楚地知道每一寸空间的用途,并且能够在需要的时候进行灵活的调配。
文件管理也是操作系统的重要职责之一。
它负责组织和管理计算机中的文件和文件夹,让用户能够方便地存储、查找和访问自己的数据。
无论是照片、文档还是音乐,操作系统都能确保它们被妥善地保存和管理。
设备管理则涉及到对计算机硬件设备的控制和协调。
例如键盘、鼠标、显示器、打印机等,操作系统要为它们提供驱动程序,使其能够正常工作,并在多个设备同时请求服务时进行合理的调度。
除了上述的基本功能,操作系统还提供了用户接口。
这包括命令行接口和图形用户接口(GUI)。
命令行接口适合那些熟悉计算机操作的专业人员,通过输入特定的命令来完成各种任务。
而图形用户接口则更加直观和易于使用,通过点击图标、菜单等方式,普通用户也能轻松地操作计算机。
第四章Operating System处理机管理
2. 面向系统的调度性能准则 吞吐量:单位时间内所完成的作业数, 吞吐量:单位时间内所完成的作业数,跟作 业本身特性和调度算法都有关系-- --批处理 业本身特性和调度算法都有关系--批处理 系统 处理机利用率:-- :--大中型主机 处理机利用率:--大中型主机 各种设备的均衡利用: 各种设备的均衡利用:如CPU繁忙的作业和 繁忙的作业和 I/O繁忙(指次数多,每次时间短)的作业搭 繁忙( 繁忙 指次数多,每次时间短) --大中型主机 配--大中型主机 3. 调度算法本身的调度性能准则 易于实现 执行开销小
2. 时间片长度的确定
时间片长度变化的影响
– 过长->退化为 过长- 退化为 退化为FCFS算法,进程在一个时间片内都执行 算法, 算法
完,响应时间长。 响应时间长。 – 过短->用户的一次请求需要多个时间片才能处理完,上 过短- 用户的一次请求需要多个时间片才能处理完 用户的一次请求需要多个时间片才能处理完, 下文切换次数增加,响应时间长。 下文切换次数增加,响应时间长。
4.2.4.3 线性优先级调度算法 Robin) (SRR, Selfish Round Robin)
统吞吐量
低级调度也称微观调度,从处理机资源分配的角度来看, 低级调度也称微观调度,从处理机资源分配的角度来看, 处理机需要经常选择就绪进程或线程进入运行状态, 处理机需要经常选择就绪进程或线程进入运行状态,低级 调度的时间尺度通常是毫秒级的。 调度的时间尺度通常是毫秒级的。由于低级调度算法的频 繁使用,要求在实现时做到高效 繁使用,
4.2.4.1 静态优先级
创建进程时就确定,直到进程终止前都不改变。通常 创建进程时就确定,直到进程终止前都不改变。 是一个整数。 是一个整数。
operatingsystem
operatingsystemOperating System: A Comprehensive OverviewIntroductionAn operating system is a crucial software component that manages computer hardware and software resources, allowing users and other software programs to interact with the computer system. In this document, we will explore the essential aspects of operating systems, including their definition, functions, types, and examples. Furthermore, we will delve into the key components and features of an operating system, shedding light on its significant role in managing computer systems efficiently.Definition of an Operating SystemAn operating system (OS) can be defined as a software program that acts as an intermediary between the user and computer hardware. It provides an interface for users to interact with computer resources such as the Central Processing Unit (CPU), memory, storage, and input/output devices. Additionally, the OS ensures the execution of software programs by managing system resources effectively.Functions of an Operating SystemThe primary functions of an operating system can be categorized into the following:1. Process management: The OS manages and allocates system resources, including CPU time, memory, andinput/output devices, to different processes running concurrently. It ensures fair distribution of resources and prevents processes from interfering with each other.2. Memory management: The OS manages the system's memory, allocating and deallocating memory space to different processes as needed. It keeps track of available memory and prevents processes from exceeding their allocated memory limits.3. File system management: An operating system manages the storage and retrieval of files on secondary storage devices, such as hard disks. It provides a hierarchical structure for organizing files and ensures secure and efficient data access.4. Device management: The OS manages input/output devices such as keyboards, monitors, printers, and networkdevices. It facilitates communication between the user or applications and these devices.Types of Operating SystemsOperating systems can be broadly classified into the following categories:1. Batch operating systems: These operating systems are designed to execute a series of jobs in batch mode, without any user interaction. They process jobs one after another, optimizing resource utilization and overall system efficiency.2. Time-sharing operating systems: Time-sharing operating systems allow multiple users to simultaneously access and utilize the system resources. These systems divide the CPU time into small time intervals, enabling each user to perform tasks efficiently.3. Real-time operating systems: Real-time operating systems are used in applications that require precise and predictable system response times. They are commonly used in critical systems like aerospace, medical devices, and industrial control systems.4. Network operating systems: Network operating systems are designed for managing and coordinating multiple computers within a network. They provide mechanisms for file sharing, resource sharing, and communication between computers.Features of an Operating SystemSome prominent features of an operating system include:1. Multiuser support: Operating systems allow multiple users to access and utilize the system resources simultaneously, ensuring efficient resource allocation.2. Multitasking: Operating systems support running multiple tasks (processes/programs) concurrently, allowing users to switch between different applications seamlessly.3. Virtual memory: Operating systems provide virtual memory management, allowing the execution of processes that are larger than the available physical memory.Operating System ExamplesHere are a few examples of popular operating systems:1. Microsoft Windows: Windows is a family of operating systems developed by Microsoft Corporation. It is widely used in personal computers, laptops, and servers.2. macOS: macOS is the operating system used in Apple's Macintosh computers, providing a user-friendly interface and a range of software tools.3. Linux: Linux is an open-source operating system that is widely used in servers, embedded systems, and mobile devices. It offers high flexibility and customizability.4. Android: Android is a mobile operating system developed by Google. It is primarily used in smartphones and tablets, providing a rich user experience and a wide range of applications.ConclusionOperating systems are an integral part of computer systems, providing a crucial interface between users and hardware resources. They enable efficient resource management, process execution, and data storage. Understanding the fundamental concepts and functions of operating systems isessential for both users and software developers, as it helps optimize system performance and achieve desired results.。
第三章Operating_System进程管理
作业的概念主要用于批处理操作系统;而进程 的概念几乎用于所有的多道系统中。
5. 进程的组成
程序:描述进程要完成的功能。 数据:程序执行时需要的数据。 进程控制块(PCB):存储有关进程的
各种信息,操作系统根据它来控制和管 理进程。
6 进程控制块 (PCB, process control block)
进程控制信息:
– 当前状态; – 优先级(priority); – 代码执行入口地址; – 程序的外存地址; – 运行统计信息(执行时间、页面调度); – 进程间同步和通信信息;阻塞原因
资源管理信息:虚拟地址空间的现状、打开文件列 表
CPU现场保护结构:寄存器值(通用、程序计数器 PC、状态PSW)
进程与程序的组成不同:进程的组成包括程序、数据和 进程控制块(即进程状态信息)。
进程具有并发特征(独立性和异步性) ;而程序没有。 进程与程序的对应关系:通过多次执行,一个程序可对
应多个进程;通过调用关系,一个进程可包括多个程序。
4.作业与进程的区别
作业是用户向计算机提交任务的实体,被提交 后进入外存的作业等待队列。而进程是完成用 户任务的执行实体,被创建后,总有相应部分 常驻内存;
分配处理机资源;
2. 转换
进程创建(Enter):系统创建进程,形成 PCB,分配所需资源,排入暂停进程表 (可为一个队列);
调度运行(Dispatch):从暂停进程表中选 择一个进程(要求已完成I/O操作),进入 运行状态;
暂停运行(Pause):用完时间片或启动I/O 操作后,放弃处理机,进入暂停进程表;
顺序执行的特征
– 顺序性:按照程序结构所指定的次序(可能有分支或循环)
名词解释 操作系统
名词解释操作系统
操作系统(英语:Operating System,缩写:OS)是一组主管并控制计算机操作、运用和运行硬件、软件资源和提供公共服务来组织用户交互的相互关联的系统软件程序。
根据运行的环境,操作系统可以分为桌面操作系统,手机操作系统,服务器操作系统,嵌入式操作系统等。
操作系统是人与计算机之间的接口,也是计算机的灵魂。
在计算机中,操作系统是其最基本也是最为重要的基础性系统软件。
从计算机用户的角度来说,计算机操作系统体现为其提供的各项服务;从程序员的角度来说,其主要是指用户登录的界面或者接口;如果从设计人员的角度来说,就是指各式各样模块和单元之间的联系。
事实上,全新操作系统的设计和改良的关键工作就是对体系结构的设计,经过几十年以来的发展,计算机操作系统已经由一开始的简单控制循环体发展成为较为复杂的分布式操作系统,再加上计算机用户需求的愈发多样化,计算机操作系统已经成为既复杂而又庞大的计算机软件系统之一。
operating system名词解释(一)
operating system名词解释(一)操作系统(Operating System)操作系统是计算机硬件和软件之间的中间层,它负责管理计算机的资源,并为其他应用提供服务,如文件管理、进程调度和内存管理等。
下面是一些与操作系统相关的名词及其解释。
1. 内核(Kernel)操作系统的内核是操作系统的核心部分,它负责管理计算机的硬件资源,并提供最基本的功能。
内核控制硬件设备的访问、调度进程和分配内存等。
例如,Linux操作系统的内核是由Linus Torvalds开发的,它是开源的,被广泛用于各种设备上。
2. 进程(Process)进程是计算机中正在运行的程序的实例。
每个进程都有自己的内存空间和执行环境,可以独立地运行和管理资源。
操作系统负责调度进程,并为它们分配所需的资源。
例如,当你打开一个应用程序时,操作系统将创建一个新的进程来运行该应用程序。
3. 线程(Thread)线程是进程中的执行单元。
一个进程可以包含多个线程,它们共享相同的内存空间和其他资源。
线程可以并发地执行任务,提高程序的性能和响应性。
操作系统负责调度线程,并为它们分配处理器时间。
例如,当你在浏览器中同时打开多个标签页时,每个标签页通常都由一个独立的线程来处理。
4. 文件系统(File System)文件系统是操作系统用于管理文件的一种机制。
它提供了对文件的组织、存储和访问的方式。
文件系统可以将文件存储在硬盘、固态硬盘或其他存储介质上。
操作系统负责文件的创建、删除、读取和写入等操作。
例如,Windows操作系统使用NTFS文件系统来管理硬盘上的文件。
5. 虚拟内存(Virtual Memory)虚拟内存是一种将硬盘空间用作扩展内存的技术。
它使得操作系统可以将部分数据存储在硬盘上,以释放主存(RAM)中的空间。
当程序需要访问被换出到硬盘上的数据时,操作系统会将其重新加载到主存中。
虚拟内存可以提高系统的性能和稳定性。
例如,Mac操作系统使用虚拟内存来管理系统的内存资源。
计算机专业英语教程课件-Unit 11 (Operating System)
Later machines came with libraries of software, which would be linked to a user's program to assist in operations such as input and output and generating computer code from human-readable
symbolic code.
后来,机器附带的软件,将是链接到用
户的方案,以协助在产生的操作,如输 入和输出,从人类可读的符号代码生成 计算机代码操作。
This was the genesis of the modern-day operating system. However, machines still
the most widely used version of the Windows family is Windows XP, released
on October 25, 2001.
servers.
几乎在所有的计算机设备上都能找到操作系统, 其中包含从手机和视频游戏机到超级计算机和 Web服务器
In the early 1950s, a computer could execute only one program at a time.
在50年代初,计算机一次只能执行一 个程序。
Each user had sole use of the computer and would arrive at a scheduled time with program and data on punched paper cards and tape.
每个用户有单独使用的电脑,并会到达 一个预定程序和数据在穿孔纸卡片和磁 带。
操作系统 Operating System
在实际的系统中,总是维持一定数量的空闲块,而不是耗尽所 有的空闲块。即空闲块数可以在某一区间浮动,一旦空闲块数 小于下限值,系统就进行页面臵换,以释放出一些空闲块,使 得总的空闲块数不超过系统规定的上限值即可。即系统设臵专 门的独立进程负责页面臵换,以保证链表的适当规模。
2 分配策略
可变分配:是指一个进程所拥有的物理块数是不定的,这种 分配方式称之为可变分配。 固定分配是指为每个进程分配一固定页数的内存空间,在整 个运行期间都不再改变。 ⑴ 平均分配算法,是将系统中所有可供分配的物理块,平均 分配给每一个进程。例如,当系统中有80个空闲块,4个进 程时,每个进程可分得20个物理块。这种平均分配方式因其 未考虑各进程本身的大小,会造成事实上的不公平。如有一 个进程其大小为100页,只分配给它20个块,这样它必将会 有很高的缺页率;而另一个进程只有10页,却有10个块在闲 臵未用。所以在平均的思想下,还要考虑进程的大小。
(3)工作集的应用
工作集W(t,w)是二元函数,随t、w的值而改变。首先工作 集与时间有关,即不同时间的工作集其所包含的页面可能不 同,其所包含的页面个数也可能不同;其次工作集也是工作 集窗口尺寸w的函数,体现在工作集尺寸|W(t,w)|随w的增加 而变大,即满足|W(t,w)|≤|W(t,w+a)|,a>0。 工作集窗口尺寸与缺页率关系密切,若w增大,工作集尺寸 |W|随之增加(即所含的页面数增多),缺页率就会下降。倘 若w含盖了整个作业虚拟空间,缺页率降为0,也就失去了虚 存意义;反之若w选取过小,将引起频繁缺页,导致系统性能 下降。二者之间的关系可以如图所示。
系统总是执行VP虚指针所指向的指令,为了将虚拟地址VP 变换为对应的实存地址,因此先要查找页表。若从页表中查 出此页不在内存(状态位为0),则产生一个缺页中断。此时, 进程暂停当前指令执行,CPU转去执行缺页中断处理程序。 若该页已在内存,则指令的地址映射过程与页式存储是一样 的。即将块号和页内地址相并接形成物理地址IP,处理器再 从IP中取指令执行。
U盘装系统提示operating system not found
1、在你的B
IOS中,第一启动没有设置成硬盘,而是 其他的盘符,部分BIOS会因此启动出错, 手动将第一启动设置为HDD就可以了; 2、你安装系统后,没有
激活主分区,导致无法引导系统。
激活主分区很简单,以PQ为例,选定 要激活的分区,然后选作业(操作)→进 阶(高级)→设为作用即可。注意由于版
完!谢谢观赏,转载请注明出处!
猫先生 /
本的不同文字可能是括号内的,也可能是 括号前的!如果要设定主分区,则:可选: 作业———转换———转换成主要即可! 都说U盘装系统方便,且简单
易学,但是往往会因为用户的一点小疏 忽而导致启动启动失败, 如果用户在用U盘安装系统后重启遇到 相同的问题,可以参考下上述
的两个解决方法。更多精彩内容欢迎 继续访问系统城!
提示operatingsystemnotfound怎么办? 如今很多用户选择使用u盘装系统,因
为这样既方便又Байду номын сангаас速,省去光盘刻录 的麻烦,不过
也不是每一次都那么顺利,安装过程
中有些用户也难免遇到一些问题,比 如用U盘安装完系统重启时,就把U盘 拔了,结果就出现了operatingsys
temnotfound这个提示, operatingsystemnotfound的中文意思是没有 找到可用的系统。
operating system《操作系统》ch02-operating-system structures-42-PPT精选文档
2.8
2.3 System Calls
Programming interface to the services provided by the OS Typically written in a high-level language (C or C++) Mostly accessed by programs via a high-level Application
Varies between Command-Line (CLI), Graphics User Interface
(GUI), Batch
programming interface
Program execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error)
Program Interface (API) rather than direct system call use Three most common APIs are :
操作系统概念OPERATINGSYSTEMCONCEPTSSixthEdition课件
1.8 手持系统(handheld system)
个人数字助理(Personal Digital Assistants, PDAs)
蜂窝电话(Cellular telephones) 存在的问题
内存有限(32M – 64M) 低速处理器(只有个人计算机处理器速度的几
分之一) 屏幕小(5英寸×3英寸)
作业在内存与物理存储器之间来回交换(swap) 允许用户与系统之间的联机通信(交互)
当OS执行完一条命令后,它将接收用户通过键 盘输入的下一条控制指令。
联机系统必须提供给用户访问数据和代码。
10
1.3 桌面系统
PC - 为单个用户服务的计算机系统 I/O设备 - 键盘,鼠标,显示器,打印机等 用户方便性和响应性 可以采用大型操作系统上的技术
在若干个位于不同位置的处理器之间组成分布式计算 松耦合系统 (loosely coupled system) - 每个处理器都有自己
的内存;处理器相互之间通过不同的通信线路进行通信,如高速 总线或电话线 优点 资源共享 计算速度提高 可靠性 通信 需要网络基础结构 局域网(local-area network, LAN) 或 广域网(wide-are network, WAN) 根据节点间的距离来划分 可以是C/S系统或端对端系统
流水线
12
非对称处理(Asymmetric multiprocessing)
每个处理器被赋予一个特定的任务,主处理器为从处理 器调度和安排工作。
类似于超大型系统
对称处理(Symmetric multiprocessing, SMP)
每个处理器都运行同一个操作系统的拷贝,这些拷贝需 要互相通信
15
客户 - 服务器系统的通用结构
operating system《操作系统》ch09-virtual memory-70-PPT精品文档
only modified pages are written to disk
Page replacement completes separation between logical
memory and physical memory – large virtual memory can be provided on a smaller physical memory
Virtual memory can be implemented via:
Demand paging Demand segmentation
9.4
Virtual Memory That is Larger Than Physical Memory
9.5
Virtual-address Space
9.6
Shared Library Using Virtual Memory
9.7
9.2 Demand Paging
Bring a page into memory only when it is needed
Less I/O needed Less memory needed Faster response
= (1 – p x 200 + p x 8,000,000 = 200 + p x 7,999,800
If one access out of 1,000 causes a page fault, then
EAT = 8.2 microseconds. This is a slowdown by a factor of 40!!
Reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5
operating system操作系统-ch04-threads-31
4.4 Threading Issues
Semantics of fork() and exec() system calls Thread cancellation Signal handling Thread pools Thread specific data Scheduler activations
Asynchronous cancellation terminates the target thread immediately Deferred cancellation allows the target thread to periodically check if it should be cancany user-level threads mapped to single kernel thread Examples:
Solaris Green Threads GNU Portable Threads Thread management is done by the thread library in user space, so it is efficient; but the entire process will block if a thread makes a blocking system call. because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multiprocessors.
4.18
Windows XP Threads
Implements the one-to-one mapping Each thread contains
Operating System处理机调度
非抢占短优先调度示例
Process Arrival Time
P1
0.0
7
P2
2.0
4
P3
4.0
1
P4
5.0
4
• SJF (non-preemptive)
Burst Time
P1
P3
P2
P4
0
3
78
12
16
• 平均等待时间 = (0 + 6 + 3 + 7)/4 = 4
优先级调度
• 每个进程都具有优先度 (integer) • 优先级最高的先被执行(数字越小表示优先级越高)
中每个进程获得CPU时间为 1/n. 没有进程等待时间超过 (n-1)q
• 性能
– q large FIFO – q small q must be large with respect to context
switch, otherwise overhead is too high.
示例: RR (时间片为20)
止或它从运行状态转换到等待状态才会释放CPU。
调度员
• 调度模型 gives control of the CPU to the process selected
by the short-term scheduler; this involves: – 上下文切换 – 处理机状态变为User,而以前是Kernel. – 跳转到执行程序的适当位置重新执行此程序。
processor makes its own scheduling decisions.(自调度,实现复 杂)
• Asymmetric multiprocessing(非对称多处理)– only one
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Operating SystemSmart Card LogonWhite PaperAbstractThe Microsoft® Windows® 2000 operating system introduces smart card authentication as an alternative to passwords to achieve strong network authentication. A smart card can be used to authenticate to a Windows 2000 domain in three ways. The first is interactive logon involving Active Directory, the Kerberos version 5 protocol, and public key certificates. The second is remote logon that uses a public key certificate with the Extensible Authentication Protocol (EAP) and Transport Layer Security (TLS) to authenticate a remote user to an account stored in Active Directory. The third is client authentication where a user is authenticated using a public key certificate mapped to an account stored in Active Directory. By integrating public key technologies and smart cards with Windows 2000, Microsoft is helping customers to increase their level of security at a time when the convergence of the enterprise and Web computing models is driving companies to open up their corporate networks to stay competitive.© 1999 Microsoft Corporation. All rights reserved.The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.Microsoft, MSDN, Outlook, Visual Basic, Visual C++, Visual J++, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.Other product or company names mentioned herein may be the trademarks of their respective owners.Microsoft Corporation • One Microsoft Way • Redmond, WA 98052-6399 • USA 0699INTRODUCTION (1)CONTENTSWhat is a Smart Card? 1What is Cryptography? 1Public Key Cryptography 1PUBLIC KEY CONCEPTS (3)What is a Public Key Infrastructure? 3Certificate 3Certification Authority 3Certificate Revocation List 4Certificate Enrollment 4Certificate Stores 5Certificate Chain Validation 5ACTIVE DIRECTORY AND KERBEROS CONCEPTS (7)Kerberos 7PKINIT 7Key Distribution Center 7Active Directory 8Domains, Forests and Trust 8HOW SMART CARD AUTHENTICATION WORKS (9)Interactive Logon 9Logon Request 9Certificate Verification 9Digital Signature Verification 10Account Lookup and TGT 10Offline Logon 11Client Authentication 11Mutual Authentication 11Authorization 12Remote Access 12Local versus Domain Logon 13DEPLOYING SMART CARDS (14)Who Should Use Smart Cards? 14What Policies Are Needed? 15Smart Card Required 15On Smart Card Removal 16Left Card at Home 16Personal Identification Numbers 16How Should Smart Cards Be Issued? 17Smart Card Enrollment Station 17What Hardware Is Available? 18Smart Cards 18Smart Card Readers 18INTEROPERABILITY AND STANDARDS (20)PKIX 20 PKCS 20 TLS 20 Kerberos 20The PC/SC 20ADDITIONAL REFERENCES (21)Resources 21 Documents 21 U.S. Government 21Canadian Government 21For More Information 21Microsoft Windows NT Server Smart Card Logon White Paper 1Smart cards are a key component of the public-key infrastructure (PKI) thatMicrosoft has integrated with the Windows® 2000 operating system. Smart cards enhance software-only solutions such as interactive logon, client authentication, and remote logon. Smart cards provide:• Tamper-resistant storage for protecting private keys and other forms ofpersonal information.• Isolation of security-critical computations involving the private key fromother parts of the system that do not have a “need to know.”• Portability of credentials and other private information between computersat work, home, or on the road.What is a Smart Card?The term smart card has been used to describe a class of credit card-sized devices with varying capabilities: stored-value cards, contact-less cards, and integratedcircuit cards (ICC). All of these cards differ in functionality from each other and from the more familiar magnetic-stripe cards used by standard credit, debit, and ATM cards. It is the ICC that is of most interest to the personal computer, andWindows 2000, because it is able to perform more sophisticated operations such as digital signature and key exchange.A smart card is essentially a miniature computer, embedded in plastic in the form of a credit card, with limited storage and processing capability. The circuitry in a smart card derives power from a smart card reader after the card is inserted into thereader. Data communication between a smart card and an application running on a computer is performed over a half-duplex serial interface managed by the smart card reader and its associated device driver. Smart card readers are available in a variety of form-factors and can be connected to a computer using an RS-232, PCMCIA or USB interface.What is Cryptography?Cryptography is the science of protecting data or messages. Many cryptographic algorithms mathematically combine input plaintext data and an encryption key to generate encrypted data referred to as ciphertext . With a good cryptographic algorithm, it is computationally infeasible to reverse the encryption process and derive the plaintext data from the ciphertext. In order to decrypt the ciphertext some additional data, a decryption key, is needed to perform the transformation.In traditional secret (or symmetric) key cryptography, encryption and decryption keys are identical and must be shared by multiple parties. Parties wishing to communicate with secret-key cryptography must securely exchange theencryption/decryption keys before they can exchange encrypted data.Public Key CryptographyIn contrast, the fundamental property of public-key (PK) cryptography is that the encryption and decryption keys are different. Encryption with a public key is a one-INTRODUCTIONway function; plaintext turns into ciphertext, but the encryption key is unrelated tothe decryption process. A decryption operation requires a private key (related, butnot identical, to the encryption key) to transform the ciphertext back into plaintext.Therefore, every public key user has a pair of keys consisting of a public key and aprivate key. By making the public key available to anyone, it is possible to enablesomeone to send encrypted data to another person (or persons) that can only bedecrypted by the recipient using the private key. Separation of the public key fromthe private key has enabled new applications of cryptography such as digitalsignature, key agreement, and distributed authentication.Authentication typically requires some type of challenge-response betweenauthenticating parties. Public key cryptography provides a means by which achallenge-response can be accomplished between two parties who have never metbecause the public key and private key are distinct and separate. Separation of theprivate and public key enables distributed authentication because it does not requirethat the parties share a key a priori. Likewise, public key cryptography can also beused to generate a shared key without the parties having to meet in secret.In addition, data can be transformed using a private key in such a way thatrecipients can verify the data originated from a specific sender and that the data hasnot been tampered with while in transit. This is known as digital signature and isquite powerful. Digital signatures are themselves just data so they can betransported along with the signed data that they protect. A digital signature ensuresidentity because only the owner of the private key could have signed the data, andintegrity because modification of the data after it is signed invalidates the signature.Anyone can verify a signature because the public key can be published in adirectory as part of a certificate.Microsoft Windows NT Server Smart Card Logon White Paper 2Microsoft Windows NT Server Smart Card Logon White Paper 3The following concepts are important to understanding how smart card logon worksin Windows 2000. For more information on the public key technologies integrated with Windows 2000, read the Windows 2000 Public Key Infrastructure white paper. What is a Public Key Infrastructure?A public key infrastructure (PKI) is the set of components that manages certificates and keys used by encryption and digital signature services. A good PKI must provide services for cryptographic operations, certificate enrollment and renewal, certificate distribution and validation, certificate revocation, plus administrative tools and services for managing all of the above. Major components of the Windows 2000 PKI include the certification authority (CA) service, the Microsoft CryptoAPI for managing certificates and keys, and the policy infrastructure used to configure operational parameters that determine trust relationships and application behavior.A directory can also be considered a PKI component because it can storeinformation such as CA location, certificates, and certificate revocation lists (CRLs). CertificateCertificates provide a mechanism for gaining confidence in the relationship between a public key and the entity that owns the corresponding private key. The mostcommon form of certificates in use today is based on the ITU-T X.509 standard. The Internet Engineering Task Force (IETF) Request For Comment (RFC) 2459 profiles the X.509 version 3 certificate and the X.509 version 2 certificate revocation list (CRL) both of which are supported in Windows 2000.A certificate can be thought of as similar to a driver’s license. A driver’s license is accepted by numerous businesses as a form of identification because the license issuer (a government institution) is accepted by the community as trustworthy. Because businesses understand the process by which someone can obtain adriver’s license, they can trust that the issuer verified the identity of the individual to whom the licensed was issued. Therefore, the driver’s license can be accepted as a valid form of identification.Certification AuthorityA certification authority issues certificates to requesters based on a set ofestablished criteria. A CA acts as a guarantor of the binding between the subject public key and the subject identity information that is contained in the certificates it issues. The criteria that a CA uses when processing a request should be made public in a certificate practice statement enabling users of certificates to make informed trust decisions.The Windows 2000 public key infrastructure assumes a hierarchical CA model chosen for its scalability, ease of administration, and consistency with a growing number of commercial and third-party products. In its simplest form a CA hierarchy consists of a single CA, though, in general, a hierarchy contains multiple CAs with clearly defined parent-child relationships. A child CA is referred to as a subordinate CA. There is no requirement that all subordinate CAs within a company share aPUBLIC KEY CONCEPTScommon top-level parent CA.The CA at the top of a hierarchy is generally referred to as a root CA whosecertificate is self-signed. A self-signed certificate is a certificate whose subject nameand issuer name are the same and whose public key can be directly used to verifythe signature attached to the certificate.A CA that issues end-entity certificates is typically called an issuing CA. Anintermediate CA refers to a CA that is not a root CA, but that only certifies other CAsin a hierarchy. A hierarchy with only a root CA does not contain an intermediate CA.A two-level hierarchy with a root CA and an issuer CA also does not contain anintermediate CA. Hierarchies with more than two levels of CAs, by definition,contain at least one intermediate CA.Windows 2000 supports two types of CA services: enterprise or stand-alone. Theprimary difference between the two CA services is in how certificates are issued.The stand-alone CA will issue certificates without authenticating the requestor andusually is configured to require a CA administrator to approve requests based onsome out-of-band authentication. The enterprise CA requires the existence of aWindows 2000 domain and authenticates the requestor based on his or her domainlogon information. The enterprise CA uses certificate templates to distinguishdifferent types of certificates based on intended usage(s). Users may enroll fordifferent types of certificates based on their access rights within a domain.Certificate Revocation ListThe CA is responsible for publishing status information about any certificates it hasrevoked so that applications can check whether a given certificate and key-pair isstill trustworthy. Revoking a certificate means that the CA is withdrawing itsstatement about the allowed usage of the key-pair prior to the certificate’s normalexpiration. In order to revoke a certificate a CA will publish a list of serial numbersidentifying the revoked certificates. This list is called a certificate revocation list andis signed by the CA to allow an application to trust the information it contains basedon the signature. Like certificates, certificate revocation lists have validity periodsthough their lifetimes are typically much shorter than certificates. Windows 2000supports both automatic and manual publishing of CRLs with configurable lifetimesand to multiple locations.Certificate EnrollmentCertificate enrollment is the procedure used to request and receive a certificate froma CA. The certificate request provides identity information to the CA thatsubsequently becomes part of the issued certificate. The CA processes the requestbased on a set of criteria that may require some out-of-band authentication. If therequest is successfully processed, the CA then issues the certificate to the user,computer or another CA. In the case of a root CA, the CA issues itself a certificate.The Windows 2000 PKI supports certificate enrollment to the CA service or to third-party CAs like VeriSign. Enrollment support is implemented in a transport-independent manner and is based on use of industry standard PKCS-10 certificate Microsoft Windows NT Server Smart Card Logon White Paper 4request messages and PKCS-7 responses containing the resulting certificate orcertificate chain. In Windows 2000 certificates that support RSA keys andsignatures, Digital Signature Algorithm (DSA) keys and signatures, and Diffie-Hellman keys are supported. However, enrollment for Diffie-Hellman certificates isnot supported in Windows 2000 due to the absence of an established standard onwhich to base an implementation.Certificate StoresCryptographic keys and their associated certificates are stored and managed by theCryptoAPI subsystem. Keys are managed by Cryptographic Service Providers(CSPs) and certificates are managed by the CryptoAPI certificate stores.The certificate stores are repositories for certificates and their associated properties.By convention, the PKI defines five standard certificate stores:•Personal—contains a user’s or computer’s certificates for which theassociated private key is accessible through CryptoAPI.•CA—contains issuer or intermediate CA certificates used in buildingcertificate chains.•Enterprise Trust—contains Certificate Trust Lists . These are an alternatemechanism that allows an administrator to specify a collection of trustedCAs that must verify to a self-signed CA certificate in the trusted root store.•Trusted Root—contains only self-signed CA certificates that are trustpoints in the PKI.•UserDS—provides a logical view of a certificate repository that is stored inthe Active Directory. For example, the Windows 2000 CA can publish userand machine certificates to the userCertificate property of the user orcomputer object for use by other users or services.Certificate Chain ValidationThe certificate verification code in CryptoAPI attempts to build a certification path(that is, certificate chain) from the end-entity certificate (for example, a user orcomputer certificate) up to a CA root as follows:1. If a certificate chain is not delivered as part of the protocol, CryptoAPI usesthe Authority Key Identifier (AKI) field information, if present, to find theparent (issuer) certificate(s) in the system certificate stores. If AKI containsissuer and serial number information, CryptoAPI will look for a specificparent certificate; otherwise it will use the key identifier value to findmatching parent certificate(s).2. If CryptoAPI does not find a parent certificate in the certificate chaindelivered by the protocol, or in the system stores based on AKI, CryptoAPIwill then look at the Authority Info Access (AIA) field in the certificate.CryptoAPI will use information in AIA, if present, to retrieve the parentcertificate(s) from the location(s) specified (for example, HTTP, LDAP).3. If neither of the above steps yields a parent certificate, then CryptoAPI willuse the issuer name information in a certificate to find a parent in the systemcertificate stores.Microsoft Windows NT Server Smart Card Logon White Paper 5This process is repeated for each certificate in a chain terminating in a self-signedcertificate in the trusted root store for the user or the computer.Microsoft Windows NT Server Smart Card Logon White Paper 6Microsoft Windows NT Server Smart Card Logon White Paper The following concepts are important to understanding how smart card logon works in Windows 2000. For more information on Microsoft’s implementation of the Kerberos version 5 protocol, read the Windows 2000 Kerberos Authentication whitepaper, available from /windows/server/Technical/. Formore information on Active Directory read the Windows 2000 Active Directory white paper, available from /windows/server/Technical/. KerberosThe Kerberos authentication protocol provides a mechanism for mutualauthentication between a client and a server, or between different servers. One benefit of mutual authentication using the Kerberos version 5 protocol is that trust between security authorities for Windows 2000 domains is by default two-way and transitive.The Kerberos version 5 protocol relies heavily on an authentication techniqueinvolving shared secrets. The basic concept is quite simple: If a secret is known by only two people, then either person can verify the identity of the other by confirming that the other person knows the secret. Rather than sharing a password,communication partners share a cryptographic key, and they use knowledge of this key to verify one another’s identity. For the technique to work, the shared key must be symmetric —a single key must be capable of both encryption and decryption. One party proves knowledge of the key by encrypting a piece of information, the other by decrypting it.PKINITThere is an extension to the Kerberos version 5 protocol proposed by the IETF called PKINIT that allows for the use of a public key certificate in place of apassword during the initial authentication. The PKINIT extension is the basis for smart card logon support in Windows 2000 and does not change the requirement for a long-term symmetric key. Rather, the public key in the certificate is used to encrypt a symmetric key returned as a result of a successful authentication that then must be decrypted using the associated private key stored on the smart card. Key Distribution CenterWindows 2000 implements the Key Distribution Center (KDC) as a domain service and uses the domain’s Active Directory as its account database. The KDC is a single process comprised of two services: the Authentication Service (AS) and the Ticket-Granting Service (TGS). The AS issues Ticket Granting Tickets (TGTs) to authenticated principals (that is, users, machines, services) for admission to the TGS. The TGS issues tickets for admission to other services in the domain or to a TGS in another trusted domain. Each domain controller has a KDC that runs in the process space of the Local Security Authority (LSA). Any domain controller can accept authentication requests and ticket-granting requests addressed to the domain’s KDC.ACTIVE DIRECTORYAND KERBEROSCONCEPTSActive DirectoryThe Active Directory is primarily a namespace that is a bounded area in which a given name can be resolved. Name resolution is the process of translating a name into some object or information that the name represents. A telephone directory forms a namespace in which the names of telephone subscribers can be resolved to telephone numbers. The Active Directory forms a namespace in which the name of an object in the directory can be resolved to the object itself.An object is a distinct, named set of attributes that represents something concrete such as a user, a printer, or an application. The attributes hold data describing the subject that is identified by the directory object. Attributes of a user might include the user’s common name, a certificate, or an e-mail address. All Active Directory objects are protected by an Access Control List(ACL). ACLs determine who can see the object and what actions each user can perform on the object. The existence of an object is never revealed to a user who is not allowed to see it.Domains, Forests and TrustA domain is a single security boundary in Windows 2000. Active Directory is comprised of one or more domains. On a stand-alone computer, the domain is the computer itself. A domain can span more than one physical location. Every domain has its own security policies and security relationships with other domains. When multiple domains are connected by trust relationships and share a common schema, configuration, and global catalog, you have a domain tree. Multiple domain trees can be connected together into a forest.A forest is a set of one or more trees that do not form a contiguous namespace. All trees in a forest share a common schema, configuration, and Global Catalog. All trees in a given forest trust each other via transitive, hierarchical Kerberos trust relationships. Unlike a tree, a forest does not need a distinct name. A forest exists as a set of cross-reference objects and Kerberos trust relationships known to the member trees. Trees in a forest form a hierarchy for the purposes of Kerberos trust; the tree name at the root of the trust tree can be used to refer to a given forestKerberos uses the Active Directory as its account database from which it obtains information about security principals. When a domain is joined to a Windows 2000 domain tree, a Kerberos trust relationship is automatically established between the joined-from domain and its parent in the tree. Kerberos trust is transitive, so no additional trust relationships are required among tree members. The trust hierarchy is stored in cross-reference objects in the directory.Each domain controller keeps a writeable copy of the directory so that accounts can be created, passwords reset, and group membership modified on any domain controller. Changes made to one replica of the directory are automatically propagated to other replicas. Windows 2000 does not, however, implement the Kerberos replication protocol. Instead it replicates the information store for Active Directory using a multi-master protocol over a secure channel established between replication partners.Microsoft Windows NT Server Smart Card Logon White Paper A smart card can be used to authenticate to a Windows 2000 domain in three ways. The first is interactive logon involving Active Directory, the Kerberos version 5 protocol, and public key certificates. The second is client authentication where auser is authenticated using a public key certificate that matches an account stored in Active Directory. The third is remote logon that uses a public key certificate with the Extensible Authentication Protocol (EAP) and Transport Layer Security (TLS) to authenticate a remote user to an account stored in Active Directory.Interactive LogonInteractive Logon using a smart card begins when a user inserts a smart card into a smart card reader that signals the Windows 2000 operating system to prompt for a Personal Identification Number (PIN) instead of a username, domain name and password. The card insertion event is equivalent to the familiar Ctrl-Alt-Del secure attention sequence used to initiate a password-based logon. However, the PIN the user provides to the logon dialog is used to authenticate only to the smart card and not to the domain itself. A public key certificate stored on the smart card is used to authenticate to the domain using the Kerberos version 5 protocol and its associated PKINIT extension.Logon RequestAfter a user inputs a PIN to the logon dialog, the operating system begins a sequence of actions to determine whether the user can be identified andauthenticated based on credential information the user has provided (PIN and smart card). The logon request first goes to the LSA that subsequently forwards it to the Kerberos authentication package running on the client. The Kerberos package sends an authentication service (AS) request to the KDC service running on adomain controller to request authentication and a Ticket Granting Ticket (TGT). As part of the AS request, the client-side Kerberos package includes the user’s X.509 version 3 certificate, retrieved from the smart card, in the pre-authentication data fields of the AS request. An authenticator, included in the pre-authentication data fields, is digitally signed by the user’s private key so that the KDC can verify the AS request originated from the owner of the accompanying certificate.Certificate VerificationBefore the KDC can satisfy the AS request, it must first verify the certification path of the user’s certificate to ensure that it can be trusted. The KDC uses CryptoAPI to build a certification path from the user’s certificate to a root CA certificate residing in the system root store. If the KDC fails to build a valid certificate chain for any reason (that is, root certificate is not trusted, cannot find parent certificates, revocation status cannot be determined) the KDC will return an error and fail the request. The KDC must also verify that the issuing CA is authorized to issue certificates whose name information can be used as a basis for authentication within the domain. In Windows 2000, the issuing CA must be an enterprise CA published in the Active Directory in order to be trusted for authentication. This is required in orderHOW SMART CARDAUTHENTICATIONWORKSto prevent a rogue CA, trusted under one CA hierarchy, from issuing certificates into another domain’s namespace. While this type of attack is extremely difficult and depends on the rogue CA obtaining issuance rights from a legitimate parent CA, the solution to require an enterprise CA published in Active Directory was implemented to remove the potential for an attack.Digital Signature VerificationUpon successful verification of the user’s certificate, the KDC then uses CryptoAPI to verify the digital signature on the authenticator that was included as signed data in the pre-authentication data fields. The signature verification is done using the public key from the user’s certificate to prove that the request originated from the owner of the public key. Because the certificate was retrieved from the smart card and the authenticator was signed using the private key stored in the smart card, the digital signature must be legitimate because the user had to authenticate to the smart card in order for the private key to sign the authenticator. After verifying the signature, the KDC service must then validate the timestamp in the authenticator to ensure the request is not a replay attack.Account Lookup and TGTUpon verifying that a user is who they say they are and that the certificate can be used to authenticate to the domain, the KDC service then queries the domain’s directory for account information. The KDC service retrieves user account information from Active Directory based on the User Principal Name (UPN) specified in the Subject Alternative Name field in the user’s public key certificate. The account information that the KDC retrieves from the directory is used to construct a TGT. The TGT will include the user’s Security ID (SID), the SIDs for any domain groups to which the user belongs, and potentially the SIDs for any universal groups in which the user is a member (in a multi-domain environment). The list of SIDs is included in the TGT’s authorization data fields.The KDC encrypts the TGT using a random key generated specifically for this purpose. The random key is itself encrypted using the public key from the user’s certificate and the encrypted key is included in the pre-authentication data field of the KDC’s response. The KDC signs the reply using its private key so that the client can verify the reply is from a trusted KDC. The client verifies the KDC’s signature by first building a certification path from the KDC’s certificate to a trusted root CA and then using the KDC’s public key to verify the reply signature. The KDC also signs the TGT’s authorization data using the server’s key that is then signed with the KDC’s secret key so that a rogue service cannot alter the authorization data after the TGT has been issued. The client, upon receipt of the KDC’s response, will extract the encrypted random key, decrypt it, and use the resulting key to decrypt the TGT. Once in possession of the TGT, the standard Kerberos version 5 protocol is used to request tickets from the TGS for other domain resources.It should be noted that supplemental credentials are generated as part of a Kerberos logon so that access to down-level servers such as those running the。