1 / 10

Chapter 2: Introduction to Operating Systems

Chapter 2: Introduction to Operating Systems. 이준희 (jvl@tcs . snu.ac.kr ) School of Computer Science and Engineering Seoul National University. Contents. Introduction to Operating Systems Introduction Virtualizing the CPU Virtualizing Memory Concurrency Persistence Design Goals

violab
Télécharger la présentation

Chapter 2: Introduction to Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2:Introduction to Operating Systems 이준희(jvl@tcs.snu.ac.kr) School of Computer Science and Engineering Seoul National University

  2. Contents • Introduction to Operating Systems • Introduction • Virtualizing the CPU • Virtualizing Memory • Concurrency • Persistence • Design Goals • Some History

  3. Introduction • Operating System • A body of software that is responsible for making it easy to run programs, allowing programs to share memory, enabling programs to interact with devices. • System Calls • The OS provides some interfaces (APIs) to runprograms, access memory and devices, and other related actions. • Abstraction establishes a level of complexity on which a person interacts with the system. Source: http://upload.wikimedia.org/wikipedia/commons/6/68/Linux_kernel_interfaces.svg (Retrieved 2015.04.22)

  4. Introduction • Virtualization • The OS takes a physical resource and transforms it into a more general, powerful, and easy-to-use virtual form of itself. • Resource Manager • Each of the CPU, memory, and disk being a resource of the system, the operating system manages those resources efficiently or fairly.

  5. Virtualizing the CPU • Illusion • Turning a single CPU into a seemingly infinite number of CPUs. • Policy • Basic mechanisms that OSs implement to answer ‘question’s. • Allowing many programs to seemingly run at once. $ gcccpu.c –o cpu $ ./cpu j & ./cpu v & ./cpu l [1] 10360[2] 10361vjljvljvl^C $ main() of cpu.c: 1 intmain(intargc, char *argv[])2 {3 inti = 0;4 while(1)5 {6 printf(“%s\n”, argv[1]);7 sleep(1);8 }9 return 0;0}

  6. Virtualizing Memory • Physical Memory • an array of bytes • One must specify an address/data to be able to read/write(update) memory. • (Virtual) Address Space • The OS maps onto the physical memory of the machine. • The running program has physical memory all to itself, not affecting the address space of other processes. • However, physical memory is a shared resource.

  7. Concurrency • A host of problems that arise, and must be addressed, when working on many things at once in the same program. • Atomicity • If a set of operations appears to the rest of the system to occur instantaneously. • Either successfully change the state of the system, or have no apparent effect.

  8. Persistence • Storing files safely over the long-term. • File system • the software in the operating system that usually manages the disk. • The OS does not create a private, virtualized disk for each application. • Journaling • a chronological record of data processing operations that may be used to construct or reinstate an historic or alternative version of a computer file. • Copy-on-write • Whenever a task attempts to make a change to the shared information, it should first create a separate copy of that information.

  9. Design Goals • Providing: • high performance = minimization of the overheads of the OS • protection between applications / OS and applications • a high degree of reliability • energy-efficiency, security, mobility, …

  10. Some History • Hardware privilege level • different levels of access to resources • Kernel mode • The OS has full access to the hardware of the system. • User mode • The hardware restricts what applications can do. • Memory protection • not allowing one program to access the memory of another program Source: http://blog.codinghorror.com/understanding-user-and-kernel-mode/ (Retrieved 2015.04.22)

More Related