Tuesday, September 21, 2010

The Structures of Process Control Blocks (PCB)

By Kato Mivule

To understand what a Process Control Block (PCB), we first take a look at what a Process is. A Process is a computer program in execution.[1] A computer program therefore must be active to be considered a process. Whenever a Process gets to runs in the operating system, it alters its state. The State of a Process is current status in activity of that program. [2]

Every Process that is executed is in one of the following States: [1] [2]
New: In this status, the Process is just made or created.
Running: In the Running status, the Process is being executed.
Waiting: The process waits for an event to happen for example an input from the keyboard.
Ready: In this status the Process is waiting for execution in the CPU.
Terminated: In this status the Process has finished its job and is ended. However, if the Process is terminated before if finishes executed, it is said to be killed.

According to Silberschatz et al, processes in operating systems are delineated by a process control block (PCB) also known as the task controlling block or the task struc.[1] [3] The PCB is the data structure that stores data about a Process in the operating system. [4]

Silberschatz et al notes that a process control block in an operating system will at least have the following information: [1]
Process State: information about the current state of the process, from new, ready, running, to terminated.
Program Counter: states the location for the next command to be run for the same process.
CPU Register: state information on various types of registers is stored during interrupts for continuity to occur correctly when process resumes.
Memory Management Information: state data on memory is stored such as page tables, limit registers, or segment tables.
Accounting Information: stores state data on values of CPU and real time utilized, time limits, account numbers, job or process numbers.
I/O Status Information: Data on list of I/O devices apportioned to the process, a list of open files etc.

Therefore all major operating systems should at least have the above structure tailored to their unique process control block architectures.

According to Francesc Solsona et al, in the Linux operating system, the process control block is an implementation of a double linked list data structures. Francesc Solsona et al further state the fields associated with the Linux PCB as follows: [6]
policy: scheduling policy which include normal task policy and real-time policies.
rt_priority: responsible for planning between real time processes.
priority – ”static” priority: responsible for planning for normal processes.
counter, “dynamic” normal tasks priority.
files: open files structure, saves data about the job open files.
freq: sending and receiving message frequency.

A look at the Ubuntu Linux Process Manager, the System Monitor keeps track of the following data on processes running in the operating system:
Process Name: name of the process running
Status: current state of process, from sleeping to active.
Percentage of CPU: how much CPU resources are being used by process.
Nice:
Process ID:
Memory: memory usage.
Waiting Channel:

Fig 2: Ubuntu’s System Monitor

In the Windows operating system, Shibu gives a good description of the Task /Process Manager obligated for mounting the Process Control Block (PCB)or the Task Control Block (TCB) as referred to by Shibu. [6] Shibu further explains that the TCB or the PCB is used to store data associated with a particular process with the undermentioned content:[6]
ID: stores ID data of any particular process.
State: stores data on the actual status of the process, from ready, waiting, to terminated.
Type: keeps track if a process is real-time or normal.
Priority: keeps track on the priority of the process.
Context Pointer: context pointer
Memory Pointer: pointer to code memory, data memory, stack memory for the process.
System Resource Pointers: pointers to system assets.
Process Pointers: pointers to other PCBs

In Windows operating system, the Windows Task Manager is responsible for managing processes in the operating system. Windows Task Manager keeps the following data on Processes and Services:
Under processes:
Image Name: Name of Process.
User Name: User using the Process.
CPU: keeps track of CPU resources used by the process.
Memory: keeps track of memory usage by process.
Description: keeps a brief description of the process being used.

Fig 3: Windows Task Manager for Processes

Under services:
Name: name of services being used.
PID: Process ID.
Description: brief description of service in use.
State: current status of services, either running or stopped.
Group:


Fig 3: Windows Task Manager for Services

References
[1] Abraham Silberschatz, Greg Gagne, Peter Baer Galvin, “Operating System Concepts 8th Edition Binder Ready Version”. John Wiley & Sons, 2008, ISBN 978 0470 128725, Page 101-102.

[2] “Process states – Wikipedia, the free encyclopedia.” [Online]. Available: http://en.wikipedia.org/wiki/Process_states. [Accessed: 11-Sep-2010].

[3] “Process control block – Wikipedia, the free encyclopedia.” [Online]. Available: http://en.wikipedia.org/wiki/Process_control_block. [Accessed: 12-Sep-2010].

[4] Nell Dale, John Lewis. “Computer Science Illuminated, Edition 4″. Jones & Bartlett Learning, 2009, ISBN 0763776467, 9780763776466, Page 601.

[5] Cameron Hughes, Tracey Hughes. “Parallel and distributed programming using C++,Edition illustrated”. Addison-Wesley, 2004, ISBN 0131013769, 9780131013766, Page 39.

[6] José M. L. M. Palma. “High performance computing for computational science – VECPAR 2002: 5th international conference, Porto, Portugal, June 26-28, 2002 : selected papers and invited talks Volume 2565 of Lecture notes in computer science”. Springer, 2003, ISBN 3540008527, 9783540008521, Page 598-599.

[7] Shibu KV. “Intro To Embedded Systems 1E”. Tata McGraw-Hill, ISBN 007014589X, 9780070145894, Page 387.

Monday, August 9, 2010

New Cyber Law to Fight “Information Misuse” In Uganda

Ugandan Cyber Laws on Personal Privacy and Data Security are still too weak that the concept of Personal Data Privacy does not currently exist in Uganda’s ICT vocabulary… Kato Mivule

Cyber law to fight information misuse
Tuesday, 3rd August, 2010
By Winnie Nanteza and Racheal Ninsiima

THE Government is soon ratifying the law against the misuse of information and communication technology to combat terror, political and criminal mischief.

The Cyber Law Bill, according to the Minister of Information and Communication Technology, Aggrey Awori, is currently being discussed in Parliament.

“The Bill is already on the floor of Parliament. It will cover data and network security, cyber crime, information systems and electronic transactions,” he said.

The move, Awori said, followed the July 11 bomb blasts in Kampala.

He said the attacks had necessitated the Government to set up intelligence cameras at strategic points.

Awori was opening the sixth annual international conference on computing and ICT research at Protea Hotel in Kampala on Monday. It focussed on strengthening the role of ICT in development.

Dr. Josephine Nabukenya, the dean of Makerere University’s Faculty of Computing and IT, said the faculty is building a crimes record system, which would enable the Police to record cases and follow them up to the courts of law.

Wednesday, August 4, 2010

Uganda Gets Tough On Cybercrime

Uganda get tough on Cybercrime with more Cyber Laws but is Big Brother getting too big? Where are the Privacy Activists? Won’t the new tools be used to witch-hunt dissent?

Cyber law to fight information misuse
Tuesday, 3rd August, 2010
By Winnie Nanteza and Racheal Ninsiima

THE Government is soon ratifying the law against the misuse of information and communication technology to combat terror, political and criminal mischief.

The Cyber Law Bill, according to the Minister of Information and Communication Technology, Aggrey Awori, is currently being discussed in Parliament.

“The Bill is already on the floor of Parliament. It will cover data and network security, cyber crime, information systems and electronic transactions,” he said.

The move, Awori said, followed the July 11 bomb blasts in Kampala.

He said the attacks had necessitated the Government to set up intelligence cameras at strategic points.

Awori was opening the sixth annual international conference on computing and ICT research at Protea Hotel in Kampala on Monday. It focussed on strengthening the role of ICT in development.

Dr. Josephine Nabukenya, the dean of Makerere University’s Faculty of Computing and IT, said the faculty is building a crimes record system, which would enable the Police to record cases and follow them up to the courts of law.

Friday, July 30, 2010

When Privacy Matters Not?

The war on privacy and data security took on the worst turn as millions of Facebook Records were leaked. Facebook’s CEO seems delighted and trigger happy when it comes to doing away with privacy… Well, one solution is since major corporations and individuals are hungry for data, then feed them with ‘data’, there are lots of weaknesses, and as I searched through the data list leaked from Facebook, I could not help but notice thousands of fake and bogus records. Facebook claims 500 Million users but alas! millions must be bogus and fake names – let them have the “data”…

First Wikileaks, now Facebook. Is this the death of privacy?
The parallels between the Wikileaks saga and the openness of Facebook’s user data are striking.

I wrote a few days ago about an appalling misjudgment by Julian Assange, founder of Wikileaks, who released over 90,000 documents leaked to him relating to the war in Afghanistan. Well, it looks like another scandal is about to blow up. This time concerns personal privacy rather than national security – but the parallels are striking.

On Wednesday, Ron Bowes, a Canadian security consultant, “harvested” the names, profile addresses, and unique ID numbers of 100 million Facebook users – a fifth of the network’s total user base. He collated the information in a single 2.8GB file and posted it on BitTorrent, a peer-to-peer file-sharing network. Like Assange’s Afghanistan dossier, it was immediately accessible to anyone with an internet connection – including corporations. Check out this list of the firms who have downloaded the database so far.

My name appears in Bowes’ database. So does my mum’s. And so, probably, does yours, unless you’re super-vigilant about your Facebook privacy settings. Because, though you might not be aware of it, chances are that certain elements of your Facebook profile are set to appear publicly.

It emerged on Wednesday afternoon that Bowes conducted this exercise to help him learn how to break passwords – very unsettling, I’m sure you’ll agree. But Bowes is not the villain in this piece, because his act of mischief – and we can’t call it more than that, because the information he collected was freely available to anyone who cared to search for it – was only possible because Facebook itself has repeatedly and shamelessly betrayed its users’ trust, instituting rollback after rollback of privacy settings. Finally, in May, Facebook listened to user complaints and simplified its privacy settings, requiring far less information to be public by default.

Julian Assange and Mark Zuckerberg have a great deal in common. Both sit at the helm of powerful organisations that use technology to disseminate massive amounts of sensitive data. Both have clear, and, to my mind, very unsettling, ideologies that are starting to define social norms on the internet.

Assange is an outspoken opponent of the war in Afghanistan, which surely informed his decision to send the Afghanistan dossiers directly to Left-wing, anti-war newspapers rather than simply publish them on the site as had previously been Wikileaks’ method of disseminating information.
And Zuckerberg has repeatedly said that he wants Facebook users to learn to embrace openness. “We decided that these would be the social norms now,” he once said about the growing trend for sharing information online…..

Thursday, July 15, 2010

Uganda 7-11 Terror Attacks Disrupt Internet

Our thoughts and prayers to all who lost loved ones and those injured in such a barbaric attack on the innocent.

Kato Mivule

Bomb Blasts Disrupt Internet ServicesAll Africa
David Mugabe | 14 July 2010

Kampala — The deadly twin bomb blasts that hit Kampala last Sunday have forced Internet service providers to rethink their service delivery by providing back-up to the fibre optic cables.

The explosions damaged the Uganda Electricity Transmission Company (UETCL) pylons, thus breaking supply of bandwidth that is transmitted through the power lines.

End users reported hours of interruption. The New Vision can confirm that only about 20% of the capacity was available during most of the day on Monday.Even users from as far as Lira said the service was poor and unreliable by last week, but had worsened on Monday.

“Ours has been very slow since last week, but it got worse on Monday,” said a worker with the National Social Security Fund in Lira.Uganda telecom (utl), which controls 85% of the data market, conceded that their service to eastern Uganda, from Busoga region, was affected.

“A microwave link will be set up to act as a back-up like we have done in Kampala. Wherever we have fibre and copper, we also have satellite,” said Mark Kaheru, utl’s spokeperson. Kaheru said fibre still remains the most reliable option, but precautions will now have to be taken into account outside Kampala, even though the damage is not frequent.

“The cable is 40 metres in the air. This is the second time we have had the interruption in the last seven years,” Kaheru said. The fibre from Kampala to Kenya starts at Kyadondo Rugby Club and it is managed by UETCL.
Relevant Links

Service providers sent engineers at the bomb site on Monday morning, but they were turned away by security officers who were combing the area for clues on the deadly terrorist attack. Orange Telecom chief strategy officer Edouard Blondeau explained that because of the interruption “we have to look for ways of putting our eggs in different baskets to mitigate the risks because damage is part of the daily fibre life.

Blondeau said the firm is linking up to SEACOM, another undersea fibre optic cable, which was launched last year. Orange Telecom is connected to TEAMS and satellite. Orange, however, reported that the service was restored on Tuesday by about 9:00pm. Other service providers said they had to prioritise service to corporates and limit traffic to individuals during the interruption.