Tuesday, April 5, 2011

CASE STUDY 5


CASE STUDY # 5

There are many methods for free space allocation. One of this is the Best-fit memory allocation. Best-fit memory allocation on a fixed partition memory is the kind of memory allocation wherein a job to be allocated will search from the top block to the bottom for the smallest partition that fits the job. The job will then be allocated to the block that will have the least internal fragmentation or wasted memory.

In the situation given, Job 1 which has a size of 100k, and a turnaround of 3, will search from block 1 to block 5. The job does not fit in block 1 for it only has 50k of memory, in block 2 (200k), there is an internal fragmentation of 100k, in block 3 (70k), the job does not fit, in block 4 (115k), the internal fragmentation is 15k, and in block 5 (15k), the job does not fit. The job will then be allocated to the block which has the least internal fragmentation which is the block 4. Job 2 with a size of 10k will have 40k internal fragmentation in block 1. In block 2, job 2 will have an internal fragmentation of 190k, 60k in block 3, block 4 is already busy and 5k in block 5. Job 2 will have the least internal fragmentation in block 5; therefore job 2 will be allocated to block 5. Next on the queue is job 3 with a size of 35k. Job 3 will have 15k internal fragmentation in block 1, 165k in block 2, 35k in block 3, block 4 and 5 are already busy. The least internal fragmentation is in block 1. Thus, job 3 will then be allocated to block 1. Next is job 4 with a size of 15k. Block 1 is busy by job 3, job 4 will have internal fragmentation of 185k in block 2, 55k in block 3, and blocks 4 and 5 are already busy with jobs 1 and 2 respectively. Thus, with an internal fragmentation of 55k, job 4 will be allocated to block 3. For job 5 with a size of 23k, block 1 is already busy by job 3, block 2 will have an internal fragmentation of 177k, and block 3, 4, and 5 are already busy by jobs 4, 1 and 2 respectively. Thus, job 5 will be allocated to block 2. The memory is now full. This is the first turnaround for the jobs, and the last for jobs 2 and 4. As the second turnaround starts, blocks 3 and 5 will now be free, and the second turnaround starts for jobs 1, 3, and 5. For job 6 with a size of 6k, blocks 1 and 2 are still busy, in block 3, the internal fragmentation is 64k, block 4 is busy, and block 5 will have 9k internal fragmentation. Thus, job 6 will be allocated to block 5. For job 7, with a size of 25k, blocks 1 and 2 are full, block 3 will have 45ik internal fragmentation, and blocks 4 and 5 are full, thus job 7 will be allocated to block 3. As the next turnaround starts, blocks 1, 2, 3 and 5 will now be free and this marks the last turnaround for job 1. Job 8 with a size of 55k will not fit in block 1, will have 145k internal fragmentation in block 2, 15k in block 3, block 4 is still busy, and block 5 cannot cater job 8. Therefore, job 8 will be allocated to block 3. Job 9 with a size of 88k will not fit in block 1, have 112k internal fragmentation in block 2, blocks 3 and 4 are busy, and block 5 will not be enough for job 9. Therefore, job 9 will be allocated to block 2. Job 10 has a size of 100k, and though blocks 1 and 5 are free, job 10 will not fit in either of them. Thus, job 10 will be in the waiting list. As the next turnaround starts, block 4 will now be free and this marks the last turnaround for job 8, and the second for job 9. Job 10 with a size of 100k will not fit in block 1, blocks 2 and 3 are still busy, block 4 will have 15k internal fragmentation, and in block 5, job 10 will not fit. Thus, job 10 will be allocated to block 4. There are no more jobs in the queue; therefore, the turnaround is ended. For the next turnaround, block 3 will be free, and this marks the last turnaround for job 9 and the second for job 10. As the turnaround ends, job 9’s turnaround will now end. The next turnaround will be the last turnaround for job 10 and thus, all the blocks will be freed as it ends.

The other method for free space allocation is First-fit memory allocation. In this method, the job will search from the top block down to the last and allocate the first block of memory that fits the job’s size. As for the given situation, the set of jobs will be allocated to the given fixed-partitioned memory using First-fit memory allocation. For the first turnaround, job 1 with a size of 100k and a turnaround of 3 will search from the top block down to the last for the first block that will fit for it. Block 1 with a memory size of 50k cannot cater job 1. Block 2 with a memory size of 200k will allocate job 1 since it is the first block of memory that fits the job’s size. Job 2 with a size of 10k and a turnaround of 1 will be allocated to block 1 since block 1’s memory size is 50k. As for job 3 which had a size of 35k and a turnaround of 2, block 1 is already busy with job 2, and block 2 is also busy with job 1. Block 3 is free and has a size of 70k, enough to cater job 3. Therefore, job 3 will be allocated to block 3. As for job 4 with a size of 15k and a turnaround of 1, blocks 1, 2, and 3 are busy. Block 4 with a size of 115k will allocate job 4. Job 5, with a size of 23k will not be allocated to any other block for this turnaround since the remaining block, which is block 5 only has 15k of memory. So, job 5 will be moved to the waiting list. Job 6 with a size of 6k and a turnaround of 1, blocks 1, 2, 3, and 4 are already busy. Block 5 with a size of 15k will allocate job 6. Since all the partitions are busy, the first turnaround will now end and all other jobs will be moved to the waiting list. Thus marks the end of the turnaround for jobs 2, 4 and 6. The next turnaround marks the second turnaround for job 1 and the last for job 3. Blocks 1, 4 and 5 are now free. Then job 5 with a size of 23k and a turnaround of 2 will be allocated to block 1 since it has 50k of memory. As for job 7 with a size of 25k and a turnaround of 1, blocks 1, 2 and 3 are busy with jobs 5, 1 and 3 respectively. Block 4 is free and has a size of 115k, enough to allocate job 7. Job 8 has a size of 55k, but blocks 1-4 are busy and block 5 has insufficient memory for it. Thus, it will wait for the next turnaround for a possible sufficient block of memory for it. The case is same with jobs 9 and 10, since its sizes are 88k and 100k respectively. As this turnaround ends, blocks 3 and 4 will be free. The next turnaround marks the last turnaround for jobs 1 and 5. As for job 8 with a size of 55k and a turnaround of 2, blocks 1 and 2 are still busy, and block 3 has a memory of 70k, enough for it. Thus, it will allocate Job 8. For job 9, with a size of 88k and a turnaround of 3, blocks 1-3 are busy, and block 4 with a size of 115k will allocate job 9. Job 10 with a size of 100k will no longer be allocated for this turnaround and will wait for the next since the remaining free block has insufficient memory for it. As this turnaround ends, jobs 1 and 5’s turnarounds will also end. For the next turnaround, this marks the second turnaround for job 9 and the last for job 8. Blocks 1, 2 and 5 are free. For job 10, with a size of 100k and a turnaround of 3, block 5, having 50k of memory will be insufficient for it. Block 2 has 200k of memory, thus job 10 will be allocated to block 2. There are no more waiting jobs. As this turnaround ends, job 8’s turnaround will end. The next turnaround will be the last for job 9 and the second for job 10. The end of this turnaround will also mark the end for job 9’s turnaround. The start of the next turnaround will be the last of job 10’s turnaround, and blocks 1, 3, 4 and 5 are free. The end of this turnaround also marks the end for job 10’s turnaround.

Another method for free space allocation is the Worst-fit memory allocation. In this method, the job will search from the top block down to the last and will be allocated to the block with the largest internal fragmentation or wasted memory space. In the given situation, the first turnaround will begin. For job 1 with a size of 100k and a turnaround of 3, it will not fit in block 1(50k), fits in block 2(200k) with an internal fragmentation of 100k,does not fit in block 3(70k), fits in block 4(115k) with an internal fragmentation of 15k, and does not fit in block 5(15k). Block 2(200k), having an internal fragmentation of 100k, being the largest internal fragmentation, will allocate memory for job 1. Job 2, with a size of 10k and a turnaround of 1, fits in block 1(50k) with 40k internal fragmentation, block 2 is already busy, fits in block 3(70k) with an internal fragmentation of 60k, fits in block 4(115k) with an internal fragmentation of 105k, and fits in block 5(15k) with 5k internal fragmentation. Block 4 will allocate job 2, being the block with the largest internal fragmentation. Job 3 with a size of 35k and a turnaround of 2, fits in block 1(50k) with an internal fragmentation of 15k, block 2 is busy, fits in block 3(70k) with 35k of internal fragmentation, block 4 is busy, and does not fit in block 5(6k). Thus, job 3 will be allocated to block 3. Job 4 with a size of 15k and a turnaround of 1, fits in block 1(50k) with an internal fragmentation of 35k, blocks 2, 3 and 4 are already busy, and fits in block 5(15k) with 0 internal fragmentation. Job 4 will now be allocated to block 1. Job 5 with a size of 23k, with blocks 1-6 already busy and block 5(15k) having insufficient memory size for it, will wait for the next turnaround. Job 6 with a size of 6k will be allocated to block 5(15k) since blocks 1-5 are busy. Since all the partitions are busy, the other jobs will no longer be allocated for this turnaround. This turnaround’s end will also mark the end for the turnarounds of jobs 2, 4 and 6. The next turnaround will be the second for job 1 and the last for job 3. Blocks 1, 4 and 5 are free. Job 5 with a size of 23k and a turnaround of 2, fits in block 1(50k) with an internal fragmentation of 27k, blocks 2 and 3 are busy, fits in block 4(115k) with an internal fragmentation of 92k, and will not fit in block 5(15k). Thus, job 5 will be allocated to block 4. Job 7 with a size of 25k and a turnaround of 1, will fit in block 1(50k) with an internal fragmentation of 25k, blocks 2-5 are busy and does not fit in block 5(15k). Hence, job 7 will be allocated to block 1. Job 8 has a memory of 55k, with the given situation that blocks 1-4 are busy and block 5 is insufficient, will wait for the next turnaround. Same with job 9 (88k) and job 10 (100k). The end of this turnaround will mark the end of the turnaround for jobs 7 and 3. The start of the next turnaround will mark the last turnaround for jobs 1 and 5. Blocks 1, 3 and 5 are free. Job 8 with a size of 55k and a turnaround of 2 will not fit in block 1(50k), block 2 is busy, fits in block 3(70k) with an internal fragmentation of 15k, block 4 is busy, and block 5 is insufficient. Thus, job 8 will be allocated to block 3. Job 9 with a size of 88k will not fit in block 1(50k), blocks 2-4 are busy, and will not fit in block 5(15k). Hence, job 9 will wait for the next turnaround. Job 10 with a size of 100k will also wait for the next turnaround since no other block fits its required size. This turnaround’s end will also be the end of jobs 1 and 5’s turnaround. The next turnaround will mark the last turnaround for job 8. Blocks 1, 2, 4, and 5 are free. Job 9 with a size of 88k and a turnaround of 3 will not fit in block 1(50k), fit in block 2(200k) with an internal fragmentation of 112k, block 3 is busy, fit in block 4(115k) with an internal fragmentation of 27k, but will not fit in block 5(15k). Therefore, job 9 will be allocated to block 2. Job 10 with a size of 100k and a turnaround of 3, will not fit in block 1(50k), blocks 2 and 3 are busy, fit in block 4(115k) with an internal fragmentation of 15k, but will not fit in block 5(15k). So, job 10 will be allocated to block 4. There are no more jobs to be allocated. When this turnaround ends, the turnaround for job 8 also ends. The start of the next turnaround will be the second turnaround of jobs 9 and 10. When the turnaround ends and start anew, that will be the final turnaround for jobs 9 and 10, and thus ending that turnaround results to the completion of the execution of the jobs for that certain program.

CASE STUDY 4

Load the following jobs into memory using dynamic partition and relocatable dynamic partition: (The memory size is 220k with allocated OS for 15k).

a. Job1 (100k) f. Job6 (6k)
turnaround: 3 turnaround: 1
b. Job2 (10k) g. Job7 (25k)
turnaround: 1 turnaround: 1
c. Job3 (35k) h. Job8 (55k)
turnaround: 2 turnaround: 2
d. Job4 (15k) i. Job9 (88k)
turnaround: 1 turnaround: 3
e. Job5 (23k) j. Job10 (100k)
turnaround: 2 turnaround: 3

DYNAMIC PARTITION


Job 7 and the other jobs must have to wait since there are no more blocks that would fit their sizes.

Since it is Dynamic Partition, Job 9 and Job 10 can not load anymore because their sizes are too large to fit into the remaining free memory blocks.

RELOCATABLE DYNAMIC PARTITION


When job 7 arrives requiring 25K, the initial memory shows external fragmentation. Using Relocatable Dynamic Partition the external fragmentation immediately eliminated after compaction, making room for job 7.



Thursday, December 2, 2010

CASE STUDY # 3

In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. Name at least two of these problems. Can we ensure the same degree of security in a time-share machine as we have in a dedicated machine? Explain your answer

Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor , there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one program, then part of another, and so on. To the user it appears that all programs are executing at the same time.

One problem that could occur is that one user may modify the data which is required by another user. For example, User A is saving a data in the CPU, and User B is browsing some files and unintentionally modified the file that User A is doing, it could ruin the files of which User A is doing and it could end up in a mess. Another example is that when User A is decrypting a data that very important and private, but User B intentionally removes the data or is decrypting also the data at the same time. This could lead into a certain mislead action and is possibly a dangerous one.

Time-sharing is the sharing of a computing resource among many users by means of multiprogramming and multi-tasking. Its introduction in the 1960s, and emergence as the prominent model of computing in the 1970s, represents a major technological shift in the history of computing. By allowing a large number of users to interact concurrently with a single computer, time-sharing dramatically lowered the cost of providing computing capability, made it possible for individuals and organizations to use a computer without owning one, and promoted the interactive use of computers and the development of new interactive applications. Dedicated Machine is a computer that services one primary function or task. For example, an automobile might have an onboard computer that is dedicated solely to navigation.
As what we know, time-sharing machine is a shared process which different users can access the entire computer in the same time. The more complex it can get the more dangerous and harmful the threats can be on that computer. Unlike in a dedicated machine, one user can only access the file at a time so the lesser will be the harm on the machine.

CASE STUDY # 2


Select two of the following professionals:
  • An insurance adjuster
  • A delivery person for a courier service
  • A newspaper reporter
  • A doctor (general practitioner)
  • Manager in a supermarket

Put forward a theory about how that person might use a hand held computer in their work.



A portable computer that is small enough to be held in one's hand. Although extremely convenient to carry, handheld computers have not replaced notebook computers because of their small keyboards and screens. The most popular hand-held computers are those that are specifically designed to provide PIM (personal information manager) functions, such as a calendar and address book.

In being a newspaper reporter, information is very important and he/she should have the wide range of knowledge in different kinds of field. He/she should be open-minded and informative of what is happening around the world. As a newspaper reporter, he/she should also have the device in order to keep track of the happenings in the globe or in his/her country. He/she will need a device that could make his/her work much easier than usual. Having a handheld computer can help and do his/her job much easier with a vast range of information in his/her palm. He/she can actually use the device in order to jut down the information’s he/she has taken. With the use of a handheld computer, he/she can easily browse the internet with just one click away on getting the hottest news around the globe. He/she can also use all the applications like video and camera in order to capture some interesting and important events.



As a manager in a supermarket, he/she will be in need of vast range of customers in order to gain clients or investors in his supermarket. He/she will be in need of the news about the prices and increases of goods that he/she is selling into his/her supermarket. Imagine having a supermarket but you don’t have the knowledge about the products that you are selling. It could end up in a bankruptcy. A handheld computer/device can actually save a sinking business with a simple glitch. He/she can use the handheld computer in order to browse the news or the change in prices or even the information’s regarding to which product should sell best. Knowing which the best is or which is not is very important in having a business like running a supermarket. Knowing the most convenient way is the best way to be successful in a business. We, people, should take advantage of what we have right now and make use of it in order to survive in this battle.


Tuesday, November 23, 2010

CASE STUDY #1


Case Study #: 1

Give an example OS (Specific) for each of the following categories of OS:
Batch System
            A computer system that uses batch processing. 
    Condor High-Throughput Computing System
    Condor is an open source high-throughput computing software framework for coarse-grained distributed parallelization of computationally intensive tasks. It can be used to manage workload on a dedicated cluster of computers, and/or to farm out work to idle desktop computers — so-called cycle scavenging. Condor runs on Linux, UNIX, Mac OS X, FreeBSD, and contemporary Windows operating systems. Condor can seamlessly integrate both dedicated resources (rack-mounted clusters) and non-dedicated desktop machines (cycle scavenging) into one computing environment.
    Condor was the scheduler software used to distribute jobs for the first draft assembly of the Human Genome.
    ·         Interactive Systems 

          UNIX operating system
          Operating systems that allows user to use interactive programs, 
    pretty much all operating systems that are on PCs are interactive OS's.
    In 1977, ISC was the first commercial UNIX vendor, selling IS/1, a Version 6 Unix variant enhanced for office automation which ran on most PDP-11's. The later IS/3 and IS/5 were enhanced versions of System III and System V for PDP-11 and VAX.
                During the late 1970s and early 1980s, the influence of Unix in academic circles led to large-scale adoption of Unix (particularly of the BSD variant, originating from the University of California, Berkeley) by commercial startups, the most notable of which are Solaris, HP-UX and AIX. Today, in addition to certified Unix systems such as those already mentioned, Unix-like operating systems such as Linux and BSD descendants (FreeBSD, NetBSD, and OpenBSD) are commonly encountered. The term "traditional Unix" may be used to describe a Unix or an operating system that has the characteristics of either Version 7 Unix or UNIX System V.

    ·         •Real-time systems

         Transaction Processing Facility
    Transaction Processing Facility is an IBM real-time operating system for mainframes descended from the IBM System/360 family, including zSeries and System z9. The name is initialism for Transaction Processing Facility.

    TPF evolved from the Airlines Control Program (ACP), a free package developed in the mid-1960s by IBM in association with major North American and European airlines. In 1979, IBM introduced TPF as a replacement for ACP — and as a priced software product. The new name suggests its greater scope and evolution into non-airline related entities.
    Current users include Sabre (reservations), Amadeus (reservations), VISA Inc (authorizations), American Express (authorizations), EDS SHARES (reservations), Holiday Inn (central reservations), CBOE (order routing), Singapore Airlines, KLM, Qantas, Amtrak, Marriott International, Travelport and the NYPD (911 system).

    ·         •Hybrid Systems

    NeXTSTEP operating system
    NeXT Computer Inc. is named the company that was set up by Steve Jobs in 1985. Steve Jobs was previous at Apple and made independently with the company NeXT. The company NeXT was taken by Apple completely for 400 million dollars later. The developed operating system NEXTSTEP is UNIX related and also contains parts of the BSD and the Mach Kernel, therefore it is compatibly to BSD (4.2 BSD release). In 1990 the first web server and client in the CERN was set up on a NeXTStep system available. NeXTStep was used on special computers, x86 CPUs and Motorola CPUs were supported.
    NeXTSTEP   is a multitasking operating system that was developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube, and later, other computer architectures.
    NeXTSTEP was a combination of several parts:
    §  a Unix-like operating system based on the Mach kernel, plus source code from BSD
    §  Display PostScript and a windowing engine
    §  the Objective-C language and runtime
    §  an object-oriented (OO) application layer, including several "kits"
    §  development tools for the OO layers
    ·         •Embedded Systems

    Symbian Operating System
    Symbian OS is one of Nokia's mobile operating systems for mobile devices and smart phones, with associated libraries, user interface, frameworks and reference implementations of common tools, originally developed by Symbian Ltd. It is a descendant of Psion's EPOC and runs exclusively on ARM processors, although an unreleased x86 port existed.

    In 2008, the former Symbian Software Limited was acquired by Nokia and a new independent non-profit organisation called the Symbian Foundation was established. Symbian OS and its associated user interfaces S60, UIQ and MOAP(S) were contributed by their owners to the foundation with the objective of creating the Symbian platform as royalty-free, open source software. The platform has been designated as the successor to Symbian OS, following the official launch of the Symbian Foundation in April 2009. The Symbian platform was officially made available as open source code in February 2010.

    Symbian OS was created with three systems design principles in mind:
    §  the integrity and security of user data is paramount,
    §  user time must not be wasted, and
    §  All resources are scarce.