CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM
Lecture 5 – Wednesday, January 16, 2013 Last time: Operating Systems: State and events; Event-driven-software Discussion of problems from the textbook Today: The kernel of an OS Protection – user and kernel mode execution OS services Next time System calls Kernel data structures Reading assignments: Chapter 2 of the text book The computer architecture material 12/7/2018
The main functions of a computer Transform in formation the interpreter Store information memory hierarchy Communicate communication links 12/7/2018
The basic operation of an interpreter 12/7/2018
Privileged and non-privileged instructions To manage the resources of a system the kernel has to operate with a higher level of privileges. Two modes of operation Kernel mode User mode Two types of instructions: Privileged instructions can only be executed in kernel mode Non-privileged instructions can be executed in kernel and in user mode System calls Allow a user to communicate with the kernel and request operations that can only be carried out by the kernel. 12/7/2018
Tight coupling between interpreter and storage We need a memory enforcement mechanism; to prevent a thread running the code of one module from overwriting the data of another module. Address space the range of memory addresses a thread is allowed to access. Close relationship between a thread and an address space. Lecture 15
Virtualization of storage - Virtual memory Address space the storage a thread is allowed to access. Virtual address space – an address space of a standard size regardless of the amount of physical memory. The physical memory may be too small to fit an application; otherwise each application would need to manage its own memory. The size of the address space is a function of the number of bits in an address. For example, 32 bits addresses allow an address space of 232 (4 Gbytes), 64 bit addresses allow 264 Virtual Memory - a scheme to allow each thread to access only its own virtual address space (collection of virtual addresses). Lecture 15
Memory map of a process Lecture 15
Questions What do we mean by a memory hierarchy? Why do we need a hierarchy of memory? What is virtualization? What is virtual memory? What is an interrupt? What types of interrupts can you identify? 12/7/2018
Kernel functions Program execution: Interrupt handling: Error handling: Job sequencing: Input/Output operations: File system manipulation: Scheduling: Resource Allocation: Accounting of computer resources: Protection: 12/7/2018