programmer to furnish code Basic Set of Material to Cover that implements these common in Lecture on Chapter One of services. 9th Edition of Silberschatz. It's better to have a single The OS performs as an program, the OS, that provides intermediary between the user these common services to all of the computing system and the other programs. the hardware, functioning as a virtual computer that makes SECTION 1.2 - Computer System the use of the hardware more Organization convenient and/or efficient. 1.2.1 - Computer System The first chapter Operation * Describes how a computing Components system is organized, and * CPU(s), primary memory, and * What the components are device controllers sharing a bus It also explains about the * CPUs and controllers can variety of different kinds of execute in parallel computing systems * CPUs and controllers compete (environment) and gives some to use the primary memory examples. * The memory controller arbitrates competition for use SECTION 1.1 - What Operating of memory Systems Do * operate the hardware Typically, computers boot (minimizing misuse) through automatic execution of * coordinates use of the a program in ROM that knows hardware among all the how to load the OS from programs running on the system secondary memory and jump into * makes the hardware (much) it. Details vary. easier to use * insures that the hardware is The primary purpose of CPUs is utilized efficiently to execute user program. * allocates resources (such as Therefore, whenever the CPU time and memory) to is executing running programs on a CPU, its job is to finish whatever it needs to do as Most or all programs running soon as possible, and then on a computer need to be VACATE the CPU by dispatching provided with the services a user . listed above. This means that the OS is NOT It does not sense to EXECUTING much of the time. require every application (When people say that the OS

1 of 8 is "always running" - that's : device drivers not literally true.) However, provide communication from the the hardware and the user the OS to the devices, while processes need to have a way interrupts provide a means of to summon the operating system communication from devices to when they need it to provide a the operating system. service. The purpose of INTERRUPTS is to give the Sometimes the style of I/O hardware and the software a requires one for way to summon the operating each transfer of a byte. Some system. The hardware is devices function using direct designed and constructed in a memory access (DMA) which way that allows devices and accomplishes the transfer of running programs to send an large blocks of data between interrupt to a CPU, which primary memory and a device causes the CPU to immediately with only one interrupt. save some critical information about the current process and SECTION 1.3 - Computer System then begin executing a service Architecture routine associated with the interrupt. This service 1.3.1 - Single-Processor routine is part of the Systems operating system. This is In such systems there is only very important. The operating one general purpose CPU system is completely dependent on interrupts. There is no 1.3.2 - Multiprocessor Systems other way for the OS to begin These systems have multiple execution again after it has CPUs given the CPU to a process. * typically they are 'tightly- bound' CPUs that share a 1.2.2 - Storage Structure common bus and primary memory, as well as power supply and 1.2.3 - I/O Structure peripherals. Typically an operating system * Most commonly they are contains a module called a symmetric multiprocessing for each type of systems, rather than boss/ controller in the hardware worker designs. In an SMP all system. The peculiarities of processors can and do perform how to operate the device are all types of system work, sequestered in the device including execution of driver code, and the rest of operating system code. the operating system can use a * Multiprocessors can execute uniform interface to the more than one program device, which is provided by simultaneously. the device driver. Device drivers are complimentary to

2 of 8 * It is a challenge for the OS in order to support to keep all the processors interaction of each user with busy. his or her jobs. + Examples of the demands on Multicore Systems - are the OS are for online file multiprocessor systems in systems, which multiple CPUs share the process scheduling, memory same chip. management, swapping, and process synchronization. Blade systems are essentially These are major themes of multiple independent computers chapters housed in the same chassis. of the textbook. Each mainboard may contain multiple cores and/or multiple SECTION 1.5 - Operating System processors. Operation 1.5.1 - Dual Mode and 1.3.3 - Clustered Systems Multimode Operation - variant architecture - special OS features may be Dual mode operation is a required method for protecting the computing system, by SECTION 1.4 - Operating System insuring that user processes Structure are not able to execute + The ability to multiprogram dangerous operations. is important to OS design. It necessitates The basic idea is to have a sophisticated OS software. mode bit in the hardware. + Remember that The computer boots with the multiprogramming is a concept mode bit cleared (0). that is quite The OS sets the bit before different from jumping into user code (1) multiprocessing. An interrupt clears the mode + However, the two have bit (0). something in common - both In this manner, the mode bit lead to a is assured to be 0 when the OS situation in which the is executing, computer exhibits concurrency. and 1 when a user process is + This is especially true when executing. the multiprogramming style is Privileged instructions are time-sharing implemented in the hardware - (aka multitasking) wherein instructions the context switches occur that can be executed only in very frequently. kernel mode (0). An attempt + Time-sharing operating to execute a systems have to be very sophisticated too -

3 of 8 privileged instruction while Basically a process is a in user mode just causes a program that is executing. trap to the Many resources and data are operating system. required to maintain a Examples of Privileged process. Instructions The OS: * Switch to kernel mode * Allocates CPU time to * I/O control processes * timer management * Creates and deletes * masking of interrupts processes * Suspends and resumes + A SYSTEM CALL is a request processes made by a process for a * Provides synchronization service from the OS mechanisms for processes + Usually system calls are * Provides mechanisms for implemented by execution of an processes to communicate with instruction that causes a trap each other + The service routine of the OS that handles the interrupt SECTION 1.7 - Memory figures out Management what service is being In a typical multiprogramming requested (often by checking computing system, the OS has for parameters left to by the calling process in * Allocate and deallocate registers, memory, or on its memory stack), and * Keep track of which parts of then calls the appropriate memory are free and allocated routine to perform the * Keep track of which service. processes are allocated which portions of memory 1.5.2 - Timer * Deal with situations in Many computer architectures which the supply of free incorporate one or more timers memory is depleted that can be set to interrupt after a specified amount of SECTION 1.8 - Storage time. Such a timer can be Management used by the operating system * The OS is responsible for to prevent a user process from implementing the structure of failing to relinquish the CPU. a , usually with The instructions that manage secondary storage being the the timer are privileged, main underlying physical which prevents user processes structure. from disabling the timer. 1.8.1 - File-System Management SECTION 1.6 - Process * The OS implements the Management abstract concept of a file

4 of 8 * The OS implements file * Be aware of the problem of directory structure keeping consistency among * The OS implements file copies of data kept in ownership and permissions different cache levels, or in The OS is responsible for separate caches that are at + file creation and deletion the same level. + directory creation and deletion 1.8.4 - I/O Systems + primitives for file The I/O subsystem provides manipulation "information hiding" between + mapping files onto secondary the I/O devices and higher storage devices levels of the OS. The + backing up files components of the I/O system are 1.8.2 - Mass-Storage * such as Management buffering, caching, and * The OS has to manage spooling + Free space on disk * A general interface for the + Disk storage allocation OS to use to communicate with and deallocation device drivers. + The scheduling of * device drivers for specific transfers of data between disk hardware devices and primary memory SECTION 1.9 - Protection and Since the speed of secondary Security storage is often a performance bottleneck, Things that come under this the efficiency of the heading implementation of secondary * authorization storage may be critical to * preventing access to some operating system design. resources * preventing misuse of some The OS often has resources to which access IS responsibility for tertiary ALLOWED storage - operations such as mounting and unmounting backup * Protection is mainly about tape drives, and performing ensuring access is authorized backup and restore functions. (checking ID).

1.8.3 - Caching * Security is more about * Know what it is, the basics monitoring usage to defend it of how it is implemented against misuse * Know that cache size and replacement policy are SECTION 1.10 - Kernel Data important to hit ratio. Structures

5 of 8 1.10.1 Lists, Stacks, and systems are still using Queues terminals attached to main * Operating Systems are frames fundamentally programs. They are big sophisticated programs Now web portals are more that utilize a wide variety of common, and "thin clients" - data structures machines that have just enough + arrays power to utilize web-based + various kinds of lists, many services. More connections of which are linked structures are using wireless and + stacks cellular networks. + queues People now have faster 1.10.2 Trees internet connections at home, Operating systems utilize a with firewalls, and often home wide variety of tree data networks. structures, like binary trees and trees that have much Batch and time-sharing systems greater potential "fan out" are increasingly rare. Time sharing technology is still 1.10.3 Hash Functions and Maps prevalent, but mostly used to + For example the OS might support the multiple processes hash user names to lookup all running for the benefit of passwords when interacting a single user. with a user who is trying to log in to the system 1.11.2 - Mobile Computing Use of mobile computing has 1.10.4 Bit Maps exploded - e-mail, messaging, A string of n bits can be used browsing, navigation and other to indicate the free/allocated location-based services, status of n items. A bit augmented reality that value of 0 commonly means the sometimes involves overlaying resource is free, and 1 means real scenes with information. it is allocated. Bit maps are Hardware for mobile systems is very compact, so they are used currently limited in speed and for things like allocation of capacity. disk blocks. 1.11.3 - Distributed Systems SECTION 1.11 - COMPUTING + Separate machines - ENVIRONMENTS heterogeneous + 1.11.1 - Traditional Computing generally means one that runs This may consist of PCs separately on each host, but connected to a network, which is "network aware" servers, and remote access + A truly distributed with laptop computers. Some operating system makes the

6 of 8 network of computers take on set of instructions on a the nature of a single different CPU. computer with a single + allows operating system. users to install multiple OSs on a single machine, and 1.11.4 - Client-Server thereby provide a convenient Computing means of running more + There are compute-server applications - since some systems applications are not available + There are file-server on some Operating System systems platforms. + People who are trying to port software can test 1.11.5 - Peer-to-peer versions for different Computing operating systems on just one + The ability of a host to act machine that has all the as a server or as a client is operating systems installed. exploited in peer-to-peer systems. 1.11.7 - Cloud Computing + There can be a multiplicity + Cloud computing is compute- of servers, which can reduce serving, file/storage serving, server bottleneck problems. and application-serving. + However clients in peer-to- + Users pay per month for what peer networks often utilize a they use. centralized lookup service to + Clouds can be public, locate a server. private, or a hybrid. + An alternative is for + There is SaS -software as a clients to broadcast to all service, PaaS - platform as a hosts in the peer-to-peer service (e.g. a database network to ask for a service. server), IaaS - infrastructure + Skype is also peer-to-peer as a service (e.g. storage for networking. backups)

1.11.6 - Virtualization 1.11.8 - Real Time Embedded * This is technology that Systems allows an operating system to * These ubiquitous systems are run as applications within the computers in devices like another operating system. cars, microwave ovens, and so * Virtualization is on. They mainly monitor and independent of emulation, manage devices, seldom have since both the virtualized and extensive user interfaces, and native OSs may be designed to are not used as general execute on the same CPU - purpose computers (although whereas emulation denotes the hardware may be identical interpretation of the to the hardware used for some instructions of one CPU as a general purpose computers).

7 of 8 * Some embedded systems use application specific 1.12.3 - BSD integrated circuits (ASICs) + BSD Unix has an interesting that can provide desired history. functionality without having + Apple's Darwin kernel is an operating system. based on BSD Unix * The OS used in an embedded system is often REAL TIME. 1.12.4 - Solaris + Sun Microsystem Unix SECTION 1.12 - Open-Source + First based on BSD, then Operating Systems AT&T Unix + Sun sold out to Oracle * These are operating systems + Development of Solaris for which one can get the continues by third party source code, not just the Illumos compiled version of the program. 1.12.5 - Open Source Systems * Often open source code is as Learning Tools easier to maintain, improve, experiment on, learn from, and SECTION 1.13 - Summary so forth.

1.12.1 - History Early in the history of CS, programmers shared source code commonly. Later it became common to withhold it, and sell only the object code. Some of the reasons were to protect profits, and keep secrets needed for the efficacy of media copy protection. * Richard Stallman's Foundation encourages the sharing of source code.

1.12.2 - + Linus Torvalds put GNU Unix- compatible tools together with a -inspired kernel and then people worldwide refined it into the Linux operating system. + There are numerous distributions of Linux

8 of 8