COMP 346 Study Guide - Final Guide: Address Bus, Page Fault, Computer Multitasking

202 views36 pages
Comp346 Tarik Azzouni
Week 1:
Operating System: A system software that's the lowest one (no other software between the OS
and hardware).
System Software: Software used to build other software by providing an infrastructure to help
link hardware, software, and networks (ex: OS, game engine, etc..).
Application Software: Software installed onto system software, mainly used by the user, such as
programs and games.
Abstractions: Hiding details of how a function works. Example:
Application software contains Cut (and Paste), Save, Send, etc.
System software contains Malloc(), Fork(), etc.
Hardware contains Read-Disk, Track-Mouse, etc.
Software/Hardware Interfaces (in exact order):
1) User Interface
2) Application Software
3) API
4) System Software (abstract resources)
5) OS Interface
6) OS
7) Software-Hardware Interface
8) Hardware Resources
Different types of an OS:
Batch: The OS gathers up bulks of jobs to be processed at once without user interaction.
Timesharing: Time-sharing is a technique which enables many people, located at various
terminals, to use a particular computer system at the same time.
Real-time: A real-time operating system is designed to handle events as they occur.
Real-time operating systems are commonly found and used in robotics, cameras, complex
multimedia animation systems, etc…
Dedicated: The OS uses all its resources for a single process.
Distributed: The OS designed to work in a network. Each computer in this SYSTEM
operates independently but is part of a whole. Basically every computer has their own
part of the system and they all use each others parts.
Network: The OS uses a network to link computers via a server on a local area network
(LAN).
Resource Sharing: Resources shared among a set of programs concurrently.
Space-multiplexed: Dividing resource into (some # of) pieces for use among different
processes.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 36 pages and 3 million more documents.

Already have an account? Log in
Comp346 Tarik Azzouni
Time-multiplexed: One process uses the resource for a short time, then passes it to the
next process.
Resource Isolation: Prevents processes conflicting with each other, yet isolation also prevents
communication.
Multiprogramming: The OS can keep more than one program in the main memory, but only one
program can run at a time (typically done on a uniprocessor).
Multi-tasking: The OS can have multiple processes running/stored at the same time, on the CPU.
Von Neumann Architecture:
ALU: Performs all the arithmetic operations.
Control Unit: Fetches, decodes, and executes instructions.
* Both ALU and Control Unit are part of the CPU!
* The CPU is connected to the memory and I/O devices via an address bus and data bus!
Process Control System: dedicated to a single application or process, therefore does not need
security (isolation), fairness (CPU sharing), …, hence no need for an OS.
Week 2:
OS Initialization:
Bootstrap Loader: A program that is stored in the ROM that retrieves the OS when computer
turns on. Because of this, more than one OS can be stored in a single system, since it loads one at
a time.
---------------------------------------------------------------------------------------------------------------------
Device Driver: A program that provides an interface for a device attached to the computer, like
an extension, to make that device compatible with the OS.
Device Controller: Part of a device or system which makes sense of signals going in and coming
out of the CPU.
How it works:
1) Driver adds data to Controller registers.
2) Controller reads its registers to determine action (like read character from keyboard).
3) Controller transfers data from device to its own buffer storage.
4) Controller tells Driver (via interrupt) that it is done.
5) Driver tells OS that it is done.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 36 pages and 3 million more documents.

Already have an account? Log in
Comp346 Tarik Azzouni
6) Main Memory now has access to the Controller’s buffer, for which CPU can process
with.
Polling: Driver constantly checks Controller’s busy flag to see if it’s available. This is bad
because the CPU runs the Driver, so it hogs the CPU.
Interrupt: Controller will only interrupt Driver when it is ready. This saves much more
processing time since the CPU can run other stuff while the Driver waits for the Controller.
*Polling is only better than interrupts at the start because all devices will be ready to start.
Interrupting at the start would make all the devices interrupt (since they are ready) the CPU,
which is bad.
DMA (direct memory access): It allows Controller to process the device’s job via its own mini
CPU. It essentially allows a device to send data directly to the main memory(RAM), bypassing
the CPU. MANAGED BY THE DMA Controller chip.
Pro: Saves processing time
Con: DMA and CPU share the same bus, so processes can get conflicts.
---------------------------------------------------------------------------------------------------------------------
An OS uses the following managers:
Process Manager
Device Manager
Main Memory Manager
File Manager
Process Address Space: The set of logical addresses that a process references in its code.
---------------------------------------------------------------------------------------------------------------------
Processor Mode:
User mode: An abstraction of the functionality of the OS as a user interface (editors and apps).
Supervisor (or kernel) mode: A mode where it protects the kernel and important OS services
from the user (like user cannot access main memory, but tasks in supervisor mode can).
---------------------------------------------------------------------------------------------------------------------
Interaction between processes (without shared memory) in same virtual system:
For a sender (an actual user) to send a message to the receiver, the message must be
stored in the OS space first, until the receiver reads it. However, multiple senders can
clog up the OS space.
You can have a pointer delivered to the receiver while you (the sender) keep the copy,
but then if you decide to modify the message, the receiver would need his own copy.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 36 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Operating system: a system software that"s the lowest one (no other software between the os and hardware). System software: software used to build other software by providing an infrastructure to help link hardware, software, and networks (ex: os, game engine, etc). Application software: software installed onto system software, mainly used by the user, such as programs and games. Abstractions: hiding details of how a function works. Example: application software contains cut (and paste), save, send, etc, system software contains malloc(), fork(), etc, hardware contains read-disk, track-mouse, etc. Software/hardware interfaces (in exact order): user interface, application software, api, system software (abstract resources, os interface, os, software-hardware interface, hardware resources. Real-time operating systems are commonly found and used in robotics, cameras, complex multimedia animation systems, etc : dedicated: the os uses all its resources for a single process, distributed: the os designed to work in a network. Each computer in this system operates independently but is part of a whole.