Presentation is loading. Please wait.

Presentation is loading. Please wait.

1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition CS270 Operating Systems Understanding of operating systems and fundamental.

Similar presentations


Presentation on theme: "1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition CS270 Operating Systems Understanding of operating systems and fundamental."— Presentation transcript:

1 1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition CS270 Operating Systems Understanding of operating systems and fundamental design principle. Quick review of multiprogramming, process/thread management, memory and storage management Study a tiny/instructional OS: Nachos Advanced topics with selected research papers Nachos programming assignments or special projects.

2 1.2 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition CS270 Operating Systems www.cs.ucsb.edu/~cs270t. www.cs.ucsb.edu/~cs270t cs270t. Password: systems Recommended text book: Operating System Concepts, by Silberschatz, Galvin, Gagne.Operating System Concepts Old edition is fine. The web site contains slides and practice exercises with solutions.

3 1.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Advanced Topics with Selected Papers Microkernel. OS scheduling (e.g. Lottery scheduling. Scheduler activation). File systems and storage. RAID. Log-structured file systems Google file system Parallel distributed processing Key-value stores (Bigtable, Dynamo) Mapreduce/Hadoop Clustering for Internet services (Neptune). Virtualization (Vmware, Xen)

4 1.4 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Workload 3 Programming assignments (C++): Understand Nachos code and extend with sample code (2 persons/group). 1 exam Q/A for selected papers/slides from lectures (TBD). Contributed questions from everybody Special project option to trade for other efforts Paper reading+ discussions/group presentation

5 1.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Special Project Options Parallel programming with Hadoop MapReduce in data-extensive applications Similarity comparison. Duplicate detection. Or others. Architecture evaluation and benchmarking of open- source data-store systems Hive, Cassandra, Hbase, Hypertable (?) Membase, memcached MogoDB, VoldDB HW3/HW2 may be replaced with project reports (architecture, benchmarks, how to install/test, presentations)

6 1.6 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Workload 3 Programming assignments (C++): Understand Nachos code and extend with sample code (2 persons/group). 1 exam Q/A for selected papers/slides from lectures (TBD). Contributed questions from everybody Special project option to trade for other efforts Paper reading+ discussions/group presentation

7 1.7 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Basic OS Concepts: Quick overview Computer Organization and Operations. Impact on OS. Dual-modes. Interrupt handling. OS structure Services:  Multiprogramming. Process management. Memory and storage management. Security. Design and implementation principles  Modules/Layered approach.  Microkernel Virtualization

8 1.8 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Operating Systems

9 1.9 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Operating Systems: Market Shares

10 1.10 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Operating Systems: Market Shares Unix64.2% Windows35.9% W3Techs.com, 27 February 2011 Web server OS Market shares Smartphone market Shares (World) Nov 2010 SymbianiOS AppleBlackberryAndroid 32%21%19%11% Smartphone market Shares (US) 2011

11 1.11 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition OS Services and Structure

12 1.12 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition How a Modern Computer Works

13 1.13 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition OS is interrupt-driven

14 1.14 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition 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 Program Interface (API) rather than direct system call use Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM) Why use APIs rather than system calls?

15 1.15 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition 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 Program Interface (API) rather than direct system call use Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM) Why use APIs rather than system calls? Portability. Simplicity.

16 1.16 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Standard C Library Example C program invoking printf() library call, which calls write() system call

17 1.17 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition API – System Call – OS Relationship

18 1.18 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Calls and Due-Mode Dual-mode operation allows OS to protect itself and other system components: User mode and kernel mode

19 1.19 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Examples of Windows and Unix System Calls

20 1.20 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multiprogramming Multiprogramming needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data) so CPU always has one to execute A subset of total jobs in system is kept in memory One job selected and run via job scheduling When it has to wait (for I/O for example), OS switches to another job Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing Response time should be < 1 second Each user has at least one program executing in memory  process If several jobs ready to run at the same time  CPU scheduling If processes don’t fit in memory, swapping moves them in and out to run Virtual memory allows execution of processes not completely in memory

21 1.21 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process Management Activities Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling The operating system is responsible for the following activities in connection with process management:

22 1.22 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is in memory when Optimizing CPU utilization and computer response to users Memory management activities Keeping track of which parts of memory are currently being used and by whom Deciding which processes (or parts thereof) and data to move into and out of memory Allocating and deallocating memory space as needed

23 1.23 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Storage Management OS provides uniform, logical view of information storage File-System interface Files usually organized into directories Access control on most systems to determine who can access what OS activities include  Creating and deleting files and directories  Primitives to manipulate files and dirs  Mapping files onto secondary storage  Backup files onto stable (non-volatile) storage media. Massive storage management (e.g. disk drive) Free-space management Storage allocation Disk scheduling

24 1.24 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Level of storage Movement between levels of storage hierarchy can be explicit or implicit.

25 1.25 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Clustered Systems Like multiprocessor systems, but multiple systems working together Usually sharing storage via a storage-area network (SAN) Provides a high-availability service which survives failures  Asymmetric clustering has one machine in hot-standby mode  Symmetric clustering has multiple nodes running applications, monitoring each other Some clusters are for high-performance computing (HPC)  Applications must be written to use parallelization

26 1.26 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Protection and Security Protection – any mechanism for controlling access of processes or users to resources defined by the OS Security – defense of the system against internal and external attacks Huge range, including denial-of-service, worms, viruses, identity theft, theft of service Systems generally first distinguish among users, to determine who can do what User identities (user IDs, security IDs) include name and associated number, one per user User ID then associated with all files, processes of that user to determine access control Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file Privilege escalation allows user to change to effective ID with more rights

27 1.27 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition OS Design and Implementation Principles Important principle to separate Policy: What will be done? Mechanism: How to do it? Mechanisms determine how to do something, policies decide what will be done The separation of policy from mechanism is a very important principle, it allows maximum flexibility if policy decisions are to be changed later

28 1.28 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Earlier Windows Systems MS-DOS – written to provide the most functionality in the least space Simple structure Not divided into modules. Interfaces and levels of functionality are not well separated Window’95

29 1.29 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Traditional UNIX System Structure

30 1.30 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Layered Approach The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers

31 1.31 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Modules Most modern operating systems implement kernel modules Uses object-oriented approach Each core component is separate Each talks to the others over known interfaces Each is loadable as needed within the kernel Overall, similar to layers but with more flexible

32 1.32 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Solaris Modular Approach

33 1.33 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition 33 Monolithic Kernel vs. Microkernel

34 1.34 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mac OS X vs Berkeley Unix

35 1.35 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Microkernel System Structure Moves as much from the kernel into “user” space Communication takes place between user modules using message passing Benefits: Easier to extend a microkernel Easier to port the operating system to new architectures More reliable (less code is running in kernel mode) More secure Detriments: Performance overhead of user space to kernel space communication

36 1.36 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Machines (a) Nonvirtual machine (b) virtual machine

37 1.37 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Machines A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware. A virtual machine provides an interface identical to the underlying bare hardware. The operating system host creates the illusion that a process has its own processor and (virtual memory). Each guest provided with a (virtual) copy of underlying computer.

38 1.38 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition The Java Virtual Machine

39 1.39 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition VMware Architecture


Download ppt "1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition CS270 Operating Systems Understanding of operating systems and fundamental."

Similar presentations


Ads by Google