Section 1

Preview this deck

Computer-system operation

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (36)

Section 1

(36 cards)

Computer-system operation

Front

One or more CPUs and devices connect through common bus providing access to shared memory. I/O devices and the CPU can execute concurrently and are competing for memory cycles. -Each device controller is in charge of a particular device type and has a local buffer -CPU moves data from/to main memory to/from local buffers -Meanwhile, I/O is occurring from the device to local buffer of the device controller -Device controller informs CPU that it has finished its operation by causing an interrupt

Back

Computing Environments - Client-Server

Front

One powerful computer (called the server) is a hub to which many less powerful personal computers or workstations (called clients ) are connected. → A system (acts as server), responding to requests generated by clients. → Computer-server system provides an interface to client to request services. → File-server system provides interface for clients to store and file retrieval. Client-Desktop . Client-Laptop . Client-Phone || || || ______________________Network__________________________ || Server

Back

Four components of Computer System

Front

*Hope Or Abandon Us *Has Oran Abandoned Us Hardware, Operating system, Application programs, Users - Hardware (basic computing resources): • CPU, memory, I/O devices - Operating system: • Handles hardware and users. - Application programs: • Text editors, web browsers and video games etc. - Users: • People, machines, other computers.

Back

Storage Systems Characteristics

Front

➢ Storage systems organized in hierarchy: ➢Speed => Cost => Volatility (Availability, Ruggedness, etc.) ➢ Caching: copying information into faster storage system. Where are your browser requests stored? (Level One) What are things that normally you consider when deciding which storage system is more suitable? How fast it can be accessed; the cost; any danger of becoming unavailable? How solid is the system? ➢ Use of small caches faster than a large cache. ➢ Levels of cache memory: 1) Level 1 (2kb -64kb), 2) Level 2 ( till 512kb) and 3) Level 3 (till 8MB). ➢ Faster than main memory but slower than registers.

Back

Interrupt

Front

Rather than the CPU main program constantly polling other programs to see if jobs are finished, other programs tell the CPU what's up by sending an interrupt anytime something significant happens (I.e. job finishes, receives important data from user, has an error, etc.). This saves time and let's CPU main program complete other functions. Imagine a CPU that's OS implements Serial/ Sequential Processing as follows. 1. Fetch Instruction 2. Decode Instruction 3. Execute Instruction 4. Repeat with next process instruction An interrupt It stops this, altering CPU job execution and tells the processor to stop what it's doing and do something else instead (current job stopped and temporarily replaced with another one) Interrupts are given a priority based on importance, so OS know whether or not to stop an interrupt for a new different interrupt. Jobs are stored in order of priority. When a processor is interrupted (or done executing a job), it will check its priority list. It will do whatever job is at the top of the list (could be current job or new job). If it is a new job, the OS will store the previous job in a register to save the work that's already been done. If there are multiple interrupted, unfinished jobs, they are stored in a stack within the register. Program ends after all jobs have been processed. ➢ Interrupt occurs → interrupt service routine → utilizes interrupt vector table → points to Interrupt Service Routines (ISRs). ➢ Interrupt saves the address of the interrupted instruction and the CPU acts accordingly. ➢ Trap or Exception → software-generated interrupt caused either by an error or a user request. ➢ An operating system is interrupt driven. So, in order, when there is an interrupt. 1) CPU saves current context through a register, stack, program counter or other. 2) The CPU grabs the address of Interrupt Service Routine (ISR) from a vector table. 3) The CPU jumps to the Interrupt Handler 4) The ISR handles job, clearing flags, etc. 5) The Interrupt Handler exits 6) CPU restores context and returns to main flow the main program doesn't even know what happens. It's business as normal.

Back

So, in order, when there is an interrupt...

Front

1) CPU saves current context through a register, stack, program counter or other. 2) The CPU grabs the address of Interrupt Service Routine (ISR) from a vector table. 3) The CPU jumps to the Interrupt Handler 4) The ISR handles job, clearing flags, etc. 5) The Interrupt Handler exits 6) CPU restores context and returns to main flow

Back

Direct Memory Access (DMA)

Front

Direct memory access (DMA) is a method that allows a High-speed input/output (I/O) device to send or receive data directly to or from the main memory, bypassing the CPU to speed up memory operations. The process is managed by a chip known as a DMA controller (DMAC). ➢ High-speed I/O devices when a burst/block/multibyte of data is to be transferred. ➢ Use a single purpose processor → DMAC (DMA Controller). ➢ Device controller buffer's storage → straight to main memory (no CPU intervention). In DMA the device controller transfers blocks of data from buffer storage to the main memory without any CPU intervention. DMA is used by high-speed I/O devices able to transmit information at close to memory speeds because it is not constructive to repeatedly interrupt the processor for transfer of every byte during bulk transfer of data and will waste too much of processor time. The DMAC will raise an interrupt (hold request) to the CPU and in return the CPU will acknowledge if the system memory buses are free to use. Another interrupt will be raised so an end notification will be received and the CPU can continue reusing the memory bus. *See Diagram: I/O <==> CPU <==> Memory ^\\ ______DMA_______//^

Back

Operating System

Front

The software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals. A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals: - Make the computer system usable. - Allow user to execute programs as per needs. - Use computer hardware efficiently. Think Interrupt-driven OS.

Back

Clustered Systems

Front

Like multiprocessor systems, but multiple systems working together through a Storage Area Network (SAN) ➢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. In an asymmetric clustering, a master node exists and directs all the slaves nodes to perform the tasks required, meaning that any requests are delegated by the master node. For the purpose of increasing the performance a distributed cache is used. Any resources such as memory, peripheral devices etc. are divided between the nodes at boot time. Advantages of Asymmetric Clustering: • Reduce cost of having separate peripheral devices and memory. • If one nodes fails, the others can pick up the slack and that increases reliability. • All nodes have their own kernels and can operate on different operating systems. • All the processors are independent and only share memory for inter process communications. Advantages of Symmetric Clustering System: • Same as above with addition that are quite scalable as it is easy to add a new node to the system and there is no need to take the entire cluster down to add a new node.

Back

Type of Interrupts

Front

1) I/O: indicating data transfer is finished or error 2) Timer: generated by computer's internal clock to say a time-critical activity needs attention 3) Hardware: Ex: power failure, highest priority 4) Software: generated by programs, Ex: an error from a program trying to divide by 0

Back

Storage Device Hierarchy

Front

1) Register (Managed by Compiler) 2) Cache (Managed by Hardware) 3) Main Memory (Managed by OS) 4) Solid State Disk (...) 5) Magnetic Disk (...) 6) Optical Disks 7) Magnetic Tapes Reconsider! Can Mary Sooner Marry Oran Mor?

Back

Interrupt Vector Table (IVT)

Front

IVT is a data structure that associating a list of interrupt requests with interrupt handlers (ISR) to form a table of interrupt vectors. Each entry of the interrupt vector table (i.e. interrupt vector) is the address of an interrupt handler. An interrupt vector is the memory location of an interrupt handler, which prioritizes interrupts and saves them in a queue if more than one interrupt is waiting to be handled.

Back

Virtualization

Front

Creates multiple "virtual" machines on a single computing device; In other words, runs multiple systems simultaneously on one physical computer. ➢ Allows operating systems to run applications within other OS. ➢Vast and growing industry ➢ Emulation used when source CPU type different from target type. ➢ Virtualization - OS natively compiled for CPU, running guest OSes also natively compiled . - Emulation → Generally slowest method - Virtualization → Consider VMware running WinXP guests, each running applications, all on native WinXP host OS • The purpose of a virtual machine is to create an isolated environment. • The purpose of an emulator is to accurately reproduce the behavior of some hardware. • Virtualization involves simulating parts of a computer's hardware - enough for a guest operating system to run unmodified. Virtualization therefore is normally faster than emulation but the real system has to have an architecture identical to the guest system. • In emulation the virtual machine simulates the complete hardware in software. This allows an operating system for one computer architecture to be run on the architecture that the emulator is written for. • "emulation" comes from "emulate," which means to imitate or reproduce. One of the most common types of software emulation involves running different operating systems in a virtual environment. • Consider the software emulation we have when we want to play console video games on our PC environment. Emulation is also disk images like ISO files that can be mounted on the desktop. These are unmodifiable by the user and are commonly used as virtual installer discs. • In computing, virtualization means to create a virtual version of a device or resource and divides the resource into one or more execution environments.

Back

Interrupt Handler/ ISR

Front

An Interrupt Service Routine (ISR) (also called an interrupt handler) is a software process invoked by an interrupt request from a hardware device. It handles the request and sends it to the CPU, interrupting the active process. When the ISR is complete, the process is resumed. A basic example of an ISR is a routine that handles keyboard events, such as pressing or releasing a key. Each time a key is pressed, the the ISR processes the input. For example, if you press and hold the right arrow key in a text file, the ISR will signal to the CPU that the right arrow key is depressed. The CPU sends this information to the active word processor or text editing program, which will move the cursor to the right. When you let go of the key, the ISR handles the "key up" event. This interrupts the previous "key down" state, which signals to the program to stop moving the cursor.

Back

Computing Environments - Peer-to-Peer

Front

In a P2P network, the "peers" are computer systems which are connected to each other and files can shared directly between systems on the network without the need of a central server. In other words, each computer on a P2P network becomes a file server as well as a client. Examples of these networks are voice over IP systems like Skype. ➢ Another model of distributed system ➢ P2P does not distinguish clients and servers: ➢Instead all nodes are considered peers. ➢ May each act as client, server or both. ➢Node must join P2P network.

Back

Storage Management

Front

The process of determining on what type of media to store data, how rapidly data must be accessible, arranging for replication of storage for back up and disaster recovery, and where storage systems should be maintained. File-System Management: ➢Files usually organized into directories ➢Access control on most systems to determine who can access what. OS: ➢Creating/editing and deleting files and directories. ➢Mapping files onto secondary storage. ➢Backup files onto stable (nonvolatile) storage media. Chooses storage for back up and disaster recovery, and where storage systems should be maintained. Registers backed by cache, caches backed by main memory, main memory backed by (solid-state) disk, SSD backed by (magnetic) disk and magnetic disk backed by (magnetic) disk or tape. So, backed up on next most-secure memory.

Back

Computing Environments - Distributed

Front

Distributed ➢Local Area Network (LAN) ➢Metropolitan Area Network (MAN) ➢Wide Area Network (WAN) ➢Personal Area Network (PAN) *Network Operating System provides features between systems across network. Distributed networking: network system over which computer programming, software, and its data are spread out across more than one computer, but communicate complex messages through their nodes (computers), and are dependent upon each other. • A LAN (local area network) is a group of computers and network devices connected together, usually within the same building. • A MAN (metropolitan area network) is a larger network that usually spans several buildings in the same city or town. • A WAN (wide area network) is not restricted to a geographical location. A WAN connects several LANs, and may be limited to an enterprise or accessible to the public. *NOTE: The most famous example of WAN is the Internet. • PAN (personal area network); network covering a very small area, usually a small room such as Bluetooth, wifi.

Back

Multiprogramming

Front

The technique of keeping multiple programs in main memory at the same time, competing for the CPU *In a multiprogramming system there are one or more programs loaded in main memory which are ready to execute. Only one program at a time is able to get the CPU for executing its instructions (i.e., there is at most one process running on the system) while all the others are waiting their turn.

Back

Device Controller

Front

A part of a computer system that makes sense of the signals going to, and coming from the CPU. There are many device controllers in a computer system. Any device connected to the computer is connected by a plug and socket, and the socket is connected to a device controller

Back

Process Management

Front

A process is a running program. Process management is the management of active programs. ➢ A process is a program in execution that needs resources. Program is a passive entity, process is an active entity. ➢ Single-threaded processes have one program counter specifying location of next instruction to execute. ➢ Multi-threaded processes have one program counter per thread. Management tasks in Process Management: ➢ 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. *A situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function is called deadlock.

Back

Multitasking

Front

An operating system feature that allows more than one application to run at a time. *Multitasking has the same meaning of multiprogramming but in a more general sense, as it refers to having multiple (programs, processes, tasks, threads) but NOT a whole program running at the same time. This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). At any time the CPU is executing one task only while other tasks waiting their turn.

Back

Two Types of Multiprocessing

Front

*Multiprocessor systems growing in use and importance Two types: 1. Symmetric Multiprocessing (BETTER!) 2. Asymmetric Multiprocessing • In symmetric multiprocessing many processors may be available for a single job and will be similar in terms of how they operate. • In asymmetric multiprocessing, there is a supervisor processor and slave processors; if the supervisor processor handling a specific work fails, the entire system will go down. This architecture initially was used before symmetric multiprocessing existed.

Back

Exception

Front

Any event that can alter normal CPU instruction execution flow. An interrupt is a subset of exceptions. Exception encompass MORE than interrupts and generally handle internal events that are abnormal like invalid instructions or illegal bus access.

Back

What is the difference between a multiprocessor system and a multicore?

Front

• Multiprocessing is the use of more than one CPU in a computing system, working parallel. • A Multicore system two or more CPUs work on the same chip; In other words, a single physical processor contains the logic of two or more CPUs (core logic). A subset of CPU's components duplicated and multiple cores can work in parallel on separate operations. *In a multiprocessor system performance will be increased in the case of dealing with multiple high intensity tasks. Considering that every processor has its own bus to main memory increases the capability. CPU1 CPU2 CPU3 \\ || // ---------------------- || Main Memory *Considering a multicore system as the cores as sharing the same system bus and main memory, it is generally slower even though might not be noticeable for most common tasks. However, more tasks can be done at once.

Back

Multiprocessing

Front

The simultaneous execution of two or more instructions (programs) at the same time. Unlike, multiprogramming, Nobody has to wait their turn.

Back

Difference between Multi- programming, tasking, processing and threading

Front

Multiprogramming was presented as a way to allow multiple programs being resident in main memory and (apparently) running at the same time. Multitasking refers to multiple tasks running (apparently) simultaneously by sharing the CPU time. Multiprocessing describes systems having multiple CPUs. Actually running at same time. Multithreading allows a single process to have multiple code segments (i.e., threads) run concurrently within the "context" of that process. *A command that requires a long time to finish will make an application unresponsive until this command is finished if it is not designed to run in a separate execution thread.

Back

Bootstrap Program

Front

Also known as firmware. Loaded at power-up or reboot: - Typically stored in ROM (Read Only Memory). - Initializes all aspects of system. - Loads operating system and starts execution. In short, a program stored in ROM that loads and initializes the operating system on a computer.

Back

I/O

Front

Input/Output. The communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system.

Back

Multithreading

Front

A technology that allows multiple parts or threads from a program to run simultaneously. Unlike multitasking, Nobody has to wait their turn.

Back

Front

OS acts as a resource allocator: - Manages all resources and In cases of conflicting requests, ensures efficient and fair resource use. OS acts as a control program: - Prevents errors and improper use of the computer system. OS is the core program running at all times on the computer; Everything else is either a system program or an application program.

Back

Storage Types

Front

➢ Main memory - Random Access and normally volatile ➢ Secondary storage - physical nonvolatile storage ➢ Magnetic disks - Disk divided into tracks and tracks divided into sectors (Ex: hard drives) ➢ Solid-state disks - faster than magnetic disks, nonvolatile. flash controller and memory As a main memory we have RAM (Random Access Memory) which maintains data while the device is powered on. This type of memory is a lot faster to read from and write to. **Also COMS w/ or w/o SRAM. Complementary Metal-Oxide Semiconductor (COMS). SRAM handles main memory with COMS and COMS implements registers and caches solo. • Secondary memory is mainly when we are talking about nonvolatile storage such as hard disk, removable media etc. The contents in these type of storage are not lost when the device is powered off. It has a continuous source of power and does not need to have its memory content periodically refreshed as in a volatile case. • Magnetic disks are basically what it is meant by its own name. The disk is divided into tracks and every track is divided into sectors. A process of magnetization is used to write rewrite and access data and it is covered by magnetic coating. Common magnetic disks are hard drives. All read and write information are performed on the sector level. (Solid state are not in this category). • SSD is non volatile and has two important parts; a flash controller (high read and write performance; communicates with the host device and manages flash file system) and flash memory chips (no power required to retain data). Unlike a hard disk drive (HDD use of magnetic) SSD has no moving parts. Normally in HDD there is a spinning disk with a read/write mechanical arm called an actuator. An SSD reads and writes to interconnected flash memory chips made out of silicon OTHER: *Optical disks (CDs, DVDs, Blu-ray disks, etc..) are any computer disk that uses optical storage techniques and technology to read and write data by using laser beams. An optical disk is primarily used as a portable and secondary storage device. It can store more data than the previous generation of magnetic storage media, and has a relatively longer lifespan. *Tape (magnetic) remains a viable alternative disk in some situations due to its lower cost. It is mainly used for backup in the case of a necessary media removability.

Back

Three Components of OS

Front

➢Processes: Process Management Process Scheduling ➢ Memory: Virtual Memory Page Tables ➢ Storage: Block Storage File systems MSDOS & UNIX FS Case studies PMS!

Back

Register

Front

A processor register (CPU register) is one of a small set of data holding places that are part of the computer processor that may hold an instruction, a storage address, or any other kind of data. Some instructions specify registers as part of the instruction. For example, an instruction may specify that the contents of two defined registers be added together and then placed in a specified register.

Back

Memory Management

Front

Operating system activity that optimizes the use of internal random access memory (RAM). The act of keeping track of how and where programs are loaded in main memory. ➢ All instructions in memory. ➢ Memory management determines what is in memory. 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.

Back

CPU

Front

Alternately referred to as a processor, the CPU is the central processing unit of a computer. A computer's CPU handles all instructions it receives from hardware and software running on the computer. NOTE: The CPU is often referred to as the brain of the computer. However, it is more appropriate to refer to software as the brain.

Back

List of Computing Environments

Front

Distributed, Client-Server, Peer-to-Peer and Virtualization

Back