Cs Se File

Only available on StudyMode
  • Topic: Decimal, Binary numeral system, Positional notation
  • Pages : 2 (465 words )
  • Download(s) : 12
  • Published : December 18, 2011
Open Document
Text Preview
Name______ _________________________________

Student ID____ ________________________________

Homework 1
Due: Wednesday, February 23, 2011

All answers must be clear and to the point and on the page they were asked.

Do not repeat the question.

Do not email the homework in. Bring it to class on or before the day it is do, otherwise put it in my mailbox.

1) Numbers can be represented in binary (using 2 symbols 0 and 1) and hexadecimal ( 16 symbols 0..9,1,A..F) amount other ways .

a) Represent the hexadecimal number 3F in decimal

b) Represent the hexadecimal number 3F in Binary

c) Represent the decimal number 65536 in hexadecimal
2) When resenting a decimal number as like eight as “all lights on” and 0 as all lights on except the middle one, the login for the bottom line is: on for 0, 2,3,5,6,8,9 and off for 1,4,7 and you don’t care for number between 10 and 16 because that will never be the input. Design a 4 input 1 out electronic device that will represent the bottom line of the digital display using gates.

3) Implement counting semaphores using only binary semaphores. That is, using only system implemented binary semaphores with corresponding P and V operations, create two functions CP(Counting P) and CV(Counting V) that behave the same as P and V for counting semaphores would.

4) a) In the Dijkstra’s Bankers algorithm, what is a safe state?

A safe state is considered as if it is possible for all processes to finish executing (terminate).

b) N processes share M resource units that can be reserved and release only one at a time. The maximum need of each process does not exceed M, and the sum of all maximum needs is less than M+N. Can a deadlock occur in the system (yes or no). Prove your answer.

5) a) Given process resource usage and availability as described in the table below, draw the resource allocations graph.

tracking img