You are on page 1of 3

OPERATING SYSTEMS CMPE 180-94

Assignment#3

Operating Systems Homework #3


CMPE 180-94 Fall 13 San Jose State University

Submitted By: First Name:: MUHAMMAD IMRAN HAYDER Last Name:: MALIK SJSU ID : 009175231 CMPE graduate student, Fall 13 , San Jose State University
Dated: 17th September 2013

OBJECTIVE: Answer the chapter 2 exercises (13,16,17,19,21,23)


13. Describe two general methods for passing parameters to the operating system. Answer: Two general methods for passing parameters to the operating system are : 1. Passing parameters in the registers 2. Registers pass starting addresses of parameter blocks A third optional way of doing parameter passing is by placing or pushing the parameters on the stack by the program and then popping off from the stack by the OS.

16. What are the advantages and disadvantages of using the same system call interface for manipulating both files and devices. Answer: Advantages of using same system cal interface for manipulating both files and devices are: -Ability to access each device as though it was a file in the file system. Files are easy to think and deal with as we dont have to worry about complexities involved in devices. - Most kernels available deal with devices using this system call interface, therefore it makes the task simpler to add a new device driver by developing and running a code specifically targeted to hardware. This goes in favor of both user program code and device-driver code.

SAN JOSE STATE UNIVERSITY

Page 1

OPERATING SYSTEMS CMPE 180-94 Disadvantages are:

Assignment#3

It might be difficult to capture the functionality of certain devices within the context of the file access API, thereby resulting in either:Not all devices provide insight to their functionality within the context of their file access API, therefore giving rise to problems such as: - Loss of functionality/performance.

17. Describe whether it is possible for the user to develop a new command interpreter using the system-call interface provided by the operating system. Explain your answer. Answer: Yes it is possible. - The command interpreter allows a user to create and manage processes and also determine ways by which they communicate (such as through pipes and files). -System calls bring it down to whole level of ease access as this functionality can be accessed by user through use of system calls so its quite simply possible to design a new command-line interpreter.

19. Explain the reason of separation between mechanism and policy in operating system. Answer: Mechanism and policy are always desirable in their separation: -To ensure that systems can be easily modified. -No two system installations are the same, so each installation may want to tune the operating system to suit its needs. With mechanism and policy separate, the policy may be changed at will while the mechanism stays unchanged. Hence its very flexible 21. Discuss how user programs and system services interact in micro kernel architecture. Describe the main advantage of the microkernel approach to system design and the disadvantages of using the micro kernel approach. Answer: Inter process communication mechanism is the primary service used my user programs and system services to interact in microkernel architecture. Examples are such as messaging. These messages are conveyed by the operating system. Advantages are: i. Adding a new service does not require modifying the kernel, ii. It is more secure as more operations are done in user mode than in kernel mode, and iii. A simpler kernel design and functionality typically results in a more reliable operating system.

SAN JOSE STATE UNIVERSITY

Page 2

OPERATING SYSTEMS CMPE 180-94

Assignment#3

The primary disadvantages are the overheads associated with inter process communication and the frequent use of the OSs messaging functions. 23. How are iOS and android similar? How are they different? Answer. iOS and Android are both currently dominant popular rivals in smartphone mobile operating system. Both have a huge share in mobile OS market nowadays. While they address as operating systems for smartphones, each of them has developed its own legacy quite different from other which distinguishes its features and specs as its own unique kind. Here are some similarities and differences, specifically pertaining to operating system point of view : Similarities: -Both are mobile operating systems. -Both iOS and android are also types of network operating systems. - Each of the two most prominent OS Apples iOS and Googles Android features a core kernel along with middleware that supports databases, multimedia, and Graphics. -Both iOS and android doesnt support swapping between main memory and backing memory instead each has its own strategy which is quite similar to one adopted by other. - Both iOS and Android support paging, so they do have memory-management abilities. -Both use popular ARM processor to run on. -Both Android and iOS are basically a layered stack of software that provides a rich set of frameworks for developing mobile applications. Differences are: -iOS was designed to run on Apple devices (iPAD,iPHONE) while android has a market of various popular smartphone manufacturers like HTC, LG, Samsung etc. -iOS is developed in Cocoa language while android is developed in Java. -iOS uses Mach kernel environment whereas android uses Linux kernel environment. -Apple iOS now has limited multitasking (previously it had none) while android has not placed any constraints on the applications running

SAN JOSE STATE UNIVERSITY

Page 3

You might also like