Operating Systems-Introduction to Programming-Quiz Solution, Exercises of Computer Programming

This quiz was taken by Sir Raza Muhammad at Quaid-i-Azam University for Introduction to Programming course. It includes: Computer, Programming, Components, Operating, System, Directory, Device, Drivers, Multitasking

Typology: Exercises

2011/2012

Uploaded on 07/13/2012

asim.amjid
asim.amjid 🇵🇰

4.4

(47)

41 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Mohammad Ali Jinnah University, Islamabad Campus
Quiz# 4
Course Title Computer Programming (for Engineers)
Instructor Maryam Kausar
Weightage 2% Absolute
Multiple Choice Questions
1. Which of the following components of an operating system maintains the directory system?
A. Device drivers B. File manager C. Memory manager
ANSWER: B
2. Which of the following components of an operating system handles the details associated with particular
peripheral equipment?
A. Device drivers B. File manager C. Memory manager
ANSWER: A
3. Which of the following components of an operating system is not part of the kernel?
A. Shell B. File manager C. Scheduler
ANSWER: A
4. Multitasking in a computer with only one CPU is accomplished by a technique called
A. Bootstrapping B. Batch processing C. Multiprogramming
ANSWER: C
5. Execution of an operating system is initiated by a program called the
A. Window manager B. Scheduler C. Bootstrap
ANSWER: C
6. The end of a time slice is indicted by the occurrence of a signal called
A. An interrupt B. A semaphore C. A login
ANSWER: A
7. A section of a program that should be executed by at most one process at a time is called a
A. Utility B. Critical region C. Privileged instruction
ANSWER: B
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems-Introduction to Programming-Quiz Solution and more Exercises Computer Programming in PDF only on Docsity!

Mohammad Ali Jinnah University, Islamabad Campus

Quiz# 4

Course Title Computer Programming (for Engineers)

Instructor Maryam Kausar

Weightage 2% Absolute

Multiple Choice Questions

  1. Which of the following components of an operating system maintains the directory system?

A. Device drivers B. File manager C. Memory manager

ANSWER: B

  1. Which of the following components of an operating system handles the details associated with particular peripheral equipment?

A. Device drivers B. File manager C. Memory manager

ANSWER: A

  1. Which of the following components of an operating system is not part of the kernel?

A. Shell B. File manager C. Scheduler

ANSWER: A

  1. Multitasking in a computer with only one CPU is accomplished by a technique called

A. Bootstrapping B. Batch processing C. Multiprogramming

ANSWER: C

  1. Execution of an operating system is initiated by a program called the

A. Window manager B. Scheduler C. Bootstrap

ANSWER: C

  1. The end of a time slice is indicted by the occurrence of a signal called

A. An interrupt B. A semaphore C. A login

ANSWER: A

  1. A section of a program that should be executed by at most one process at a time is called a

A. Utility B. Critical region C. Privileged instruction

ANSWER: B

  1. Which of the following is not an attempt to provide security?

A. Passwords B. Privilege levels C. Multitasking

ANSWER: C

  1. Which of the following items of information would not be contained in an operating system’s process table?

A. The location of the memory area assigned to the process B. The priority of each process C. Whether the process is ready or waiting D. The machine language instructions being executed by the process

ANSWER: D

  1. Which of the following events is detrimental to an operating system’s performance?

A. Deadlock B. Interrupt C. Booting

ANSWER: A

Fill-in-the-blank/Short-answer Questions

  1. Suppose an operating system allocates time slices in 10 millisecond units and the time required for a context switch is negligible.

A. How many processes can obtain a time slice in one second?

____________

B. How many processes can obtain a time slice in one second if half of them use only half of their slice?

____________

ANSWER: A. 100 B. 150

  1. If it takes one microsecond to perform a context switch and processes use only half of their allotted 10 millisecond time slices, what percent of a CPUs time is spent performing context switches rather than executing processes?

____________

ANSWER: .02% (1/5000)

  1. In contrast to early batch processing techniques, ____________________ allows the user to communicate with the computer while the user’s application is being executed. In turn, this type of processing requires that the computer’s responses to its environment be performed in a timely manner, a requirement known as _______________________.

ANSWER: Interactive processing, Real-time processing

ANSWER: A. Checks to see if the contents of a memory cell is 0 or 1 and sets the value to a 1. B. Causes the CPU to not recognize incoming interrupts. C. Causes the CPU to begin recognizing incoming interrupts.

  1. Which necessary condition for deadlock is removed by each of the following.

A. Require processes to request all required resources at once.


B. Allow only one process at a time in the process table.

________________________________________________________________

C. Take all resources from processes when deadlock occurs and restart the processes.

________________________________________________________________

ANSWER: A. Resources must be requested on a partial basis. B. There must be competition for nonshareable resources. C. Resources cannot be forcibly retrieved.

  1. List four resources whose access an operating system should coordinate.

A. ___________________________ B. _____________________________

C. ___________________________ D. _____________________________

ANSWER: Possible answers include: Memory space, mass storage space, printers, space in process table, CPU time, and many more

General Format Questions

  1. Explain the difference between application software and system software.

ANSWER: System software provides the infrastructure required by the application software. It includes the operating system and utilities. Application software provides the unique functionality required to perform the particular tasks for with the computer is used. Examples include word processors, spreadsheet systems, database systems, and image processing systems.

  1. What is the difference between a process that is waiting as opposed to a process that is ready?

ANSWER: A process that is waiting would not be able to advance if given a time slice (perhaps because it is waiting for a peripheral device to complete a task) whereas a process that is ready would be able to continue execution if given a time slice.

  1. Explain why the average length of a time slice would be reduced if the processes in an operating system’s process table perform lots of I/O operations.

ANSWER: Once a process requests an I/O operation, its time slice will be terminated, it will be labeled as a waiting process, and another process will be allowed to start another time slice. Thus, the first process’s effective time slice would be reduced.

  1. In the sense of the term virtual memory, give an argument that multiprogramming creates virtual CPUs.

ANSWER: The term virtual memory refers to the illusion of a memory space that is larger than that actually present. This illusion is created by the operating system. Multiprogramming is a technique used by operating systems to create the illusion of more CPUs than are actually present.

  1. Describe concerns that occur when designing a time-sharing/multitasking operating system that do not occur in the case of a single tasking system.

ANSWER: Possible answers include: The implementation of multiprogramming, the need to protect each process from malicious behavior of other processes, and the need to deal with the possibility of deadlock.