Operating systems

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

User-level thread

ULT are unknown to the OS and are created and managed by a threads library that runs in the user space of a process. User-level threads are very efficient because a mode switch is not required to switch from one thread to another.However, only a single user-level thread within a process can execute at a time, and if one thread blocks, the entire process is blocked.

Message

Used by IPC, or by threads.

Virtual address

Used by paging systems. Allows processes to be comprised of a number of fixed-size blocks, called pages. A program references a word by means of a virtual address consisting of a page number and an offset within the page. Each page of a process may be located somewhere in main memory. The paging system provides for a dynamic mapping between the virtual address used in the program and a real address, or physical address, in main memory.

Child process

When a process is spawned by another process, the spawned process is called the child process. It's parent process is the one who spawned it.

Process Table

When a process is suspended temporarily, all the relevant information (the resources listed above) is save in this table, which is an array of structures one for each process currently in existence.

Port

When running a process/thread a port can refer to Exception/debugging ports Termination ports

Monitor

With a simple batch-processing scheme, this type of OS, the user no longer has direct access to the processor. Instead the user submits the job on cards or tape to a computer operator, who batches the jobs together sequentially and places the entire batch on an input device, for use by the monitor. Each program is constructed to branch back to the monitor when it completes processing, at which point the monitor automatically begins loading the next program. The monitor controls the sequence of events. The monitor must always be in main memory and available for execution. The rest of the monitor consists of utilities and common functions that are loaded as subroutines to the user program at the beginning of any job that requires them.

Real address

A real address in memory or on secondary memory. What a paging system translates to when given a virtual address.

Binary semaphore

A semaphore that takes on only the values of 0 and 1.

Weak semaphore

A semaphore whose queue does not specify the order in which processes are removed from the queue

Strong semaphore

A semaphore whose queue implements a FIFO

Batch system

A batch OS which can only run 1 program at a time. Each program is constructed to branch back to the monitor when it completes processing, at which point the monitor automatically begins loading the next program.

Multiprogrammed batch system

A batch system that implements multiprogramming

Blocked process state

A blocked process is waiting for the completion of some event, such as an I/O operation.

Process

A collection of one or more threads and associated system resources (such as memory containing both code and data, open files, and devices). This corresponds closely to the concept of a program in execution. By breaking a single application into multiple threads, the programmer has great control over the modularity of the application and the times of application-related events.

Operating system

A computer is a set of resources for the movement, storage, and processing of data and for the control of these functions. The OS is responsible for managing these resources.

Thread

A dispatchable unit of work. It includes processor context (which includes the program counter and stack counter) and its own data area for a stack (to enable subroutine branching). A thread executes sequentially and is interruptible so the process can turn to another thread.

Monolithic kernel

A large kernel that provides scheduling, file system, networking, device drivers, memory management, and more. Typically implemented as a single process, with all elements sharing the same address space.

Address Space

A list of memory locations from 0 to some maximum which the process can read and write. It contains the executable program (the instructions), the program's data, and the stack

Stack pointer

A pointer to the data location of the top of the stack updated when a function is called because a stack frame is put onto the stack and the top of the stack changes.

Process state

A process can have 5 states 1.New 2.Running 3. Blocked 4.Ready 5.Exit

Exit process state

A process that has been released from the pool of executable processes by the OS, either because it halted or because it aborted for some reason.

New process state

A process that has just been created but has not yet been admitted to the pool of executed processes by the OS. Typically, a new process has not yet been loaded into main memory although its process control block has been created.

Parent process

A process that has spawned child processes that are still executing

Concurrent process

A process that implements more than one thread running concurrently

Central Processing Unit (CPU)

A processor where the most amount of processing is completed. And where processing is centralized to.

Process

A program in execution

Instruction

A program to be executed by a processor consists of a set of instructions stored in memory

Job

A single program, could involve loading the compiler plus the high level language program (source code) into memory, saving the compiled program (object program), and then loading and linking together the object program and common functions.

Race condition

A situation in which multiple threads or processes read or write a shared data item and the final result depends on the relative timing of their execution

Multiprocessor

A symmetric multiprocessor can be defined as a stand-alone computer system with the following characteristics:1. There are two or more similar processors of comparable capability 2. These processors share the same main memory and I/O facilities and are interconnected by a bus or their internal connection scheme, such that memory access time is approx. the same for each processor. 3. All processors share access to I/O devices, either through same channels or through different channels that provide paths to the same device 4. All processors can perform the same functions (hence symmetric) 5. The system is controlled by an integrated operating system that provides interaction between processors and their programs at the job, task, file, and data element levels.

Uniprogramming

A system that can run only one program at a time. No concurrency.

Time-sharing system

A system that implements time sharing

Multithreading

A technique in which a process, executing an application is divided into threads that run concurrently.

Round-robin

A technique in which it employs a circular queue for processes with time devoted to processors

Process

A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.

User mode

A user program executes in a user mode, in which certain areas of memory are protected from the users use and in which certain instructions may not be executed. Less privileged mode in comparison to kernel mode. User programs typically execute in the mode. Limits the functions of the OS that a process can call.

Each process has

Address Space Resources Core Image Process Table

Process switch

After an interrupt a processor may switch the currently running process into a blocked/ready state and SWITCH to start running a different process that is currently in a ready state.

Concurrency

Allowing for threads/processes to run in parallel. To run concurrently.Key terms Atomic operation, Critical section, Deadlock, Livelock, Mutual exclusion, Race condition, Starvation

Nucleus

Also called kernel

Data register

Also referred to as the Memory Data Register. Contains the data to be stored in the computer storage or the data after a fetch from the computer storage. Acts like a buffer and holds anything that is copied from the memory read for the processor to use it.

Termination port

An IPC channel to which the process manager sends a message when the threads terminates. (Used by the subsystem)

Symmetric multiprocessing

An SMP operating system manages processor and other computer resources so that the user may view the system in the same fashion as a multiprogramming uniprocessor system. A user may construct applications that use multiple processes or multiple threads within processes without regard to whether a single processor will be available. § Simultaneous concurrent processes or threads. § Scheduling § Synchronization § Memory management § Reliability and fault tolerance

Core Image

An address space of a suspended process, and its process table entry is called the core image of the process.

Process

An instance of a program running on a computer

Counting/General semaphore

An integer value used for signalling processes. Only three operations may be performed on a semaphore, all of which are atomic, initialize, decrement, and increment. The decrement operation may result in the blocking of a process and the increment operation may result in the unblocking of a process.

Privileged instructions

Certain machine level instructions are designated privileged and can be executed only by the monitor. If the processor encounters such an instruction while executing a user program, an error occurs causing the control to be transferred to the monitor. Among the privileged instructions are I/O instructions, so that the monitor retains control of all I/O devices. This prevents, for example, a user program from accidentally reading hob control instructions from the next job. If a user program wishes to perform I/O, it must request that the monitor perform the operation on it.

Trace

Characterize behaviour of an individual process by listing the sequence of instructions that execute for that process. Such a listing is referred to as a trace of the process. We characterize behaviour by how the traces are interleaved.

Register

Contained within the CPU and there is a variety of registers to aid in processing. These registers can be 1. Program counter 2. Instruction Register 3. Memory address register 4. Memory buffer register 5. I/O address register 6. I/O buffer register

Program status word

Contains the condition code bits, which are set by comparison instructions, the CPU priority, the mode (user or kernel), and various other control bits. Users may read the whole register but usually only allowed to write to parts.

Processor

Controls the operation of the computer and performs its data processing functions. When there is only one processor, it is often referred to as the central processing unit (CPU).

Process Control Block

Data needed by the OS to control the process.

Locality

During the course of execution of a program, memory references by the processor, for both instructions and data, tend to cluster. Programs typically contain a number of iterative loops and subroutines. Once a loop or subroutine is entered, there are repeated references to a small set of instructions. Localizing the memory and instructions needed to fetch.

Stack

Each process has one or more LIFO stacks associated with it. A stack is used to store parameters and calling addresses for procedure and system calls.

Lightweight process

Essentially a kernel-level thread

Task

Essentially an instruction or a set of instructions. A task can refer to a program or a subroutine of a program.

Privileged mode

Essentially kernel mode, where the processor can process privileged instructions

Secondary memory

External non-volatile memory also referred to as auxiliary memory. Used to store program and data files, and are usually visible to the programmer only in terms of files and records as opposed to individual bytes or words.

Auxiliary memory

External non-volatile memory also referred to as secondary memory. Used to store program and data files, and are usually visible to the programmer only in terms of files and records as opposed to individual bytes or words.

Semaphore

For both counting and binary semaphores, a queue is used to hold processes waiting on a semaphore. The question arises of the order in which processes are removed from such a queue. The fairest removal policy is FIFO.

Deadlock

For example, consider to Processes P1 and P2, and two resources, R1 and R2. Suppose that each process needs access to both resources to perform part of its function. Then it is possible to have the following situation: the OS assigns R1 to P2 and R1 to P1. Each process is waiting for one of the two resources. Neither will release the resource that it already has access to until it has acquired the other resource and performed the function requiring both resources. These two processes are deadlocked.

Interrupt-driven I/O

For the processor to issue an I/O command to a module and then go on to some other useful work. The I/O module will then interrupt the processor. The processor then executes the data transfer, as before, then resumes its former processing.

Virtual memory

Has a virtual address which is used by a paging system to access this memory from an auxiliary or secondary memory location.

Virtual machine

Having multiple instances of machines on the same processor.

Program counter

Holds the address of the next instruction to be fetched. Unless instructed otherwise, the processor always increments the PC after each instruction fetch so that it will fetch the next instruction in sequence.

Exception/debugging ports

IPC channels to which the process manager sends a message when one of the process's threads causes an exception. Normally, these are connected to environment subsystems and debugger processes, respectively.

Mode switch

If an interrupt is pending, the processor sets the program counter to the starting address of an interrupt handler program, then it switches from user mode to kernel mode so that the interrupt processing code may include privileged instructions. Therefor mode switching is when the processor switches from user mode to kernel mode

Time sharing

If it is a multiprogramming system that allows for interactivity then it is called time-sharing.Processor time is shared among multiple users. In a time-sharing system, multiple users simultaneously access the system through terminals, with the OS interleaving the execution of each user program.

Coarse threading

Individual modules, called systems are assigned to individual processors. In the source engine case, this would mean putting rendering on one processor, AI on another, physics on another... Basically, each major module is single threaded and the principal coordination involves synchronizing all the threads with a timeline thread.

2 types of system interrupts

Interrupt, Trap

Interrupt

Interrupts are provided primarily as a way to improve processor utilization.

Swapping

Is an I/O operation which involves moving part or all of a process from main memory to disk.This is where the suspend state is brought in, when all of the processes is main memory are in the blocked state, the OS can suspend one process by putting it in the suspend state and transferring it to disk, The space that is freed in main memory can then be used for another process.

Cache Memory

Is intended to provide memory access time approaching that of the fastest memories available and at the same time support a large memory that has the prices of less expensive types of semiconductor memories. There is a relatively large and slow main memory together with a smaller, faster cache memory. The cache contains a copy of a portion of main memory. When the processor attempts to read a byte or word of memory, a check is made to determine if the byte or word is in the cache. If so, the byte or word is delivered to the processor. If not, a block of main memory, consisting of some foxed number of bytes is read into the cache and then the byte or word is delivered to the processor.

Kernel

It is a large area of code with various system calls that has direct access to the machines hardwareMain functions: Interrupt/trap handling, Process management, Concurrency

Kernel-level thread

KLT are threads within a process that are maintained by the kernel. Because they are recognized by the kernel, multiple threads within the same process can execute in parallel on a multiprocessor and the blocking of a thread does not block the entire process.However, if there are user-level threads and kernel-level threads then a mode switch must occur when switching the execution of threads.

Fine-grained threading

Many similar or identical tasks are spread across multiple processors. For example. A loop that iterates over an array of data that can be split up into a number of smaller parallel loops in individual threads

Multiprogramming

Must rely on certain computer hardware features. The most notable additional feature that is useful for multiprogramming is the hardware that supports I/O interrupts and direct memory access. With interrupt-driven I/0 or DMA, the processor can issue an I/O command for one job and proceed with the execution of another. Once the I/O is completed an interrupt is called on the processor and its control is passed to an interrupt handling program in the OS. ~ Batch processing with memory management, it allows for the processor to handle multiple batch jobs at a time. It can also be used to handle multiple interactive jobs (time sharing).

Time slicing

Partially a method of time sharing. A different technique where the processor switches at a constant interval to the next program and continues processing there, then switches to the nextA system clock generated interrupts at a rate of approx. one every 0.2 seconds. At each clock interrupt, the OS regained control and could assign the processor to another use.

Pre-empt

Pre-empting is defined to be the reclaiming of a resource from a process before the process has finished using it

Resident monitor

Primitive type of OS, mainly used in batch systems

Memory management

Process isolation § The OS must prevent independent processes from interfering with each other's memory, both data and instructions ~ Automatic Allocation and management § Programs should be dynamically allocated across the memory hierarchy as required. Allocation should be transparent to the programmer. This, the programmer is relieved of concerns relating to memory limitations, and the OS can achieve efficiency by assigning memory to jobs only as needed ~ Support of modular programming § Programmers should be able to define program modules, and to create, destroy, and alter the size of modules dynamically. ~ Protection and access control § Sharing of memory, at any level of the memory hierarchy, creates the potential for one program to address the memory space of another. This is desirable when sharing is needed by particular applications. At other times, it threatens the integrity of programs and even the OS itself. The OS must allow portions of memory to be accessible in various ways by various users. ~ Long-term storage § Many application programs require means for storing information for extended periods of time, after the computer has been powered down.

Multicore

Processor with multiple cores. See Multiprocessor chip

Classes of interrupts

Program Timer I/O Hardware failure

System bus

Provides communication among processors, main memory and I/O modules.

Busy waiting

Refers to a technique in which a process can do nothing until it gets permission to enter its critical section but continues to execute an instruction or set of instructions that tests the appropriate variable to gain entrance.

Temporal Locality

Refers to the tendency for a processor to access memory locations that have been used recently. For example, when an iteration loop is executed, the processor executes the same set of instructions repeatedly on the same memory locations. Batch processing ~ Execution of a series of programs on a computer without manual intervention. Strictly speaking, it is a processing mode.

Spatial locality

Refers to the tendency to involve a number of memory locations that are clustered. This reflects the tendency of a processor to access instructions sequentially. It also reflects the tendency of a program to access data locations sequentially, such as when processing a table of data.

Resources

Registers (including the program counter and stack pointer), a list of open files, outstanding alarms, lists of related process and all other info needed to run the program.

Scheduling

Scheduling for use of batch systems: Most installations used a hardcopy sign-up sheet to reserve computer time. Typically, a user could sign up for a block of time in multiples of a half hour or so. A user might sign up for an hour and finish in 45 minutes; this would result in wasted computer processing time.

Multitasking

See Multiprogramming

Spin waiting

See busy waiting

System mode

See kernel mode/privileged mode/control mode

Physical address

See real address

Mutual exclusion lock (mutex)

Similar to a binary semaphore. A key difference between the two is that the process that locks the mutex (sets the value to 0) must be the one to unlock it (sets the value to 1). In contrast, it is possible for one process to lock a binary semaphore and for another process to unlock it.

Address Register

Specifies the address in memory for the next read or write

Main memory

Stores data and programs. This memory is typically volatile; that, when the computer is shut down, the contents of the memory are lost. In contrast, the contents of the disk memory are retained even when the computer system is shut down. Main memory is also referred to as real memory or primary memory.

Instruction register

Stores the instruction currently being executed or decoded.

Starvation

Suppose that three processes P1, P2, and P3 each require periodic access to resource R. Consider the situation in which P1 is in possession of the resource. When P1 exits its critical section, either P2 or P3 should be allowed to access R. Assume that the OS grants access to P3 and that P1 again requires access to R before P3 completes its critical section. If the OS grants access to P1 after P3 has finished and continues the cycle of P1 to P3 to P1 to P3 etc.... then P2 may indefinitely be denied access to the resource, even though there is no deadlock situation.

Critical resource

Suppose two or more processes require access to a single non-sharable resource, such as a printer. During the course of execution, each process will be sending signals to the I/O device, receiving status information, sending data, and/or receiving data. This is a critical resource.

Suspendeded process state

Suspended means that part or all of the process image is in secondary memory/disk/virtual memory. So before it can be brought back into a running state it must be loaded into main memory.

Programmed I/O

The I/O module performs the requested action and then sets the appropriate bits in the I/O status register but takes no further action to alert the processor. In particular it does not interrupt the processor. Thus, after the I/O instruction is invoked, the processor must take some active role in determining when the I/O instruction is completed. With programmed I/O, the processor has to wait a long time for the I/O module of concern to be ready for either reception or transmission of more data. The processor, while waiting must repeatedly interrogate the status of the I/O module. As a result, the performance level of the entire system is severely degraded.

Serial processing

The act of processing in single jobs, serially. The user cannot interact with the system, so the user cannot enter data for execution after execution has already started.

Blocking

The action of blocking a thread/process from accessing a resource because another thread/process is using it.If two processes both wish to access a single resource, then one process will be allocated that resource by the OS, and the other will have to wait. Therefore, the process that is denied access will be slowed down. In an extreme case, the blocked process may never get access to the resources and will never terminate successfully.

Mean time to repair

The average time it takes to repair or replace a faulty element.

Cache slot

The cache consists of C slots (also referred to as lines) of K words each, and the number of slots is considerably less than the number of main memory blocks. Some subsets of the blocks of main memory resides in the slots of the cache. If a word in a block of memory that is not in the cache is read, that block is transferred to one of the slots of the cache.

Execution context

The context of which a program is run. Usually contain implicit and explicit assumptions about resources available at the time of execution. Like thing built into the OS, libraries.

Mutual exclusion

The control problem that two program can't share a resource so only one can be allowed in its critical section at a time.

Process

The entity that can be assigned to and executed on a processor

Hit ratio

The fraction of all memory access that are found in faster memory (e.g., the cache), T1 is the access tome to level 1, and T2 is the access time to level 2. As can be seen, for high percentages of level 1 access, the average total access time is much closer to that of level 1 than level 2.

Stack

The main reason for having a stack is to keep track of the point to which each active subroutine should return control when it finishes executing. An activation of a subroutine pushes a new stack frame onto the stack. Basically a FIFO queue for stack frames. Stack frame ~ A frame of data that gets pushed onto the stack. In the case of a call stack, a stack frame would represent a function call and its argument data. ~ The function return address gets pushed onto the stack first then the arguments and space for local variables. Together it makes a frame.

User data

The modifiable part of the user space. May include program data, a user stack area, and programs that may be modified

Kernel mode

The monitor executes in a system mode, or what has come to be called kernel mode. In which privileged instructions may be executed and in which protected areas of memory may be accesses.

Message passing

The passing of messages between processes/threads to synchronize and just overall communicate.

Critical section

The portion of the program that uses it as a critical resource is the critical section of the program. It is important that only one program at a time that be allowed in its critical section.

Instruction cycl e

The processing required for a single instruction. Using a simplified two step description, the instruction cycle is the two steps referred to as the fetch stage and the execute stage.

User program

The program to be executed

Running process state

The running process is that process that is currently being executed by the processor. In a multiprocessor system, more than one process can be in this state.

Atomic

The term atomic means that the instruction is treated as a single step that cannot be interrupted.

Mean time to failure

The term correct operation means the correct execution of a set of programs and the protection of data from unintended modification. The reliability of a system is defined as the probability of its correct operation up to time t given that system was operating correctly at time t=0. So the mean time to failure is mean time in between a program having an unintended modification.

Process image

The typical elements of the process image are Process Control Block User data User program Stack

Chip multiprocessor

This combines two or more processors called cores on a single piece of silicon called a die. Typically, each core consists of all of the components of an independent processor, such as registers, ALU, pipeline hardware, and control unit, plus L1 instruction and data caches. In addition to the multiple cores, contemporary multicore chips also include L2 cache and, in some cases L3 cache.

Hybrid threading

This involves the selective use of fine-grained threading for some systems and single threading for other systems.

Job control language

This is a special type of programming language used to provide instructions to the monitor.

Microkernel

This kind of architecture assigns only a few essential functions to the kernel, including address spaces, interprocess communication and basic scheduling. Other OS services are provided by other processes, sometimes called servers, that run in user mode and are treated like any other application by the microkernel. ~ This decouples kernel and server development. Servers may be customized to specific application or environment requirements.

Ready process state

process stateA ready process is one that is not current executing but that is ready to be executed as soon as the OS dispatches it

Memory hierarchy

§ Decreasing cost per bit § Increasing capacity § Increasing access time § Decreasing frequency of access to the memory by the processor


Conjuntos de estudio relacionados

Essentials of Psychiatric Mental Health Nursing Chapters 1-24

View Set

Set12_news, congrats,what about,correct

View Set

PrepU Atraumatic care of children and families

View Set