Saturday, February 27, 2010

Ethical Standards with Regards to Computer Usage

Ethical Standards with Regards to Computer Usage

When we say "Ethical Standards with Regards to Computer Usage" this means the rules and standard that we should follow in using our computers or the proper way to use our computer in our daily life, with our different works an transactions in school, office and home. Many organizations, companies, societies and even schools impose standard ethical rules but most of the time these rules are neglected by many of us and mostly by students. One of the ethical standard that we should and must follow is to avoid copying things from the internet without the proper way of copying it or without citations, which can result to plagiarism, but many of us can't do plagiarism from the latest songs to the latest movies, and sometimes we don't even recognize that we've done it already because of lack of knowledge and because of the idea that "Marami naman ang gumagawa ng ganito, gagayahin ko din" because its in! And because it is cheaper and it is a time saver.
Another way that we commit plagiarism is through "File Sharing". File sharing is the practice of distributing or providing access to digitally stored information, such as computer programs, multi-media (audio, video), documents, or electronic books. It may be implemented in a variety of storage, transmission, and distribution models. Common methods are manual sharing using removable media, centralized computer file server installations on computer networks, World Wide Web-based hyperlinked documents, and the use of distributed peer-to-peer (P2P) networking.
File sharing is not of itself illegal. However, the increasing popularity of the mp3 music format in the late 1990s led to the release and growth of Napster and other software that aided the sharing of electronic files. This in practice led to a huge growth in illegal file sharing: the sharing of copyright protected files without permission.
The economic impact of illegal file sharing on media industries is disputed. Some studies conclude that unauthorized downloading of movies, music and software is unequivocally damaging the economy, while other studies suggest file sharing is not the primary cause of declines in sales. Illegal file sharing remains widespread, with mixed public opinion about the morality of the practice.(from: http://en.wikipedia.org/wiki/File_sharing)
I know we can follow these ethical standards, even through small things; from putting citations on the articles that we copied from the internet, and scanning our flash-drives first. Maybe it can be a difficult thing to do for someone, but I tell you, it is much easier than committing plagiarism.



Friday, February 19, 2010

Friday, January 8, 2010

Cont. of Prelim Exam.

 3. Illustrate and find the page number with the displacement of a given program line.

       Job1 is 1600 lines long

       PS=200 and LNTBL=542

       200/542=0.3690037     it is in line 0.

Prelim Examination

Name: Pauline Vernadeth M. Magno Date: January 9,2010


I. Concept Questions
1. Name the five key concepts about an operating system that you thinks a user needs to know and understand.

Answer: For me the five key concept of Operating System that a user needs to know and understand are the following.
I. The major components of operating system, which are: Memory manager, Device Manager, File Manager, Processor Manager, and User command Interface.
II. How operating system handle the resource allocation and access the protection of the hardware.
III. How operating system allocates jobs in memory blocks.
IV. The importance of operating system.
V. How operating system involves in program execution.

2. List the tangible(physical) resources of the computer system and explain how it works.
a. Tower or Desktop The "box" or case that holds the parts that make up a computer: CPU, hard disk drive, floppy drive, memory chips, power supply, interface cards, etc.
b. Monitor An output display device (looks similar to a TV) in a computer system. You see information on the monitor's screen.
c.Speakers Output device that produces sound and music when connected to the computer. Speakers come in different shapes and may even be in the monitor's case.
d.Keyboard Input device - choose letters, symbols, and actions by pressing keys
3. Explain the following:
a. internal fragmentation. How does it occur?
b. External Fragmentation. How does it occur?
c. Compaction. Why it is needed?

Answers:
a. Internal fragmentation is the unused space, it occurs when storage is allocated without ever intending to use it. This space is wasted. While this seems foolish, it is often accepted in return for increased efficiency or simplicity. The term "internal" refers to the fact that the unusable storage is inside the allocated region but is not being used. source: http://en.wikipedia.org/wiki/Fragmentation_(computer)
b. External fragmentation is the phenomenon in which free storage becomes divided into many small pieces over time. It is a weakness of certain storage allocation algorithms, occurring when an application allocates and deallocates ("frees") regions of storage of varying sizes, and the allocation algorithm responds by leaving the allocated and deallocated regions interspersed. The result is that although free storage is available, it is effectively unusable because it is divided into pieces that are too small to satisfy the demands of the application. The term "external" refers to the fact that the unusable storage is outside the allocated regions. Source: http://en.wikipedia.org/wiki/Fragmentation_(computer)
c. Compaction attacks the problem of fragmentation by moving all the allocated blocks to one end of memory, thus combining all the holes. Aside from the obvious cost of all that copying, there is an important limitation to compaction: Any pointers to a block need to be updated when the block is moved. Unless it is possible to find all such pointers, compaction is not possible. Pointers can stored in the allocated blocks themselves as well as other places in the client of the memory manager. In some situations, pointers can point not only to the start of blocks but also into their bodies. For example, if a block contains executable code, a branch instruction might be a pointer to another location in the same block. Compaction is performed in three phases. First, the new location of each block is calculated to determine the distance the block will be moved. Then each pointer is updated by adding to it the amount that the block it is pointing (in)to will be moved. Finally, the data is actually moved. There are various clever tricks possible to combine these operations. source: http://www1bpt.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/memory.htm#compaction

4.Cache memory how it works?
Ans: A cache (pronounced /kæʃ/, kash) is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache. In other words, a cache operates as a temporary storage area where frequently accessed data can be stored for rapid access. Once the data is stored in the cache, it can be used in the future by accessing the cached
copy rather than re-fetching or recomputing the original data. source: http://en.wikipedia.org/wiki/Cache

5.Which is the fastest cache's L1, L2, or L3? Why?
Ans: The fastest cache is the L1-cache because the L1 cache typically ranges in size from 8KB to 64KB and uses the high-speed SRAM (static RAM) instead of the slower and cheaper DRAM (dynamic RAM) used for main memory. source: http://www.experts123.com/q/what-is-l1-cache-l2-and-l3-what-do-these-do.html


II. Memory Utilization Problem

1. Given the following information:

Table 1A

Job Number

Memory Requested

 J1

700KB

J2

500KB

J3

740KB

J4

850KB

J5

610KB


Memory Block

Size

1132

700KB

1003

720KB

1114

800KB

2310

750KB

1755

610KB

a.       a.Use the best-fit algorithm to allocate the memory blocks to the five arriving jobs.

b.      b.Use the first-fit algorithm to allocate the memory blocks to the five arriving jobs.

c.       c.Use the next-fit algorithm to allocate the memory blocks to the five arriving jobs.

d.      d.Use the worst-fit algorithm to allocate the memory blocks to the five arriving jobs.

AA       answer: 

a.       Best-fit  algorithm

Job Number

Memory Requested

 J1

700KB

J2

500KB

J3

740KB

*J4

850KB

 J5

610KB

(*IDLE)

                

Memory List


Memory Location

Memory Size

Job Number

Job Size

Status

Internal Fragmentation

1132

700KB

J1

700KB

BUSY

0

1003

720KB

J2

500KB

BUSY

120KB

1114

800KB

 

 

 

 

2310

750KB

J3

740KB

BUSY

10KB

1755

610KB

J5

610KB

BUSY

0

     b.First-Fit Algorithm

Job Number

Memory Requested

 J1

700KB

J2

500KB

J3

740KB

*J4

850KB

J5

610KB

Memory List

Memory Location

Memory Size

Job Number

Job Size

Status

Internal Fragmentation

1132

700KB

J1

700KB

BUSY

0

1003

720KB

J2

500KB

BUSY

120KB

1114

800KB

J3

740KB

BUSY

60KB

2310

750KB

J5

610KB

BUSY

140KB

1755

610KB

 

 

 

 


c.     Next-fit algorithm

Job Number

Memory Requested

 J1

700KB

J2

500KB

J3

740KB

*J4

850KB

J5

610KB

 (* IDLE)

Memory List

Memory Location

Memory Size

Job Number

Job Size

Status

Internal Fragmentation

1132

700KB

J2

500KB

BUSY

200KB

1003

720KB

J1

700KB

BUSY

20KB

1114

800KB

J5

610KB

BUSY

190KB

2310

750KB

J3

740KB

BUSY

10KB

1755

610KB

 

 

 

 

      d.Worst- fit algorithm

Job Number

Memory Requested

 J1

700KB

J2

500KB

*J3

740KB

*J4

850KB

J5

610KB

a.        (* IDLE)

 

 

Memory Block

Memory Location

Memory Size

Job Number

Job Size

Status

Internal Fragmentation

1132

700KB

 

 

 

 

1003

720KB

J5

610KB

BUSY

110KB

1114

800KB

J1

700KB

BUSY

100KB

2310

750KB

J2

500KB

BUSY

250KB

1755

610KB

 

 

 

 

2.  2.Given the following information:

    Table 2A 

Job Number

Memory Requested

J1

30KB

J2

50KB

J3

30KB

J4

25KB

J5

610KB

Table 2B

ORIGINAL

STATE OF

MAIN

MEMORY

 

 

100KB(P1)

25KB(P2)

25KB(P3)

 

50KB(P4)

 

30KB(P5)

                    

                                

a.       

a.       a.Create a memory layout for the fixed partition

               After job entry based on the given information

              (Table 2A and Table 2B)

b.      b.Before Job 6(30KB) and Job 7(45KB) arrives,

              There are three jobs done ready for processing

              which J2, J3, J4. Create an initial memory layout

              for dynamic partition based on the given information

              (Table 2A).

 

Ans: 

a.       a.Fixed partition. J5 is idle.   

AFTER

JOB

ENTRY

 30KB(J1)

 

 

 

 

25KB(J4)

50KB(J2)

 

30KB(J3)


                         

a.      








b.Dynamic Partition

       

   

Before

New  Job

Entry

 3OKB(J1)

 

 

 

25KB FREE

50KB FREE

 

 

30KB FREE

 

After

New  Job

Entry

 3OKB(J1)

 

 

 

25KB FREE

45KB(J7)

 

 

30KB(J6)