Free Essay

Multiprogramming

In:

Submitted By kyarios
Words 461
Pages 2
Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor , there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one program, then part of another, and so on. To the user it appears that all programs are executing at the same time.
If the machine has the capability of causing an interrupt after a specified time interval, then the operating system will execute each program for a given length of time, regain control, and then execute another program for a given length of time, and so on. In the absence of this mechanism, the operating system has no choice but to begin to execute a program with the expectation, but not the certainty, that the program will eventually return control to the operating system.
If the machine has the capability of protecting memory , then a bug in one program is less likely to interfere with the execution of other programs. In a system without memory protection, one program can change the contents of storage assigned to other programs or even the storage assigned to the operating system. The resulting system crashes are not only disruptive, they may be very difficult to debug since it may not be obvious which of several programs is at fault.
Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor , there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one program, then part of another, and so on. To the user it appears that all programs are executing at the same time.
If the machine has the capability of causing an interrupt after a specified time interval, then the operating system will execute each program for a given length of time, regain control, and then execute another program for a given length of time, and so on. In the absence of this mechanism, the operating system has no choice but to begin to execute a program with the expectation, but not the certainty, that the program will eventually return control to the operating system.
If the machine has the capability of protecting memory , then a bug in one program is less likely to interfere with the execution of other programs. In a system without memory protection, one program can change the contents of storage assigned to other programs or even the storage assigned to the operating system. The resulting system crashes are not only disruptive, they may be very difficult to debug since it may not be obvious which of several programs is at fault.

Similar Documents

Free Essay

Process Management

...INTRODUCTION The common statement we use to define a process is that a process is a program in execution. In more detailed version we can say that a process is a sequence of interdependent and linked procedures which at every stage consumes one or more than one resources to convert inputs into outputs. These outputs then serves as an input for the next stage until a known goal or an end result is achieved. A process in execution needs resources like processing resources, memory, input output resources. Today’s machines do allow several processes to share resources. Basically, one processor is shared among various processes. A process is like a program code which is known as text section. It includes current activity represented by the value of the program counter and the contents of processor’s register. A process also includes the process stack which contains temporary data that includes local variables and a data section which includes global variable. A process also may include a heap that is a memory dynamically allocated during the running time of a process. The main difference between a program and a process is that a program is a passive entity such as a file contains a list of instructions stored in a disk. Whereas a process is an active entity with a program counter specifies the next instruction to be executed and the set of resources associated with it. A particular program...

Words: 515 - Pages: 3

Free Essay

Memory Management Requirements

...Memory Management Requirements Effective memory management is vital for multiprogramming. The first goal of memory management is to pack in main memory as many processes as possible, and in order to meet this goal, there are five requirements a memory management system needs to satisfy. These requirements include the following: 1. Relocation In a multiprogramming system, the available main memory is shared among a number of processes. It is not possible for the programmer to know which programs will be already running in the memory while writing the code. In addition, swapping is important to move processes in and out of main memory to maximize processor utilization by providing a large pool of ready processes to execute. Once the program is swapped out to disk, it would be quite limiting to specify that when it is next swapped back in, it must be placed in the same memory region as before. Instead, we may need to relocate the process to a different area of memory. The operating system will need to know the location of process control information and the execution stack, as well as the entry point to begin execution of the program for this process. In addition, however, the processor must deal with memory references within the program. The processor hardware and the operating system software must be able to translate the memory references found in the code of the program into actual physical memory addresses, reflecting the current location of the program in the main memory...

Words: 552 - Pages: 3

Premium Essay

Pos 355 Final Exam Answers

...NAME: David Sauerbrei POS355 Week 5 Final Exam This is an open-book, open-notes exam. You may consult the textbook, lectures and PowerPoint slides, but no other source. This exam must be an individual effort. Each question is worth one-half point. The total point value of this exam is 20 points. Please post your completed exam in the Assignments area by 11:59 p.m. Monday, May 14. 1. The operating system serves as an intermediary between the user and the computer hardware. (True / False) ANSWER: True 2. The operating system serves as an intermediary between a process and the computer hardware. (True / False) ANSWER: False 3. This is the brain of a computer. a. smart card b. artificial intelligence c. logical address d. read-only memory e. central processing unit ANSWER: e 4. When a single user runs two copies of the same program concurrently (for example, two instances of NotePad), two processes are created. (True / False) ANSWER: True 5. The following operating systems were developed by Microsoft: a. Mac OS b. Linux c. Solaris d. all of the above e. b and c only f. none of the above ANSWER: f 6. A _______________ operating system supports a system that has rigid time requirements on the CPU and data flows. ANSWER: Real-time 7. Time-sharing requires the following. a. process scheduling b. process protection c. deadlock...

Words: 1596 - Pages: 7

Free Essay

Computer and Technology

...Exercise 2 Question 1 a) To lower the cost of of providing computing capability, time-sharing and multiprogramming made it possible for individuals and organizations to use ocmputer without owning one (such as in Internet Cafes, laborities in school, etc.). It also promotes the interactive sense of using computers. Some computer laboratories in schools as an instance. Because users share the system simultaneously, they have the opportunity to copy other user's file from the system. Once a user saves a file to his/her unit, other users of that group or connected system may also have an access to the file. Other users may change an information inside the file or even steal the file from the owner itself without the owner knowing it. They may also modify the files or programs that was saved or ran by the owner. Furthermore, some of the threats that the owner of a certain file may encounter is the data confidentiality. Without him not being aware of the system used as the time-sharing and multiprogramming, he may insert or have a secret or confidential data that he wants to remain at the file. Another one is the data integrity. Other users may change, add, or even remove some information in the file if he wants to.       Internet cafes also have a multiprogramming and time-sharing environment. Some internet cafes have hardwares like printers that is also connected with the system. State that a certain user is asking the attendant to print...

Words: 719 - Pages: 3

Premium Essay

Ifsm 310 Quiz 4

...interpreters. 6. What is a transaction manager? 7. List and define the four properties of a transaction. 8. What is a Java Virtual Machine? 9. What is the purpose of an In-Circuit Emulator (ICE)? 10. What is an I/O subsystem? Provide three examples of an I/O subsystem. 11. What is the difference between parallel and serial data transmission? Which would you use for transmitting data over long distances and explain why? 12. What is the difference between rigid and solid state drives? 13. Describe the purpose of an interrupt. 14. Describe how multiple I/O devices are connected to the CPU. 15. What is the difference between multiprogramming and multiprocessing? Multiprogramming and multithreading? 16. Cloud Computing is used as a means to provide off-site computing power to an organization. Describe the three main types of Cloud Computing platforms. 17. What is the purpose of the control unit in a channel architecture? What type of computer generally uses this approach? 18. What are the computer system requirements for handling I/O devices? 19. What are the four pieces of data required for CPU to initiate a DMA (Direct Memory Access) transfer? 20. List and describe the three addressing...

Words: 276 - Pages: 2

Free Essay

Memory Management

...Memory management is basically managing computer memory. The memory needs to provide ways to allocate portions of the memory for programs to access which is very important for the computer. Memory management requirements, consists of relocating, protection, sharing, and the logical and physical organization of programs or devices that the computer uses. The multiprogramming system memory is separated in to smaller processes to receive multiple processes. Memory management is important for a multiprogramming system. If the processor will only allow one program to process, then the rest of the programs will be waiting. So to utilize the processor speed and time, the memory will need to allocate a reasonable supply of readiness from the processor. So for the first requirement of memory management is relocation. Basically, the “end-user” will not know where the program will be placed in the memory. When the “end-user” opens a program, the program might be swapped to a disk and returned to the main memory but in a different location. The next requirement would be protection. When a program is being executed, the processor will allow the current program to be executed without the other programs interfering and would need to wait for permission to be executed. The protection requirement needs to be satisfied b the processor itself and not the operating system. The third requirement in memory management is sharing. Sharing allows several processes to access the same portion of memory...

Words: 376 - Pages: 2

Premium Essay

Ifsm 310 Quiz 4

...interpreters. 6. What is a transaction manager? 7. List and define the four properties of a transaction. 8. What is a Java Virtual Machine? 9. What is the purpose of an In-Circuit Emulator (ICE)? 10. What is an I/O subsystem? Provide three examples of an I/O subsystem. 11. What is the difference between parallel and serial data transmission? Which would you use for transmitting data over long distances and explain why? 12. What is the difference between rigid and solid state drives? 13. Describe the purpose of an interrupt. 14. Describe how multiple I/O devices are connected to the CPU. 15. What is the difference between multiprogramming and multiprocessing? Multiprogramming and multithreading? 16. Cloud Computing is used as a means to provide off-site computing power to an organization. Describe the three main types of Cloud Computing platforms. 17. What is the purpose of the control unit in a channel architecture? What type of computer generally uses this approach? 18. What are the computer system requirements for handling I/O devices? 19. What are the four pieces of data required for CPU to initiate a DMA (Direct Memory Access) transfer? 20. List and describe the three addressing...

Words: 276 - Pages: 2

Premium Essay

Thsg

...Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. It's functionality list is quite similar to that of UNIX. Components of Linux System Linux Operating System has primarily three components Kernel - Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It is consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs. System Library - System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implements most of the functionalities of the operating system and do not requires kernel module's code access rights. System Utility - System Utility programs are responsible to do specialized, individual level tasks. Linux Operating System Kernel Mode vs User Mode Kernel component code executes in a special privileged mode called kernel mode with full access to all resources of the computer. This code represents a single process, executes in single address space and do not require any context switch and hence is very efficient and fast. Kernel runs each processes and provides system services to processes, provides protected access to hardwares to processes. Support code...

Words: 531 - Pages: 3

Premium Essay

Operating System Assignment: Switching Systems

...The operating system picks &begins to execute one of the jobs in memory. Eventually, the job may have to wait for some task, such as an I/O operation, to complete. Operating system Job 1 Job 2 Job 3 Job 4 In a non – multiprogramming system, the CPU would sit idle. In a multiprogramming system, the operating system simply switches to & executes another job. When that job needs to wait the CPU is switched to another job, and so on. Eventually, the first job finishes waiting and gets the CPU back. As long as at least one job needs to execute, the CPU is never idle. Time sharing systems must also provide a file system. The system resides on a collection of disks, hence disk management must be provided. Also time sharing systems provides a mechanism for protecting resources from inappropriate use. Process Management and OS manages many kinds of activities: ● User programs ● System programs: printer spoolers,name servers, file servers, etc. and Each is encapsulated in a process ● A process includes...

Words: 1524 - Pages: 7

Free Essay

Fingerprint

...Operating System – CS 407 Spring 2014 (BE (CS)) Course contents Overview of Operating System Objectives and functions of operating system A brief overview of computer architecture Concept of process States of process; Process control block; Address space Threads and processes Concept of threads; context of a thread Symmetric Multiprocessing (SMP) Microkernel architecture of Operating system Concurrency, Mutual exclusion and Synchronization Principles of concurrency Hardware support for mutual exclusion Semaphores and monitors Synchronization through message passing Deadlock and Starvation Deadlock prevention, avoidance and detection Algorithms for deadlock prevention, avoidance and detection Memory management Requirements; Memory partitioning; paging and segmentation Virtual memory management and operating system support Processor Scheduling Types of scheduling and scheduling algorithms Multiprocessor scheduling and real-time scheduling I/O Management and Disk Scheduling Organization of I/O devices; Buffering Disk scheduling; Disk cache RAIDs File management File organization and file directories File sharing and record blocking Secondary storage management Protection and Security Computer security; Threats and attacks Viruses, Worms and Bots Authentication and access control Intrusion detection and malware defence Distributed processing and Networks Communication architecture; Client/server computing ...

Words: 2109 - Pages: 9

Premium Essay

Operating Systems

...SEIS 640 Paper spring 2013 BAZALIRWA DENIS In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. What are two such problems? A time sharing environment or multi programming is one in which a computer system provides direct communication between the user and the system. It allows many users to share the computer at the same time. One of the problems that may result from the fact that resources are being shared is information theft, this is because all the users are able to access the files that are being shared on the system and so one can easily copy a file and modify it without the knowledge of all the other parties. Such scenarios can result into loss of security confidentiality and integrity since the owner of a file Without being aware of the system used as time-sharing and multiprogramming, may insert or have a secret or confidential data that he wants to remain at the file and also other users may change, add, or even remove some information in the file if they want to, since they have access to all files running on the system The other problem resulting from using such systems is the fact that there could be loss of storage space. Since users have equal privileges to create and access files on the system, then there could be a possibility that the users will create numerous files and eat up the storage space on the system without the...

Words: 1053 - Pages: 5

Premium Essay

Memorymanagement

...Abstract Memory management plays a key role for any multiprogramming operating system. Memory should be managed such that many processes can be in the memory at the same time .As the physical memory is limited , operating systems make use of virtual memory to run processes which are larger than the physical memory. Virtual memory is a technique using which processes can run even when they are not entirely in memory. Main memory is treated as an array of pages thus separating in to logical memory and physical memory, thus the size of the physical memory is not a limitation for the user. Memory management in Windows The physical memory in Windows is divided into a number of physical pages .If the pages are divided in to say 4KB size causes external fragmentation of memory. If the pages are divided into 2MB pages this causes internal fragmentation. Windows uses large pages to better the performance of translation look aside buffer TLB( is a cache used by memory management hardware to improve virtual address translation speed).The physical pages are in one of the following states free page, zeroed page, modified page, standby page ,bad page, transition page, valid page. Valid pages are in processes page tables ,while pages in other states are separated in to list based on their state. Virtual memory in Windows is implemented by demand paging with clustering. Demand paging is method in which the pages are loaded in to the memory as they are required in the course of the process’s...

Words: 806 - Pages: 4

Free Essay

School Administrator

...process and computer to computer. * An I/O bound program has many very short CPU bursts. * A CPU bound program might have a few very long CPU bursts. Histogram of CPU-burst Times Types of Scheduling * The key to the multiprogramming is scheduling. There are four types of scheduling that an OS has to perform. These are: * Long Term scheduling * The long term scheduling determines which programs are admitted to the system for processing. Thus, it controls the level of multiprogramming. * Once admitted, a job or a user program becomes a process and is added to the queue for the short term scheduling (in some cases added to a queue for medium term scheduling). * Long term scheduling is performed when a new process is created. * The criteria used for long-term scheduling may include first-come-first serve, priority, expected execution time, and I/O requirements. * Medium-Term Scheduling * The medium-term scheduling is a part of swapping function. This is a decision to add a process to those that are at least partially in main memory and therefore available for execution. * The swapping-in decision is made on the need to manage the degree of multiprogramming and the memory requirements of the swapped-out process. * Short-Term Scheduling * A decision of which ready process to execute next is made in short-term scheduling. * I/O Scheduling * The decision as to...

Words: 1671 - Pages: 7

Premium Essay

Memory Management: Early Systems

...occupied by a process but cannot be used by the process. This space is unusable by the system until the process release the space. External fragmentation exists when total free memory is enough for the new process but it's not contiguous and can't satisfy the request. Storage is fragmented into small holes. 1B. Single-User Contiguous Scheme: Program is loaded in its entirety into memory and allocated as much contiguous space in memory as it needs. Jobs processed sequentially in single-user systems Requires minimal work by the Memory Manager Register to store the base address Accumulator to keep track of the program size Disadvantages of Single-User Contiguous Scheme: Doesn’t support multiprogramming not cost effective Fixed Partitions: Main memory is partitioned; one partition/job. Allows multiprogramming Partition sizes remain static unless and until computer system id shutdown, reconfigured, and restarted requires protection of the job’s memory space requires matching job size with partition size Disadvantages: Requires entire program to be stored contiguously Jobs are allocated space on the basis of first available partition of required size Works well only if all of the jobs are of the same size or if the sizes are known ahead of time Arbitrary partition sizes lead to undesired results Too small a partition size results in large jobs having longer turnaround time Too large a partition size results in memory waste or internal fragmentation Dynamic Partitions: Jobs are given only...

Words: 846 - Pages: 4

Free Essay

Os Study Guide

...COMP3361 Operating Systems I Mid-­term Review and Study Guide Basic Concepts: What is an operating system? A program that acts as an intermediary between a user of a computer and the computer hardware - basic functions? 1.) OS is a resource allocator 2.) manages all resources 3.) decides between conflicting requests for efficient and fair resource use 4.) OS is a control program 5.) controls execution of programs to prevent errors and improper use of the computer 6.) a program running at all times on the computer, usually called the kernel 7.)everything else is either a a.) system program: associated with the OS but not part of the kernel b.) application program: not associated with the OS user/kernel modes of operation? 1.) The operating system must ensure correct operation of the computer system. To prevent user programs from interfering with the proper operation of the system, the hardware has two modes: user mode and kernel mode. Various instructions (such as I/0 instructions and halt instructions) are privileged and can be executed only in kernel mode. 2.) Kernel Mode In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any memory address. Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. Crashes in kernel mode are catastrophic; they will halt the entire PC. 3.) User Mode In User mode...

Words: 2427 - Pages: 10