Successfully reported this slideshow.
Upcoming SlideShare
×

# Mcs 041.1

935 views

Published on

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

### Mcs 041.1

1. 1. ShankhaFor Solving question with Answers MINTU 11
3. 3. DATA: condition can_eat[NUM_PHILS]; enum states {THINKING, HUNGRY, EATING} state[NUM_PHILS-1]; int index;INITIALIZATION: for (index=0; index<NUM_PHILS; index++) { flags[index] = THINKING; }MONITOR PROCEDURES: /* request the right to pickup chopsticks and eat */ entry void pickup(int mynum) { /* announce that were hungry */ state[mynum] = HUNGRY; /* if neighbors arent eating, proceed */ if ((state[mynum-1 mod NUM_PHILS] != EATING) && (state [mynum+1 mod NUM_PHILS] != EATING)) { state[mynum] = EATING; } /* otherwise wait for them */ else can_eat[mynum].wait; /* ready to eat now */ state[mynum] = EATING; } /* announce that were finished, give others a chance */ entry void putdown(int mynum) { /* announce that were done */ state[mynum] = THINKING; /* give left (lower) neighbor a chance to eat */ if ((state [mynum-1 mod NUM_PHILS] == HUNGRY) && (state [mynum-2 mod NUM_PHILS] != EATING)) { can_eat[mynum-1 mod NUM_PHILS].signal; } /* give right (higher) neighbor a chance to eat */ if ((state [mynum+1 mod NUM_PHILS] == HUNGRY) && (state [mynum+2 mod NUM_PHILS] != EATING)) { can_eat[mynum+1 mod NUM_PHILS].signal; } }PHILOSOPHER: /* find out our id, then repeat forever */ me = get_my_id(); while (TRUE) { /* think, wait, eat, do it all again ... */ think(); pickup(me); eat(); putdown(me); }●●●●●Explain the Real time operating System (RTOS). Give any 2 example application suitable for RTOS. Differentiatebetween time sharing & RTOSReal time operating systems are used in environments where a large number of events mostly external to the computer system,must be accepted & processed in a short time or within a certain deadlines. Such applications include industrial central,telephone, switching & real time simulation. A real-time OS has an advanced algorithm for scheduling. Scheduler flexibilityenables a wider, computer-system orchestration of process priorities, but a real-time OS is more frequently dedicated to anarrow set of applications. Key factors in a real-time OS are minimal interrupt latency and minimal thread switching latency, buta real-time OS is valued more for how quickly or how predictably it can respond than for the amount of work it can perform in agiven period of time. The primary issue of real time operating is to provide quick event response times & thus meet thescheduling deadlines. User convenience & resource utilization are the secondary concern to the RTOS designers. It is notuncommon for a real time system to be expected to process bursts of thousands of interrupts per second without missing a
4. 4. single event. Such requirements usually can‟t be met by multiprogramming alone, & real time operating systems usually rely onsome specific policies & techniques for doing their job.Explicit programmer defined & controlled processes are commonly encountered in real time operating systems. Basically aseparate process is charged with handling a single external event. The process is activated upon occurrence of the relatedevent, which is often signaled by an interrupt. Multitasking operation is accomplished by scheduling processes for executionindependently of each other. Each process is assigned a curtained level of priority that corresponds to the relative importanceof the event that it services. The processor is normally allocated to the highest priority process among those that are ready toexecute. Higher priority processes usually preempt execution of the lower priority processes. This form of scheduling is knownas priority based preemptive scheduling is used by a majority of real time systems.Differences between time sharing & RTOS are time sharing is a popular representation of multi-programmed, multi-user systemwhereas RTOS are used in environments mostly external to the computer system, must be accepted & processed in a shorttime or within a certain deadlines. The primary objectives of real time operating system is good terminal response time whereasthe primary objective of RTOS is to provide quick event response time & thus meet the scheduling deadline.●●●●●●Explain the windows 2000 operating system architectureWindows 2000 Architecture DiagramThe Windows 2000® Architecture Roadmap provides a global view of the operating system architecture, itsmain components, and mechanisms. It also provides "logical navigation" to other locations for more in depthdiscussions.The goal is to help the user to go from general to specific information, in a way that is logical and based on thesystem structure itself. She (he) should be able to become familiar with the operating system main conceptsand components. Novice and experienced users should also benefit from this comprehensive operating systemdescription, its numerous diagrams, and examples. Refer to the site organization for background informationand for navigation suggestions.Windows 2000 OverviewThe Windows 2000 operating system constitutes the environment in which applications run. It provides themeans to access processor(s) and all other hardware resources. Also, it allows the applications and its owncomponents to communicate with each other.Windows 2000 has been built combining the following models: Layered Model. The operating system code is grouped in modules layered on top of each other. Each module provides a set of functions used by modules of higher levels. This model is applied mainly to the operating system executive. Client/Server Model. The operating system is divided into several processes, called servers, each implementing a set of specific services. Each of these servers runs in user mode, waiting for client requests.User-ModeThe software in user mode runs in a non-privileged state with limited access to system resources. Windows2000 applications and protected subsystems run in user-mode. The protected subsystems run in their ownprotected space and do not interfere with each other. They are divided into the following two groups: