Free Essay

Multiprogramming

In: Computers and Technology

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

...the above requirements, the operating system must maintain a data structure for each process, which includes the description of the state and the resource ownership of the process and which enables the operating system to exert control over each process. Each process goes through a series of states. Various events can make a process to change their states. Different states of a process can be: • Created • Ready or Waiting • Running • Blocked • Terminated. Process scheduling is one of the most important functions of an operating system that supports the concept of multiprogramming. This function is totally dependent upon queues. Three types of queues used in process scheduling are: • Job queue • Ready queue • Device queue. Process control block is another concept for multiprogramming. If an operating system supports multiprogramming, then it needs to keep record of all the processes. For each process, a process control block (PCB) is used to track the process’s execution status, which includes: • Its current processor register contents • Its process state • Its memory state • A pointer to its stack • The resource allocated to it • The resource it needs....

Words: 515 - Pages: 3

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......

Words: 376 - Pages: 2

Free Essay

Os Study Guide

...interrupt vector table, which contains the addresses of all the service routines 2.) Interrupt architecture must save the address of the interrupted instruction 3.) Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt 4.) An operating system is interrupt driven 5.) What happens? a. The OS preserves the state of the CPU by storing registers and the program counter b. The interrupt service routine is executed c. On completion, the CPU resumes the interrupted computation Multiprogramming 1.) The objective of multiprogramming is to have some process rum1ing at all times, to maximize CPU utilization. 2.) One job is selected and run via job scheduling 3.) When it has to wait (e.g. for I/O), OS switches to another job Multitasking-time quantum 1.) Timesharing (multitasking) is a logical extension of multiprogramming 2.) CPU switches jobs so frequently that users can interact with each job while it is running 3.) Response time should be < 1 second 4.) Each user has at least one program executing in memory 5.) If several jobs are ready to run at the same time, you need CPU scheduling 6.) If processes don’t fit in memory, swapping moves them in and out to run 7.) Virtual memory allows execution of processes not completely residing in memory Multiprocessor- 1.) increased throughput 2.) economy of scale 3.) increased......

Words: 2427 - Pages: 10

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......

Words: 806 - Pages: 4

Free Essay

Fingerprint

...Instruction execution goes through a cycle Instruction cycle Fetch and execute A much simplified view of instruction format and the various steps of instruction execution cycle Interrupts Mechanism to interrupt the normal sequencing of the processor Classes of interrupts Interrupts from a program Timer I/O interrupts Hardware failure (not an exhaustive list) Interrupts and execution cycle Suspend the program and handle the interrupts When? Interrupt step is added at the end of the steps of instruction execution The process of interrupt handling – Intel 8086/8088 Multiple interrupts and their priorities Sequential order Priority-based interrupts Pre-emptive and non-preemptive interrupts Multiprogramming Why is it required? Long I/O waits put the processor in idle state Program is context-switched The memory hierarchy Parameters that describe the memory hierarchy Capacity Speed Cost Build a memory hierarchy that gives high capacity at a fats speed and at a low cost Behaviour of the hierarchy while moving from top to the lower levels Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access by the processor Hierarchy is comprised of Registers Cache memory Main memory Secondary storage For a two-level hierarchy T = H1 t1 + (1 – H1) t2 Speed is desired to be close to the speed of the 1st level. How? Due to principle of locality of......

Words: 2109 - Pages: 9

Premium Essay

Thsg

...libraries to access Kernel functions to get system's low level tasks. Basic Features Following are some of the important features of Linux Operating System. Portable - Portability means softwares can works on different types of hardwares in same way.Linux kernel and application programs supports their installation on any kind of hardware platform. Open Source - Linux source code is freely available and it is community based development project. Multiple teams works in collaboration to enhance the capability of Linux operating system and it is continuously evolving. Multi-User - Linux is a multiuser system means multiple users can access system resources like memory/ ram/ application programs at same time. Multiprogramming - Linux is a multiprogramming system means multiple applications can run at same time. Hierarchical File System - Linux provides a standard file structure in which system files/ user files are arranged. Shell - Linux provides a special interpreter program which can be used to execute commands of the operating system. It can be used to do various types of operations, call application programs etc. Security - Linux provides user security using authentication features like password protection/ controlled access to specific files/ encryption of data. Architecture Linux Operating System Architecture Linux System Architecture is consists of following layers Hardware layer - Hardware consists of all peripheral devices (RAM/ HDD/ CPU......

Words: 531 - Pages: 3

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......

Words: 1053 - Pages: 5

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......

Words: 1671 - Pages: 7

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......

Words: 552 - Pages: 3

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......

Words: 719 - Pages: 3

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......

Words: 846 - Pages: 4

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 modes....

Words: 276 - Pages: 2

Premium Essay

Diploma

... |Lab Exercises | | |Chart Types |Chart Types | | | | |Descriptions and Printing |Descriptions and Printing |Tutorial/Practical | | |10 |Software |To be able to understand : |Lecture | | | |Multiprogramming |Multiprogramming | | | | |Virtual storage |Virtual storage |Tutorial/Practical | | |10 |Introduction to Databases |To be able to understand : |Lecture |Lab Exercises | | |Database Creation |Database Creation | ...

Words: 1347 - Pages: 6

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 modes....

Words: 276 - Pages: 2

Premium Essay

Pos 355 Final Exam Answers

...hierarchy shows the ranking of computer memory devices. Devices at the top of the hierarchy have the fastest access time, and devices at the lower levels have slower access times with larger capacity and lower cost. A memory hierarchy in computer storage distinguishes each level in the hierarchy by response time. 32. A 16-bit address bus can address _______ more addresses than an 8-bit address bus. ANSWER: 65280 33. How many memory addresses can be addressed by a 24-bit wide address bus? ANSWER: 16 mb 34. Discuss the advantages of a multiprogramming operating system over a single-tasking operating system. What trade-offs are involved in multiprogramming? ANSWER: A single-tasking operating system is simple, easy to implement, less overheads, and is fair to all running programs. A multiprogramming operating system is also fair where all programs are taken care of. A trade-off of having a multiprogramming operating system are the time overheads for context saving/restoring during task switching. 35. Discuss 5 differences between operating systems for a mainframe and a personal computer. ANSWER: Within a mainframe computer, there are users at separate terminals that share system resources. Mainframe operating systems are designed to utilize resources and make sure that all resources are used efficiently. Operating systems that are designed for personal computers work with dedicated resources, but also share resources such as......

Words: 1596 - Pages: 7