Skip to main content

4.1.5 Multiprogramming and Time Sharing System 4.1.6 Explain Deadlock


4.1.5 Identify between multiprogramming and time-sharing.


MULTIPROGRAMMING VS TIME SHARING SYSTEM

          Multiprogramming is the allocation of more than one concurrent program on a computer system and its resources. Multiprogramming allows using the CPU effectively by allowing various users to use the CPU and I/O devices effectively.
     
          Multiprogramming make sure thatthe CPU always has something to execute, thus increases the CPU utilization. On the other hand, Time sharing of computing resources among svereal users at the same time. Since this will allow a large number of users to work at a single computer system at the same time, it would lower the cost of providing computing capabilities.

MULTIPROGRAMMING


Multiprogrammin is the fast switching of CPU between several programs. A program is generally made up of several tasks. A tasks usually ends with some request to move data which would require some I/O operations to be execute.

TIME SHARING


          Time sharing, which was introduced in 1960s, is the sharing of computingresources among several users at the same time. In time sharing system, several terminals are attached to a single dedicated server having its own CPU.

          Actions/commands executed by the operating system of a time sharing system have a very short time span. Therefore the CPU is assigned to users at the terminals for a short time period,thus a user in a terminal gets the feeling that she has a CPU dedicated to her behind the terminal.

DIFFERENCE BETWEEN MULTIPROGRAMMING AND TIME SHARING SYSTEM

Main difference between multiprogramming and time sharing is the effective utilization of CPU time, by allowing several program to use the CPU at the same time but time sharing of a computing facility by several users that want to use the same faacility at the same time. Each user on a time sharing system get their own terminal and gets the feeling that they is using the CPU alone.

4.1.6 Explain Deadlock.

          A deadlock is 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.The earliest computer operating systems ran only one program at a time. All of the resources of the system were available to this one program.
     
         Later, operating systems ran multiple programs at once, interleaving them. Programs were required to specify in advance what resources they needed so that they could avoid conflicts with other programs running at the same time. Eventually some operating systems offered dynamic allocation of resources. Programs could request further allocations of resources after they had begun running. This led to the problem of the deadlock. Here is the simplest example:


Program 1 requests resource A and receives it. Program 2 requests resource B and receives it. Program 1 requests resource B and is queued up, pending the release of B. Program 2 requests resource A and is queued up, pending the release of A.


Now neither program can proceed until the other program releases a resource. The operating system cannot know what action to take. At this point the only alternative is to abort (stop) one of the programs.
Learning to deal with deadlocks had a major impact on the development of operating systems and the structure of databases. Data was structured and the order of requests was constrained in order to avoid creating deadlocks.

Comments

Post a Comment

Popular posts from this blog

3.1.1 Identify Between Resident And Transient Routines

Memory Management Memory management is concerned with managing: The computer’s available pool of memory Allocating space to application routines and making sure that they do not interfere with each other. 3.1.1 Identify between resident and transient routines The operating system is a collection of software routines. Resident routines Transient routines Routines that directly support application programs as they run Stored on disk and read into memory only when needed Example: routine that control physical I/O Example: routine that formats disks The operating system occupies low memory beginning with address 0. Key control information comes first followed by the various resident operating system routines. The remaining memory, called the transient area, is where application programs and transient operating system routines are loaded. Resident & transient routines structure...

Operating Systems Definition and the Classification of OS

             OPERATING SYSTEMS ( OS ) What is an operating system? An operating system (sometimes abbreviated as "OS") is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface such as a command language or a graphical user interface (GUI). An operating system performs these services for applications:     In a multitasking operating system where multiple programs can be running at the same time, the operating system determines which applications should run in what order and how much time should be allowed for each application before g...

2.1.4 Distinguish between logical I/O and physical I/O

2.1.4 Distinguish between logical I/O and physical I/O logical input relate to hard disk Logical I/O an Physical I/O Physical" I/O is an actual fetch of data from a storage device such as a disk. Logical" I/O is a programmatic request for data satisfied by a memory (block, buffer) access. A logical I/O may cause a physical I/O in the first place, or a logical I/O may retrieve a part of a block (buffer) of data from memory. 2.1.5 Distinguish between directory management and disk space management. Directory management A directory is a hierarchical collection of directories and files.  The only constraint on the number of files that can be contained in a single directory is the physical size of the disk on which the directory is located. Disk management A hard disk is a rigid disk inside a computer that stores and provides relatively quick access to large amounts of data. It is the type of storage most often used with Windows. The system also supp...