Sie sind auf Seite 1von 6

CSCE 313-501 DEFINITIONS

Chapter 1 1.1 & the Basic Elements 1. There are four main structural elements of a computer including the processor, main memory, I/O modules, and the system bus a. Processor also known as the CPU, controls the operation of the computer and performs its data processing functions b. Main memory also known as real or primary memory, it is typically volatile and stores data and programs c. I/O modules these move data between the computer and its external environment (including secondary memory, communications equipment, terminals) d. System bus this provides communication among processors, main memory, and the I/O modules 1.3 & Instruction Execution 1. The program counter (PC) contains the address of the next instruction to be fetched. This is then loaded into the instruction register (IR). The processor then interprets this and performs the required action, being one of the following: a. Data transfer between the processor and memory or the processor and I/O b. Data processing involving some arithmetic or logical operation on the data c. Control which involves altering the PC to specify the next instruction address 1.4 & Interrupts 1. There are four classes of interrupts including: program (instruction execution error arithmetic overflow, division by zero, reference outside users allocated memory, or an illegal machine instruction), timer (over designated time limit), I/O (signaling normal or flawed completion of an operation), and hardware failure (power or memory parity error) 2. When an interrupt occurs, the current state is saved in a stack and the PC points to the entry location of the interrupt handling machine. The interrupt handler will process the interrupt and then return control to the processor and reset the PC to the previous process

3. If an interrupt occurs while another is being processed there are two ways of dealing with it: strict sequential order (pending the request until finished), or by priority

Chapter 2 2.2 & the Evolution of Operating Systems 1. Serial Processing users had access to the computer in series and that access occurred via a punch card containing the users programs 2. Simple Batch Systems used a monitor, which was simply a computer program, which would interact with the user and then give the CPU control to execute the program. Then, at termination, the CPU would return control back to the monitor which would produce the output a. Used JCL, job control language, to provide instructions to the monitor b. First introduced the concepts of modes specifically user mode (where certain areas of memory are restricted, as well as certain instructions) vs. kernel mode (where privileged instructions and protected memory was accessible) 3. Multiprogrammed Batch Systems a system which cuts down on idle time due to waiting on I/O. It involves expanding memory to hold three, four, or more programs and switch among them while one program is waiting on I/O a. Due to multiprogramming, there must be a means of time sharing and memory management if multiple programs must remain in main memory at once processor time must be shared among multiple users via terminals b. To simplify time sharing (whose objective was to minimize response time), a practice known as time slicing was implemented which, at regular time intervals, the current user is preempted and another user is loaded in c. The principal objective of multiprogramming was to maximize the processor use 4. The OS must manage the various resources available to it (main memory space, I/O devices, and processors) and to schedule their use by the various active processors 2.3 & Major Achievements 1. Processes or programs in execution on a processor, sometimes referred to as jobs, consisting of an executable program, the associated data needed by the program (variables, work spaces, buffers), and the execution context of the program

a. The execution context, or process state, includes the information necessary for the OS to manage the process (priorities) and the processor to execute the process properly b. A thread is a single process, which is assigned certain resources, and can be broken down into multiple, concurrent threads that team up to perform the process 2. Virtual Memory is a facility allowing multiple users jobs to reside in main memory concurrently. Main memory consists of a number of fixed-length frames (page size). For a program to execute, some or all of its pages must be in main memory. Otherwise they reside in Disk memory (secondary) which can hold many fixed-length pages. Pages for all programs plus the OS are on disk, as files 2.7 & Microsoft Windows Overview 1. Windows separates application-oriented software from core OS software. The OS software runs in kernel mode and includes the Executive, Kernel, device drivers, and hardware abstraction. Windows has a highly modular architecture which allows for any module to be removed or upgraded without rewriting the entire system or standard APIs a. Executive Contains core OS services such as: memory management, process and thread management, security, I/O, and inter-process communication i. The specific modules of the Executive manage the following: I/O, Cache, Objects, Plug-and-play, Power, Security reference, Virtual memory, Processes & Threads, Configuration, and the ALPC (Advanced Local Procedure Call) b. Kernel Controls execution of the processors, manages thread scheduling, process switching, exception/interrupt handling, and multi-processor synchronization. The Kernels code doesnt run in threads, unlike all other levels c. HAL (Hardware Abstraction Layer) Maps between generic hardware commands and responses and those unique to a specific platform d. Device Drivers Dynamic libraries extending the Executives functionality 2. The rest of the processes, running in user mode, have limited access to system data a. Special System Processes Manage the session manager, authentication subsystem, service manager, and logon process b. Service Processes Include the printer spooler, event logger, network services c. Environment Subsystems Provide different OS environments (Win32, POSIX) and convert user application calls to ALPC calls

d. User Applications Run *.exe (executables) and DLLs that provide functionality 3. Windows relies heavily on OOP and with it are four main principles: Encapsulation (protection from unauthorized use), Classes/Instances, Inheritance, and Polymorphism (creating a function with the same name but different behavior established at runtime) a. A handle is an index into a per-process Executive table containing a pointer to the referenced object. When an object is created, the handle is returned to the creator.

Chapter 3 3.2 & Process States 1. A process consists of two essential elements program code and a set of data. While a program is executing, there are a number of unique variables associated with that process: a. Identifier, State (running, idle), Priority, Program Counter (address of the next instruction), Memory Pointers, Context Data (data present in registers in the process while running), I/O status, Accounting Information (processor and clock time used, time limits) b. All the above is stored in a process control block created & maintained by the OS 2. A new process is created for one of four reasons: there is a new batch job, a new interactive login, its created by the OS to provide a service (print spooler), or it is spawned by an existing process (parent child processes) 3. A process is terminated because of normal completion, time limit exceeded (in running), memory unavailable, bounds violation, protection/arithmetic error, time overrun (in waiting), I/O failure, invalid/privileged instruction, data misuse, OS intervention, parent termination/request 4. Models for Representing a Process Life-cycle a. Two-State Model consists of a single FIFO queue operating in round-robin fashion with one of two states, Running/Not Running b. Five-State Model consists of five states, New/Ready/Running/Blocked/Exit and stores non-running processes in complex queue. The transition process is complex as well as there are many options: i. Null New, New Ready, Ready Running, Running Exit, and Running Ready (generally because of a time overrun or priority block),

Running Blocked, Blocked Ready, Ready Exit (parent terminated), and Blocked Exit (parent terminated) ii. The waiting processes can either be stored in various ways first being two FIFO queues either Ready/Blocked. Then, once an event occurs, the OS scans the entire blocked queue to find the now Ready process. Otherwise, implement one Ready queue and a series of Blocked queues (one for each event). Another refinement would be a priority scheme. c. Six-State Model identical to the Five-State Model above except for the addition of a Suspend state. If the OS wants to swap a Blocked Process to disk memory to free up main memory, there exists a suspend queue to house these processes. The OS can make a choice, once its free; to next bring in a previously suspended or new process d. Seven-State Model identical to the Five-State Model except for the addition of two states, Ready/Suspend and Blocked/Suspend, to clarify the Six-State Model and accommodate those waiting in the Suspend queue while ready, or awaiting an event i. There are five reasons for suspension including: swapping (OS needs to release main memory), other OS reason, an Interactive User request, Timing (waiting for next interval), or because of a parent process request 3.3 & the Process Description 1. In order for the OS to manage and control a process, it must know where it is located along with a collection of its attributes known as the process image. The process image contains the user data, program, stack (for storing parameters and system calls), and the process control block (also known as task control block and process descriptor) 2. The PCB, or process control block, consists of three elements: process identification, processor state information, and process control information a. The process identification contains numeric identifiers of the process, parent process, or user that created the process b. The processor state information consists of the contents of the processor registers c. The process control information is additional information needed by the OS to control and coordinate the various active processes 3.4 & Process Control 1. Process creation is as follows: the OS assigns a unique identifier to the new process space is allocated PCB is initialized linkages are set data structures are new/edited

2. Mode switching occurs when an interrupt is pending. The program counter will be set to the starting address of the interrupt handler program and the processor will switch from user to kernel mode. The interrupt is processed and the mode is switched back to user 3. Process switching is when the OS gains control of a currently running process due to an interrupt occurrence, trap, or supervisor call (consider the process model diagrams) a. In the case of a process switch, many steps are involved: save the context of the processor (PC and registers) update PCB (including change of state) move PCB to appropriate queue (Ready, Blocked) select new process update PCB of new process update memory management data structures restore processor context by loading previous values of the PC and other registers 3.5 & the Execution of the Operating System 1. Non-process Kernel the process is considered to only apply to user programs whereas the OS code is executed as a separate entity operating in privileged mode 2. Execution within User Processes within a process, both the user and OS programs may execute, and the OS programs that execute in the various user processes are identical 3. Process-based OS where major kernel functions are organized as separate processes
P 1 P 2 Kernel P n
P 1 O S P 2 O S P n O S

P 1

P 2

P n

O S

O S

Process-switching f(n)s

Process-switching f(n)s

3.6 & Security Issues 1.

Das könnte Ihnen auch gefallen