CS350_Lecture1

¡Supera tus tareas y exámenes ahora con Quizwiz!

OS Kernel

"The one program running at all times on the computer" is known as the OS kernel. Everything else is either a system program or an application program. The kernel provides the basic services that are essential to launch & run other system programs & applications.

volatile (adj)

(of a computer's memory) retaining data only as long as there is a power supply connected

Computer System Organization

- Computer-system typically consists of one or more CPUs, main memory & various I/O devices controllers connect through common bus. Each device controller provides interface logic for a set of specific I/O devices, like disks, monitor, printers, mouse, keyboard, etc. - Bus communication allows for high-speed, parallel transfer of information between system modules.

Three types of busses are common:

- Data bus (Data) - Address bus (location) - Control bus (Commend, getting feedback)

Computer Startup

- Executable program files typically reside on the secondary memory device ("disk"). In order to run any program, its executable has to be loaded into main memory of the computer. This requires reading from the disk, writing to main memory, setting up various management information, etc. - In particular, the kernel itself resides on the disk. How do we load the kernel into memory? The program to do this has to be running in main memory! (where it came from?? Memory is empty upon power on!) See the catch-22 situation here! - To solve this problem, the program that loads the kernel (from disk to memory), known as the bootstrap program, resides in a non-volatile memory device (a ROM) on the mother board

Computer system can be divided into four components:

- Hardware - Operating System - Application Programs - User

Computer-System Operation

- I/O devices and the CPU can execute concurrently. - Each device controller is in charge of a particular device type. - Each device controller has a local buffer. - CPU moves data from/to main memory to/from local buffers. - I/O is from the device to local buffer of controller. - Since I/O is very slow compared to CPU speed, OS will typically switch CPU to another program while the current I/O is going on. - Device controller informs CPU that it has finished its I/O operation by causing an interrupt. OS will handle this interrupt & then continue current program. - Concurrent operation is made possible using the architectural support for interrupts.

Common Functions of Interrupts

- Interrupt transfers control to the appropriate interrupt service routine (ISR), through the interrupt vector, which contains the addresses of all ISRs. The interrupt vector & the ISRs are part of the OS kernel. - Interrupt architecture will save the address of the interrupted instruction so that after interrupt handling it can be resumed. - Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt. - A trap is a software-generated interrupt caused either by an error or a user request for system services. - An operating system is heavily interrupt driven.

Storage Structure

- Main Memory - Currently running programs reside in main memory. It is the only large storage media that the CPU can access directly. Main memory is volatile: that is, it loses data upon power-off. Main memory often uses DRAM (Dynamic RAM) technology. - Secondary Memory - extension of main memory that provides large nonvolatile storage capacity. It retains data upon power-off. Secondary memory may use Magnetic Disk (Hard-Disk Drive) or Solid-State Disk (SSD) technology.

Migration of Integer A from Disk to Register

- Multitasking environments must be careful to use most recent value, no matter where it is stored in the storage hierarchy. - Multiprocessor environment must provide cache coherency in hardware such that all CPUs have the most recent value in their cache. - Distributed environment situation even more complex. ⚫ Several copies of a datum can exist ⚫ Various solutions covered in Chapter 17

Storage Hierarchy

- Storage systems organized in a hierarchy. - A storage device is characterized by its speed (access time, how quickly you can read information from particular device), capacity (size, how much items you can stored), cost (price per unit of storage) & volatility (does it lose contents upon power off?) - As we go from top to bottom in the memory hierarchy ⚫ Speed decreases ⚫ Capacity increases ⚫ Cost per unit of storage decreases ⚫ Top three are volatile & bottom four are non-volatile

Operating system goals:

- allow the users to launch an application successfully. - allow the convenient use of various system of resources that are there in the system by various users. (Ex. resources are mouse, keyboard, monitor, storage devices, ......) - Use the computer hardware in an efficient manner: system resources are shared amongst several tasks; this should be done efficiently, correctly, and in a fair manner.

Bootstrap Program

- is loaded during power-up or reboot. - Typically stored in ROM or EPROM, generally known as firmware. - Initializes all aspects of system. - Loads operating system kernel and starts execution.

Operating System Definition

1. OS is a resource allocator (manager): - Manages all system resources, both hardware & software. - Decides between conflicting requests for these resources by various programs for efficient and fair resource usage. 2. OS is a control program: - Controls execution of programs to prevent errors and improper use of the computer. A program crash should not shut down the entire system! OS should gracefully recover from the error & allow for continued system usage.

What is Operating System?

A program that acts as an intermediary between a user of a computer and the computer hardware.

Operating system

Controls and coordinates use of hardware among various applications and users

Data bus

It is a variable value

Users

People, machines, other computers

A trap is

a software-generated interrupt caused either by an error or a user request for system services.

Hierarchy (n)

a system or organization in which people or groups are ranked one above the other according to status or authority.

buffer (n)

a temporary memory area in which data is stored while it is being processed or transferred, especially one used while streaming video or downloading audio.

concurrently (adv)

at the same time; simultaneously.

generate (v)

cause (something, especially an emotion or situation) to arise or come about.

Application programs

define the ways in which the system resources are used to solve the computing problems of the users. Ex. Word processors, compilers, web browsers, database systems, video games.

reside (v)

have one's permanent home in a particular place.

Computer Hardware

main memory, disk, keyboard, monitor,....

Hardware

provides basic computing resources. Ex. CPU, memory, Input/Output devices

Cache (v)

store away in hiding or for future use.

Control bus

use supply command and also receive feedback.

Address bus

variable store in memory in a particular location. the location that the variable is stored called Address.

In order to perform booting___

we need bootstrap program, which resides in a non-volatile memory device (a ROM) on the mother board, which typically part of the CPU board.

Caching

◼ Important principle, performed at many levels in a computer (in hardware, operating system, software). ◼ Information in use copied from slower to faster storage temporarily. ◼ Faster storage (cache) checked first to determine if information is there. ⚫ If it is, information used directly from the cache (fast). ⚫ If not, data copied from its source to cache and used. ◼ Cache is much smaller than storage being cached. ⚫ Cache management important design problem. ⚫ Cache size and replacement policy become design issues.

Units of Space, Time & Frequency

◼ Space: ⚫ 1 byte = 8 bits ⚫ 1 KB = 1 Kilobyte = 210 bytes = 1024 bytes ⚫ 1 MB = 1 Megabyte = 220 bytes > a million bytes ⚫ 1 GB = 1 Gigabyte = 230 bytes > a billion bytes ⚫ 1 TB = 1 Terabyte = 240 bytes > a trillion bytes ◼ Time: Standard unit of time is 1 second ⚫ 1 ms = 1 millisecond = 10-3 seconds ⚫ 1 μs = 1 microsecond = 10-6 seconds ⚫ 1 ns = 1 nanosecond = 10-9 seconds ⚫ 1 ps = 1 picosecond = 10-12 seconds ◼ Frequency: Standard unit of frequency is 1 hz = 1 hertz which represents a clock signal that recurs every second. ⚫ 1 khz = 1 kilohertz = 103 hz ⚫ 1 mhz = 1 megahertz = 106 hz ⚫ 1 ghz = 1 gigahertz = 109 hz ⚫ 1 thz = 1 terahertz = 1012 hz

Chapter1: Introduction

◼ What Operating Systems Do ◼ Computer-System Organization ◼ Computer-System Architecture ◼ Operating-System Structure & Evolution ⚫ Single User OS ⚫ Batch OS ⚫ Multiprogrammed OS ⚫ Time-Shared OS ◼ Operating-System Components/Operations - Process Management - Memory Management - Storage Management - Disk Management - Input / Output Management - Protection and Security0


Conjuntos de estudio relacionados

Neuro and MusculoSkeletal Socrative

View Set

Chapter 3 - Cells: The Living Units

View Set

Networking - Chapter 13: Hardening and Update Management

View Set

ENGLISH 3: MLA Essay Writing Questions

View Set

Chapter 30: Eating Disorders Practice Questions (answers and explanation at the end)

View Set