100 likes | 173 Views
Introduction to Operating Systems. Hoyoon Jun(hoyoonjun@davinci.snu.ac.kr) School of Computer Science and Engineering Seoul National University. Motivation. Why do we need OS? Imagine a computer which can only provide followings Execute a single program at a time
E N D
Introduction to Operating Systems Hoyoon Jun(hoyoonjun@davinci.snu.ac.kr) School of Computer Science and Engineering Seoul National University
Motivation • Why do we need OS? • Imagine a computer which can only provide followings • Execute a single program at a time • Enables every program to access any memory addresses • Need to provide appropriate instructions if two different program access same variable • Every power failure results loss of data • Programs can accomplish its tasks without help of OS • But without managing system, programmer should deal with problems above by him/herself every time • Primary goal of OS is that making the system easy to use
Three Main Features of Operating Systems Virtualization CPU Virtualization, Scheduling, Process… Memory Virtualization, Paging, Address Translation… Concurrency Threads, Locks and semaphores, Deadlocks… Persistence File system, I/O Devices, Journaling… • Concept based on top-down approach
Comparing to Other OS Textbooks Memory management Memory Protection and security Process management Control unit Arithmetic logic unit Accumulator Advanced topics Storage management Input Output Book cover source: http://codex.cs.yale.edu/avi/os-book/OS8/os8c/, retrieved 2015/04/20 • Operating system concepts (Silberschatz at el) 9th ed. • Von Neumann architecture based on bottom-to-top approach
Virtualizing CPU A B D C A B D C A C B D…. A A A A A B B B B B C C C C C D D D D D • Gives illusion that the system has large number of virtual CPUs • Allows many programs to seemingly run at once • Related to concurrency and resource management • Example: running many programs at once
Virtualizing Memory Process A Process B p=malloc(sizeof(int)) p’=malloc(sizeof(int)) Physical memory • Gives illusion that each process has its own private virtual address space • Related to protection and resource sharing • A memory reference within one running program does not affect the address space of other processes
Concurrency Process A Counter Process B 6 6 7 7 7 7 • Concurrent access of shared resources is subtle and error-prone • One need protection, lock or other synchronization methods • Example: concurrent updating of shared counter
Persistence Source: http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose, retrieved 2015/04/20 • Needs to support hardware and software to be able to store data persistently • Use file system to store and manage persistent data • High performance is also important! • Example: journaling file system
Brief History of Operating Systems Libraries Protection Multiprogramming Modern OS Set of commonly used functions Batch processing Human operator Concept of OS privilege System call Trap handling Multiprogramming Memory protectionbetween processesConcurrency issues Modern OS (Windows, OSX) Mobile Green computing Mainframe era Transition era Minicomputer era PC era Note that development of OS concepts are provoked by computer’s propagation
Summaries • This book is based on three main concepts of operating systems • The virtualization, a technique which provides illusion of virtual resources • Introduced for the sake of easy-to-use system • CPU virtualization provides illusion of infinite virtual CPUs • Memory virtualization provides illusion of own private & large address space • Concurrency, a technique which manages shared resources in multiprogramming environment • Concept of atomicity, synchronization, and coherency will be introduced • Persistence, a technique for how to deal with persistent data • Files and directories are the building blocks to provide secure & reliable persistent data management • File systems and I/O device managements will be covered